aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2014-04-22 18:41:15 -0700
committerChristopher Ferris <cferris@google.com>2014-07-01 12:08:18 -0700
commit73b37a9697acd53496bbef06ed25696e0c897341 (patch)
tree44d92d0568d59d2d6513dea21541cb79adee37b1 /bin
parent835cc0ae27acdc087408dd3f607210c658c28aab (diff)
downloadjemalloc-73b37a9697acd53496bbef06ed25696e0c897341.tar.gz
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')
-rwxr-xr-xbin/pprof9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/pprof b/bin/pprof
index a309943..328138c 100755
--- a/bin/pprof
+++ b/bin/pprof
@@ -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;
}
}