Re: [PATCH 2/2] perf callchain: Use global caching provided by libunwind
From: Arun Sharma
Date: Tue Sep 23 2014 - 10:02:20 EST
On 9/23/14, 12:00 PM, Namhyung Kim wrote:
> + unw_set_caching_policy(addr_space, UNW_CACHE_GLOBAL);
The result is a bit surprising for me. In micro benchmarking (eg:
Lperf-simple), the per-thread policy is generally faster because it
doesn't involve locking.
libunwind/tests/Lperf-simple
unw_getcontext : cold avg= 109.673 nsec, warm avg= 28.610 nsec
unw_init_local : cold avg= 259.876 nsec, warm avg= 9.537 nsec
no cache : unw_step : 1st= 3258.387 min= 2922.331 avg= 3002.384 nsec
global cache : unw_step : 1st= 1192.093 min= 960.486 avg= 982.208 nsec
per-thread cache: unw_step : 1st= 429.153 min= 113.533 avg= 121.762 nsec
I can see how the global policy would involve less memory allocation
because of shared data structures. Curious about the reason for the
speedup (specifically if libunwind should change the defaults for the
non-local unwinding case).
-Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/