diff options
author | Jason Evans <jasone@canonware.com> | 2014-04-23 01:41:15 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2014-04-23 03:55:09 (GMT) |
commit | 6f001059aa33d77a3cb7799002044faf8dd08fc0 (patch) | |
tree | fa31e27c6fd36a656d79176084d2fdb68adc8da8 /bin/pprof | |
parent | 05125b83778a5695c29777acdc662d999d016d32 (diff) | |
download | jemalloc-6f001059aa33d77a3cb7799002044faf8dd08fc0.zip jemalloc-6f001059aa33d77a3cb7799002044faf8dd08fc0.tar.gz jemalloc-6f001059aa33d77a3cb7799002044faf8dd08fc0.tar.bz2 |
Simplify backtracing.
Simplify backtracing to not ignore any frames, and compensate for this
in pprof in order to increase flexibility with respect to function-based
refactoring even in the presence of non-deterministic inlining. Modify
pprof to blacklist all jemalloc allocation entry points including
non-standard ones like mallocx(), and ignore all allocator-internal
frames. Prior to this change, pprof excluded the specifically
blacklisted functions from backtraces, but it left allocator-internal
frames intact.
Diffstat (limited to 'bin/pprof')
-rwxr-xr-x | bin/pprof | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2811,9 +2811,14 @@ sub RemoveUninterestingFrames { 'free', 'memalign', 'posix_memalign', + 'aligned_alloc', 'pvalloc', 'valloc', 'realloc', + 'mallocx', # jemalloc + 'rallocx', # jemalloc + 'xallocx', # jemalloc + 'dallocx', # jemalloc 'tc_calloc', 'tc_cfree', 'tc_malloc', @@ -2923,6 +2928,10 @@ sub RemoveUninterestingFrames { if (exists($symbols->{$a})) { my $func = $symbols->{$a}->[0]; if ($skip{$func} || ($func =~ m/$skip_regexp/)) { + # Throw away the portion of the backtrace seen so far, under the + # assumption that previous frames were for functions internal to the + # allocator. + @path = (); next; } } |