From: Paul Floyd Date: Fri, 3 Nov 2023 20:40:22 +0000 (+0100) Subject: massif: add C++ aligned operator new to allocator functions X-Git-Tag: VALGRIND_3_23_0~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfc9a4767478e6082ddb387107b1e3bf22696aac;p=thirdparty%2Fvalgrind.git massif: add C++ aligned operator new to allocator functions Also make the unsigned (32bit) and unsigned long (64bit) for size_t conditional on the wordsize. --- diff --git a/massif/ms_main.c b/massif/ms_main.c index 0957349a0a..572a9d999c 100644 --- a/massif/ms_main.c +++ b/massif/ms_main.c @@ -298,6 +298,12 @@ static void init_alloc_fns(void) // prodigiously stupid overloading that caused them to not allocate // memory. // + // PJF: the above comment is a bit wide of the mark. + // See https://en.cppreference.com/w/cpp/memory/new/operator_new + // There are two "non-allocating placement allocation functions" + // + // Because of the above we can't use wildcards. + // // XXX: because we don't look at the first stack entry (unless it's a // custom allocation) there's not much point to having all these alloc // functions here -- they should never appear anywhere (I think?) other @@ -309,20 +315,37 @@ static void init_alloc_fns(void) // DO("malloc" ); DO("__builtin_new" ); +# if VG_WORDSIZE == 4 DO("operator new(unsigned)" ); +#else DO("operator new(unsigned long)" ); +#endif DO("__builtin_vec_new" ); +# if VG_WORDSIZE == 4 DO("operator new[](unsigned)" ); +#else DO("operator new[](unsigned long)" ); +#endif DO("calloc" ); DO("realloc" ); DO("memalign" ); DO("posix_memalign" ); DO("valloc" ); +# if VG_WORDSIZE == 4 DO("operator new(unsigned, std::nothrow_t const&)" ); DO("operator new[](unsigned, std::nothrow_t const&)" ); + DO("operator new(unsigned, std::align_val_t al)" ); + DO("operator new[](unsigned, std::align_val_t al)" ); + DO("operator new(unsigned, std::align_val_t al, const std::nothrow_t&)" ); + DO("operator new[](unsigned, std::align_val_t al, const std::nothrow_t&)" ); +#else DO("operator new(unsigned long, std::nothrow_t const&)" ); DO("operator new[](unsigned long, std::nothrow_t const&)"); + DO("operator new(unsigned long, std::align_val_t al)" ); + DO("operator new[](unsigned long, std::align_val_t al)" ); + DO("operator new(unsigned long, std::align_val_t al, const std::nothrow_t&)" ); + DO("operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&)" ); +#endif #if defined(VGO_darwin) DO("malloc_zone_malloc" ); DO("malloc_zone_calloc" ); diff --git a/massif/tests/culling1.stderr.exp b/massif/tests/culling1.stderr.exp index 19858ff34e..fc21b91d2e 100644 --- a/massif/tests/culling1.stderr.exp +++ b/massif/tests/culling1.stderr.exp @@ -1,20 +1,20 @@ Massif: alloc-fns: Massif: malloc Massif: __builtin_new -Massif: operator new(unsigned) Massif: operator new(unsigned long) Massif: __builtin_vec_new -Massif: operator new[](unsigned) Massif: operator new[](unsigned long) Massif: calloc Massif: realloc Massif: memalign Massif: posix_memalign Massif: valloc -Massif: operator new(unsigned, std::nothrow_t const&) -Massif: operator new[](unsigned, std::nothrow_t const&) Massif: operator new(unsigned long, std::nothrow_t const&) Massif: operator new[](unsigned long, std::nothrow_t const&) +Massif: operator new(unsigned long, std::align_val_t al) +Massif: operator new[](unsigned long, std::align_val_t al) +Massif: operator new(unsigned long, std::align_val_t al, const std::nothrow_t&) +Massif: operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&) Massif: ignore-fns: Massif: 0: __part_load_locale Massif: 1: __time_load_locale diff --git a/massif/tests/culling2.stderr.exp b/massif/tests/culling2.stderr.exp index 0454d158b1..0100cf21c0 100644 --- a/massif/tests/culling2.stderr.exp +++ b/massif/tests/culling2.stderr.exp @@ -1,20 +1,20 @@ Massif: alloc-fns: Massif: malloc Massif: __builtin_new -Massif: operator new(unsigned) Massif: operator new(unsigned long) Massif: __builtin_vec_new -Massif: operator new[](unsigned) Massif: operator new[](unsigned long) Massif: calloc Massif: realloc Massif: memalign Massif: posix_memalign Massif: valloc -Massif: operator new(unsigned, std::nothrow_t const&) -Massif: operator new[](unsigned, std::nothrow_t const&) Massif: operator new(unsigned long, std::nothrow_t const&) Massif: operator new[](unsigned long, std::nothrow_t const&) +Massif: operator new(unsigned long, std::align_val_t al) +Massif: operator new[](unsigned long, std::align_val_t al) +Massif: operator new(unsigned long, std::align_val_t al, const std::nothrow_t&) +Massif: operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&) Massif: ignore-fns: Massif: 0: __part_load_locale Massif: 1: __time_load_locale diff --git a/massif/tests/deep-B.stderr.exp b/massif/tests/deep-B.stderr.exp index 74187be5d4..9bfee37b94 100644 --- a/massif/tests/deep-B.stderr.exp +++ b/massif/tests/deep-B.stderr.exp @@ -1,20 +1,20 @@ Massif: alloc-fns: Massif: malloc Massif: __builtin_new -Massif: operator new(unsigned) Massif: operator new(unsigned long) Massif: __builtin_vec_new -Massif: operator new[](unsigned) Massif: operator new[](unsigned long) Massif: calloc Massif: realloc Massif: memalign Massif: posix_memalign Massif: valloc -Massif: operator new(unsigned, std::nothrow_t const&) -Massif: operator new[](unsigned, std::nothrow_t const&) Massif: operator new(unsigned long, std::nothrow_t const&) Massif: operator new[](unsigned long, std::nothrow_t const&) +Massif: operator new(unsigned long, std::align_val_t al) +Massif: operator new[](unsigned long, std::align_val_t al) +Massif: operator new(unsigned long, std::align_val_t al, const std::nothrow_t&) +Massif: operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&) Massif: a6 Massif: a7 Massif: a8 diff --git a/massif/tests/deep-C.stderr.exp b/massif/tests/deep-C.stderr.exp index e1b72951a3..956c727828 100644 --- a/massif/tests/deep-C.stderr.exp +++ b/massif/tests/deep-C.stderr.exp @@ -1,20 +1,20 @@ Massif: alloc-fns: Massif: malloc Massif: __builtin_new -Massif: operator new(unsigned) Massif: operator new(unsigned long) Massif: __builtin_vec_new -Massif: operator new[](unsigned) Massif: operator new[](unsigned long) Massif: calloc Massif: realloc Massif: memalign Massif: posix_memalign Massif: valloc -Massif: operator new(unsigned, std::nothrow_t const&) -Massif: operator new[](unsigned, std::nothrow_t const&) Massif: operator new(unsigned long, std::nothrow_t const&) Massif: operator new[](unsigned long, std::nothrow_t const&) +Massif: operator new(unsigned long, std::align_val_t al) +Massif: operator new[](unsigned long, std::align_val_t al) +Massif: operator new(unsigned long, std::align_val_t al, const std::nothrow_t&) +Massif: operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&) Massif: a3 Massif: a4 Massif: a5 diff --git a/massif/tests/overloaded-new.cpp b/massif/tests/overloaded-new.cpp index 8fb87078b6..c79646cdcc 100644 --- a/massif/tests/overloaded-new.cpp +++ b/massif/tests/overloaded-new.cpp @@ -34,14 +34,44 @@ __attribute__((noinline)) void* operator new[] (std::size_t n, std::nothrow_t co return malloc(n); } +__attribute__((noinline)) void* operator new (std::size_t size, std::align_val_t al) +{ + return aligned_alloc(static_cast(al), size); +} + +__attribute__((noinline)) void* operator new[] (std::size_t size, std::align_val_t al) +{ + return aligned_alloc(static_cast(al), size); +} + +__attribute__((noinline)) void* operator new(std::size_t size, std::align_val_t al, const std::nothrow_t&) noexcept +{ + return aligned_alloc(static_cast(al), size); +} + +__attribute__((noinline)) void* operator new[](std::size_t size, std::align_val_t al, const std::nothrow_t&) noexcept +{ + return aligned_alloc(static_cast(al), size); +} + __attribute__((noinline)) void operator delete (void* p) { - return free(p); + free(p); } __attribute__((noinline)) void operator delete[] (void* p) { - return free(p); + free(p); +} + +__attribute__((noinline)) void operator delete (void* ptr, std::align_val_t al ) noexcept +{ + free(ptr); +} + +__attribute__((noinline)) void operator delete[] (void* ptr, std::align_val_t al ) noexcept +{ + free(ptr); } int main(void) @@ -50,10 +80,19 @@ int main(void) s* p2 = new (std::nothrow) s; char* c1 = new char[2000]; char* c2 = new (std::nothrow) char[2000]; + s* pa1 = static_cast(operator new(sizeof(*pa1), static_cast(256U))); + s* pa2 = static_cast(operator new[](sizeof(*pa2)*10U, static_cast(256U))); + std::nothrow_t tag; + s* pa3 = static_cast(operator new(sizeof(*pa3), static_cast(256U), tag)); + s* pa4 = static_cast(operator new[](sizeof(*pa4)*10U, static_cast(256U), tag)); delete p1; delete p2; delete [] c1; delete [] c2; + operator delete(pa1, static_cast(256U)); + operator delete(pa2, static_cast(256U)); + operator delete(pa3, static_cast(256U)); + operator delete(pa4, static_cast(256U)); return 0; } diff --git a/massif/tests/overloaded-new.post.exp b/massif/tests/overloaded-new.post.exp index ae112710b7..81206a892b 100644 --- a/massif/tests/overloaded-new.post.exp +++ b/massif/tests/overloaded-new.post.exp @@ -6,31 +6,31 @@ ms_print arguments: massif.out KB -11.75^ ########### - | # - | # - | # - | :::::::# - | : # - | : # - | ::::::: # :::::::::::: - | : : # : - | : : # : - | : : # : - | : : # : - | : : # : - | : : # : - | ::::::::::::: : # : :::::: - | : : : # : : - | : : : # : : - | : : : # : : :::::: - | : : : # : : : - | : : : # : : : +98.28^ # + | #: + | #::: + | #:::: + | #::::::::::::::::::: + | #::::: + | #::::: + | #::::: + | :::::::::::::::#::::: + | :: #::::: + | :: #::::: + | :: #::::: + | :: #::::: : + | :: #::::: ::::::::::::::: + | :: #::::: :: + | :: #::::: :: + | :: #::::: :: + | ::::::::::::::::: #::::: :: + | :: :: #::::: :: + | :::: :: #::::: :: 0 +----------------------------------------------------------------------->KB - 0 23.50 + 0 196.6 -Number of snapshots: 10 - Detailed snapshots: [5 (peak)] +Number of snapshots: 18 + Detailed snapshots: [9 (peak)] -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) @@ -40,20 +40,36 @@ Number of snapshots: 10 2 8,016 8,016 8,000 16 0 3 10,024 10,024 10,000 24 0 4 12,032 12,032 12,000 32 0 - 5 12,032 12,032 12,000 32 0 -99.73% (12,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. -->33.24% (4,000B) 0x........: main (overloaded-new.cpp:49) + 5 16,216 16,216 16,000 216 0 + 6 56,368 56,368 56,000 368 0 + 7 60,392 60,392 60,000 392 0 + 8 100,640 100,640 100,000 640 0 + 9 100,640 100,640 100,000 640 0 +99.36% (100,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->39.75% (40,000B) 0x........: main (overloaded-new.cpp:84) | -->33.24% (4,000B) 0x........: main (overloaded-new.cpp:50) +->39.75% (40,000B) 0x........: main (overloaded-new.cpp:87) | -->16.62% (2,000B) 0x........: main (overloaded-new.cpp:51) +->03.97% (4,000B) 0x........: main (overloaded-new.cpp:79) | -->16.62% (2,000B) 0x........: main (overloaded-new.cpp:52) +->03.97% (4,000B) 0x........: main (overloaded-new.cpp:80) +| +->03.97% (4,000B) 0x........: main (overloaded-new.cpp:83) +| +->03.97% (4,000B) 0x........: main (overloaded-new.cpp:86) +| +->01.99% (2,000B) 0x........: main (overloaded-new.cpp:81) +| +->01.99% (2,000B) 0x........: main (overloaded-new.cpp:82) -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- - 6 16,040 8,024 8,000 24 0 - 7 20,048 4,016 4,000 16 0 - 8 22,056 2,008 2,000 8 0 - 9 24,064 0 0 0 0 + 10 104,648 96,632 96,000 632 0 + 11 108,656 92,624 92,000 624 0 + 12 110,664 90,616 90,000 616 0 + 13 112,672 88,608 88,000 608 0 + 14 116,856 84,424 84,000 424 0 + 15 157,008 44,272 44,000 272 0 + 16 161,032 40,248 40,000 248 0 + 17 201,280 0 0 0 0 diff --git a/massif/tests/overloaded-new.post.exp-freebsd b/massif/tests/overloaded-new.post.exp-freebsd index 5ea3666c08..d74cde8a8f 100644 --- a/massif/tests/overloaded-new.post.exp-freebsd +++ b/massif/tests/overloaded-new.post.exp-freebsd @@ -6,31 +6,31 @@ ms_print arguments: massif.out KB -82.76^ # - | ::#:: - | ::::#: : - | ::: ::#: :::::::::::::::::::::::::::::::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: - | : : ::#: ::: +169.2^ # + | #: + | #:::::::::: + | #::: + | #::: + | :::::::::#::: + | :: #::: + | :: #::: ::::::::: + | :: #::: :: + | :: #::: :: + | :::::::::: #::: :: + | ::: :: #::: :: + | :::: :: #::: :: ::::::::::::::: + | :::: :: #::: :: : + | :::: :: #::: :: : + | :::: :: #::: :: : + | :::: :: #::: :: : + | :::: :: #::: :: : + | :::: :: #::: :: : + | :::: :: #::: :: : 0 +----------------------------------------------------------------------->KB - 0 165.5 + 0 338.3 -Number of snapshots: 12 - Detailed snapshots: [6 (peak)] +Number of snapshots: 20 + Detailed snapshots: [9, 10 (peak)] -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) @@ -41,26 +41,67 @@ Number of snapshots: 12 3 80,728 80,728 80,704 24 0 4 82,736 82,736 82,704 32 0 5 84,744 84,744 84,704 40 0 - 6 84,744 84,744 84,704 40 0 -99.95% (84,704B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. -->85.79% (72,704B) 0x........: ??? (in /usr/local/lib/gcc/libstdc++.so.6.0.28) -| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) -| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) -| ->85.79% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) + 6 88,960 88,960 88,704 256 0 + 7 129,144 129,144 128,704 440 0 + 8 133,200 133,200 132,704 496 0 + 9 173,224 173,224 172,704 520 0 +99.70% (172,704B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->41.97% (72,704B) 0x........: ??? (in /usr/local/lib/gcc/libstdc++.so.6.0.28) +| ->41.97% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) +| ->41.97% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) +| ->41.97% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) | -->04.72% (4,000B) 0x........: main (overloaded-new.cpp:49) +->23.09% (40,000B) 0x........: main (overloaded-new.cpp:84) | -->04.72% (4,000B) 0x........: main (overloaded-new.cpp:50) +->23.09% (40,000B) 0x........: main (overloaded-new.cpp:87) | -->02.36% (2,000B) 0x........: main (overloaded-new.cpp:51) +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:79) | -->02.36% (2,000B) 0x........: main (overloaded-new.cpp:52) +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:80) +| +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:83) +| +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:86) +| +->01.15% (2,000B) 0x........: main (overloaded-new.cpp:81) +| +->01.15% (2,000B) 0x........: main (overloaded-new.cpp:82) + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 10 173,224 173,224 172,704 520 0 +99.70% (172,704B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->41.97% (72,704B) 0x........: ??? (in /usr/local/lib/gcc/libstdc++.so.6.0.28) +| ->41.97% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) +| ->41.97% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) +| ->41.97% (72,704B) 0x........: ??? (in /libexec/ld-elf.so.1) +| +->23.09% (40,000B) 0x........: main (overloaded-new.cpp:84) +| +->23.09% (40,000B) 0x........: main (overloaded-new.cpp:87) +| +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:79) +| +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:80) +| +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:83) +| +->02.31% (4,000B) 0x........: main (overloaded-new.cpp:86) +| +->01.15% (2,000B) 0x........: main (overloaded-new.cpp:81) +| +->01.15% (2,000B) 0x........: main (overloaded-new.cpp:82) -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- - 7 88,752 80,736 80,704 32 0 - 8 92,760 76,728 76,704 24 0 - 9 94,768 74,720 74,704 16 0 - 10 96,776 72,712 72,704 8 0 - 11 169,488 0 0 0 0 + 11 177,232 169,216 168,704 512 0 + 12 181,240 165,208 164,704 504 0 + 13 183,248 163,200 162,704 496 0 + 14 185,256 161,192 160,704 488 0 + 15 189,472 156,976 156,704 272 0 + 16 229,656 116,792 116,704 88 0 + 17 233,712 112,736 112,704 32 0 + 18 273,736 72,712 72,704 8 0 + 19 346,448 0 0 0 0 diff --git a/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc b/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc index 5d99373d69..5d5e0a44c1 100644 --- a/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc +++ b/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc @@ -6,31 +6,31 @@ ms_print arguments: massif.out KB -30.26^ #### - | # - | :::# - | ::: # ::::: - | : : # : - | : : # : - | :::::: : # : :: - | : : : # : : :: - | ::::: : : # : : : :::::::::::::::::::::: - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : - | : : : : # : : : : +116.9^ # + | #: + | #::: + | #::::::::::::::: + | #:::: + | #:::: + | #:::: + | :::::::::::::#:::: + | :: #:::: + | :: #:::: + | :: #:::: :: + | :: #:::: : :::::::::::: + | :: #:::: : : + | :: #:::: : : + | :: #:::: : : + | ::::::::::::::: #:::: : : + | ::: :: #:::: : : + | :::::: :: #:::: : : ::::: + | :: ::: :: #:::: : : : + | :: ::: :: #:::: : : : 0 +----------------------------------------------------------------------->KB - 0 60.52 + 0 233.7 -Number of snapshots: 12 - Detailed snapshots: [6 (peak)] +Number of snapshots: 20 + Detailed snapshots: [9, 10 (peak)] -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) @@ -41,26 +41,67 @@ Number of snapshots: 12 3 26,968 26,968 26,944 24 0 4 28,976 28,976 28,944 32 0 5 30,984 30,984 30,944 40 0 - 6 30,984 30,984 30,944 40 0 -99.87% (30,944B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. -->61.14% (18,944B) 0x........: ??? (in /usr/local/lib/gcc/libstdc++.so.6.0.28) -| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1) -| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1) -| ->61.14% (18,944B) 0x........: ??? (in /libexec/ld-elf.so.1) + 6 35,184 35,184 34,944 240 0 + 7 75,352 75,352 74,944 408 0 + 8 79,392 79,392 78,944 448 0 + 9 119,656 119,656 118,944 712 0 +99.40% (118,944B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->33.43% (40,000B) 0x........: main (overloaded-new.cpp:84) +| +->33.43% (40,000B) 0x........: main (overloaded-new.cpp:87) +| +->15.83% (18,944B) 0x........: ??? (in /usr/local/lib32/gcc/libstdc++.so.6.0.30) +| ->15.83% (18,944B) 0x........: ??? (in /libexec/ld-elf32.so.1) +| ->15.83% (18,944B) 0x........: ??? (in /libexec/ld-elf32.so.1) +| ->15.83% (18,944B) 0x........: ??? (in /libexec/ld-elf32.so.1) +| +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:79) +| +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:80) +| +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:83) +| +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:86) +| +->01.67% (2,000B) 0x........: main (overloaded-new.cpp:81) +| +->01.67% (2,000B) 0x........: main (overloaded-new.cpp:82) + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 10 119,656 119,656 118,944 712 0 +99.40% (118,944B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->33.43% (40,000B) 0x........: main (overloaded-new.cpp:84) +| +->33.43% (40,000B) 0x........: main (overloaded-new.cpp:87) +| +->15.83% (18,944B) 0x........: ??? (in /usr/local/lib32/gcc/libstdc++.so.6.0.30) +| ->15.83% (18,944B) 0x........: ??? (in /libexec/ld-elf32.so.1) +| ->15.83% (18,944B) 0x........: ??? (in /libexec/ld-elf32.so.1) +| ->15.83% (18,944B) 0x........: ??? (in /libexec/ld-elf32.so.1) | -->12.91% (4,000B) 0x........: main (overloaded-new.cpp:49) +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:79) +| +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:80) +| +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:83) | -->12.91% (4,000B) 0x........: main (overloaded-new.cpp:50) +->03.34% (4,000B) 0x........: main (overloaded-new.cpp:86) | -->06.45% (2,000B) 0x........: main (overloaded-new.cpp:51) +->01.67% (2,000B) 0x........: main (overloaded-new.cpp:81) | -->06.45% (2,000B) 0x........: main (overloaded-new.cpp:52) +->01.67% (2,000B) 0x........: main (overloaded-new.cpp:82) -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- - 7 34,992 26,976 26,944 32 0 - 8 39,000 22,968 22,944 24 0 - 9 41,008 20,960 20,944 16 0 - 10 43,016 18,952 18,944 8 0 - 11 61,968 0 0 0 0 + 11 123,664 115,648 114,944 704 0 + 12 127,672 111,640 110,944 696 0 + 13 129,680 109,632 108,944 688 0 + 14 131,688 107,624 106,944 680 0 + 15 135,888 103,424 102,944 480 0 + 16 176,056 63,256 62,944 312 0 + 17 180,096 59,216 58,944 272 0 + 18 220,360 18,952 18,944 8 0 + 19 239,312 0 0 0 0 diff --git a/massif/tests/peak2.stderr.exp b/massif/tests/peak2.stderr.exp index 78d37b6663..9ffd1bc918 100644 --- a/massif/tests/peak2.stderr.exp +++ b/massif/tests/peak2.stderr.exp @@ -1,20 +1,20 @@ Massif: alloc-fns: Massif: malloc Massif: __builtin_new -Massif: operator new(unsigned) Massif: operator new(unsigned long) Massif: __builtin_vec_new -Massif: operator new[](unsigned) Massif: operator new[](unsigned long) Massif: calloc Massif: realloc Massif: memalign Massif: posix_memalign Massif: valloc -Massif: operator new(unsigned, std::nothrow_t const&) -Massif: operator new[](unsigned, std::nothrow_t const&) Massif: operator new(unsigned long, std::nothrow_t const&) Massif: operator new[](unsigned long, std::nothrow_t const&) +Massif: operator new(unsigned long, std::align_val_t al) +Massif: operator new[](unsigned long, std::align_val_t al) +Massif: operator new(unsigned long, std::align_val_t al, const std::nothrow_t&) +Massif: operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&) Massif: ignore-fns: Massif: 0: __part_load_locale Massif: 1: __time_load_locale diff --git a/massif/tests/realloc.stderr.exp b/massif/tests/realloc.stderr.exp index 4ed52b26ba..16d8f50917 100644 --- a/massif/tests/realloc.stderr.exp +++ b/massif/tests/realloc.stderr.exp @@ -1,20 +1,20 @@ Massif: alloc-fns: Massif: malloc Massif: __builtin_new -Massif: operator new(unsigned) Massif: operator new(unsigned long) Massif: __builtin_vec_new -Massif: operator new[](unsigned) Massif: operator new[](unsigned long) Massif: calloc Massif: realloc Massif: memalign Massif: posix_memalign Massif: valloc -Massif: operator new(unsigned, std::nothrow_t const&) -Massif: operator new[](unsigned, std::nothrow_t const&) Massif: operator new(unsigned long, std::nothrow_t const&) Massif: operator new[](unsigned long, std::nothrow_t const&) +Massif: operator new(unsigned long, std::align_val_t al) +Massif: operator new[](unsigned long, std::align_val_t al) +Massif: operator new(unsigned long, std::align_val_t al, const std::nothrow_t&) +Massif: operator new[](unsigned long, std::align_val_t al, const std::nothrow_t&) Massif: ignore-fns: Massif: 0: __part_load_locale Massif: 1: __time_load_locale