|
From: | Arun Sharma |
Subject: | Re: [libunwind] Circular links in the script/rs cache? |
Date: | Fri, 31 Mar 2006 17:08:19 -0800 |
User-agent: | Mozilla Thunderbird 1.0.7 (X11/20051011) |
Arun Sharma wrote:
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 nsecSo 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?
Some of the regression was coming due to not having libatomicops. I added the following optimizations:
- start validating only when we see a signal frame or when we're trying to look for a signal frame. - remember the last 4 validated addresses (please review for threadsafety) unw_getcontext : cold avg= 329.018 nsec, warm avg= 309.944 nsec unw_init_local : cold avg= 388.622 nsec, warm avg= 240.803 nsec no cache : unw_step : 1st= 3267.470 min= 2475.012 avg= 2622.855 nsec global cache : unw_step : 1st= 532.683 min= 170.299 avg= 186.856 nsec per-thread cache: unw_step : 1st= 339.634 min= 170.299 avg= 187.673 nsec and it doesn't SIGSEGV when it sees a case that it can't handle! http://www.serpentine.com/~arun/There is at least one known bug (duplicate IPs) that needs to be taken care of.
-Arun
[Prev in Thread] | Current Thread | [Next in Thread] |