[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libunwind] Circular links in the script/rs cache?
From: |
Arun Sharma |
Subject: |
Re: [libunwind] Circular links in the script/rs cache? |
Date: |
Fri, 31 Mar 2006 14:48:23 -0800 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051011) |
Arun Sharma wrote:
I was thinking of:
+ /* validate address */
+ if (msync(PAGE_START(addr), 1, MS_SYNC) == -1)
+ return -1;
It's not pretty and it's not fool proof, but it might work well in
practice.
Thoughts?
Some performance numbers:
Current mercurial tree (cset: 8:ddfa96f97380):
unw_getcontext : cold avg= 329.018 nsec, warm avg= 309.944 nsec
unw_init_local : cold avg= 348.091 nsec, warm avg= 288.486 nsec
no cache : unw_step : 1st= 3258.387 min= 2486.365 avg= 2575.042 nsec
global cache : unw_step : 1st= 495.002 min= 140.780 avg= 155.244 nsec
per-thread cache: unw_step : 1st= 304.268 min= 140.780 avg= 155.825 nsec
After msync + thread safety changes:
unw_getcontext : cold avg= 331.402 nsec, warm avg= 309.944 nsec
unw_init_local : cold avg= 998.974 nsec, warm avg= 839.233 nsec
no cache : unw_step : 1st= 3553.572 min= 2772.467 avg= 2893.612 nsec
global cache : unw_step : 1st= 1531.463 min= 1046.771 avg= 1073.112 nsec
per-thread cache: unw_step : 1st= 1376.530 min= 1046.771 avg= 1068.485 nsec
So it's not cheap, but might be necessary until we work out all the
issues of skipping over a signal frame. Perhaps we can turn on the
safety check only when we recognize a signal frame?
-Arun