Add jemalloc prefix to allocator functions pruned by jeprof.

This resolves #507.
This commit is contained in:
Jason Evans 2017-05-30 14:26:02 -07:00
parent 7578b0e929
commit ff8062a511
2 changed files with 14 additions and 13 deletions

View File

@ -2892,21 +2892,21 @@ sub RemoveUninterestingFrames {
my %skip = (); my %skip = ();
my $skip_regexp = 'NOMATCH'; my $skip_regexp = 'NOMATCH';
if ($main::profile_type eq 'heap' || $main::profile_type eq 'growth') { if ($main::profile_type eq 'heap' || $main::profile_type eq 'growth') {
foreach my $name ('calloc', foreach my $name ('@JEMALLOC_PREFIX@calloc',
'cfree', 'cfree',
'malloc', '@JEMALLOC_PREFIX@malloc',
'free', '@JEMALLOC_PREFIX@free',
'memalign', '@JEMALLOC_PREFIX@memalign',
'posix_memalign', '@JEMALLOC_PREFIX@posix_memalign',
'aligned_alloc', '@JEMALLOC_PREFIX@aligned_alloc',
'pvalloc', 'pvalloc',
'valloc', '@JEMALLOC_PREFIX@valloc',
'realloc', '@JEMALLOC_PREFIX@realloc',
'mallocx', # jemalloc '@JEMALLOC_PREFIX@mallocx',
'rallocx', # jemalloc '@JEMALLOC_PREFIX@rallocx',
'xallocx', # jemalloc '@JEMALLOC_PREFIX@xallocx',
'dallocx', # jemalloc '@JEMALLOC_PREFIX@dallocx',
'sdallocx', # jemalloc '@JEMALLOC_PREFIX@sdallocx',
'tc_calloc', 'tc_calloc',
'tc_cfree', 'tc_cfree',
'tc_malloc', 'tc_malloc',

View File

@ -802,6 +802,7 @@ else
AC_DEFINE_UNQUOTED([JEMALLOC_PREFIX], ["$JEMALLOC_PREFIX"]) AC_DEFINE_UNQUOTED([JEMALLOC_PREFIX], ["$JEMALLOC_PREFIX"])
AC_DEFINE_UNQUOTED([JEMALLOC_CPREFIX], ["$JEMALLOC_CPREFIX"]) AC_DEFINE_UNQUOTED([JEMALLOC_CPREFIX], ["$JEMALLOC_CPREFIX"])
fi fi
AC_SUBST([JEMALLOC_PREFIX])
AC_SUBST([JEMALLOC_CPREFIX]) AC_SUBST([JEMALLOC_CPREFIX])
AC_ARG_WITH([export], AC_ARG_WITH([export],