Rename fallback_impl to fallbackNewImpl and prune in jeprof

The existing fallback_impl name seemed a bit generic and given
it's static probably okay to rename.

Closes #2451
This commit is contained in:
Arne Welzel 2023-05-24 14:13:28 +02:00 committed by Qi Wang
parent d577e9b588
commit d59e30cbc9
2 changed files with 4 additions and 2 deletions

View File

@ -2957,6 +2957,8 @@ sub RemoveUninterestingFrames {
'@JEMALLOC_PREFIX@malloc', '@JEMALLOC_PREFIX@malloc',
'newImpl', 'newImpl',
'void* newImpl', 'void* newImpl',
'fallbackNewImpl',
'void* fallbackNewImpl',
'@JEMALLOC_PREFIX@free', '@JEMALLOC_PREFIX@free',
'@JEMALLOC_PREFIX@memalign', '@JEMALLOC_PREFIX@memalign',
'@JEMALLOC_PREFIX@posix_memalign', '@JEMALLOC_PREFIX@posix_memalign',

View File

@ -100,7 +100,7 @@ handleOOM(std::size_t size, bool nothrow) {
template <bool IsNoExcept> template <bool IsNoExcept>
JEMALLOC_NOINLINE JEMALLOC_NOINLINE
static void * static void *
fallback_impl(std::size_t size) noexcept(IsNoExcept) { fallbackNewImpl(std::size_t size) noexcept(IsNoExcept) {
void *ptr = malloc_default(size); void *ptr = malloc_default(size);
if (likely(ptr != nullptr)) { if (likely(ptr != nullptr)) {
return ptr; return ptr;
@ -112,7 +112,7 @@ template <bool IsNoExcept>
JEMALLOC_ALWAYS_INLINE JEMALLOC_ALWAYS_INLINE
void * void *
newImpl(std::size_t size) noexcept(IsNoExcept) { newImpl(std::size_t size) noexcept(IsNoExcept) {
return imalloc_fastpath(size, &fallback_impl<IsNoExcept>); return imalloc_fastpath(size, &fallbackNewImpl<IsNoExcept>);
} }
void * void *