From 1ac7ad368f18f1b65b9f46318c93385a40b36123 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 5 Nov 2023 09:06:56 +0000 Subject: [PATCH] massif regtest: try adding a new expected for overloaded-new Added a filter for "pool" that's used on Arch Linux I'm not too confident that the new expected will work for all architectures or even versions of libstdc++ --- massif/tests/Makefile.am | 1 + massif/tests/overloaded-new.post.exp | 2 +- .../tests/overloaded-new.post.exp-libstdc++ | 75 +++++++++++++++++++ massif/tests/overloaded-new.vgtest | 2 +- 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 massif/tests/overloaded-new.post.exp-libstdc++ diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index 7b401037d2..8d899d172b 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -33,6 +33,7 @@ EXTRA_DIST = \ null.post.exp null.stderr.exp null.vgtest \ one.post.exp one.post.exp2 one.stderr.exp one.vgtest \ overloaded-new.post.exp overloaded-new.post.exp-mips32 \ + overloaded-new.post.exp-libstdc++ \ overloaded-new.stderr.exp overloaded-new.vgtest \ pages_as_heap.stderr.exp pages_as_heap.vgtest \ peak.post.exp peak.stderr.exp peak.vgtest \ diff --git a/massif/tests/overloaded-new.post.exp b/massif/tests/overloaded-new.post.exp index 81206a892b..8256c79913 100644 --- a/massif/tests/overloaded-new.post.exp +++ b/massif/tests/overloaded-new.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./overloaded-new -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init --ignore-fn=pool ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/overloaded-new.post.exp-libstdc++ b/massif/tests/overloaded-new.post.exp-libstdc++ new file mode 100644 index 0000000000..db66bee49e --- /dev/null +++ b/massif/tests/overloaded-new.post.exp-libstdc++ @@ -0,0 +1,75 @@ +-------------------------------------------------------------------------------- +Command: ./overloaded-new +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init --ignore-fn=pool +ms_print arguments: massif.out +-------------------------------------------------------------------------------- + + + KB +98.16^ # + | #: + | #::: + | #:::: + | #::::::::::::::::::: + | #::::: + | #::::: + | #::::: + | :::::::::::::::#::::: + | :: #::::: + | :: #::::: + | :: #::::: + | :: #::::: : + | :: #::::: ::::::::::::::: + | :: #::::: :: + | :: #::::: :: + | :: #::::: :: + | ::::::::::::::::: #::::: :: + | :: :: #::::: :: + | :::: :: #::::: :: + 0 +----------------------------------------------------------------------->KB + 0 196.3 + +Number of snapshots: 18 + Detailed snapshots: [9 (peak)] + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 0 0 0 0 0 0 + 1 4,008 4,008 4,000 8 0 + 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 16,248 16,248 16,000 248 0 + 6 56,432 56,432 56,000 432 0 + 7 60,488 60,488 60,000 488 0 + 8 100,512 100,512 100,000 512 0 + 9 100,512 100,512 100,000 512 0 +99.49% (100,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->39.80% (40,000B) 0x........: main (overloaded-new.cpp:84) +| +->39.80% (40,000B) 0x........: main (overloaded-new.cpp:87) +| +->03.98% (4,000B) 0x........: main (overloaded-new.cpp:79) +| +->03.98% (4,000B) 0x........: main (overloaded-new.cpp:80) +| +->03.98% (4,000B) 0x........: main (overloaded-new.cpp:83) +| +->03.98% (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) +-------------------------------------------------------------------------------- + 10 104,520 96,504 96,000 504 0 + 11 108,528 92,496 92,000 496 0 + 12 110,536 90,488 90,000 488 0 + 13 112,544 88,480 88,000 480 0 + 14 116,760 84,264 84,000 264 0 + 15 156,944 44,080 44,000 80 0 + 16 161,000 40,024 40,000 24 0 + 17 201,024 0 0 0 0 diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index 0adb438ec8..2a61ff8b7a 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -2,6 +2,6 @@ prog: overloaded-new vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook vgopts: --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 -vgopts: --ignore-fn=call_init +vgopts: --ignore-fn=call_init --ignore-fn=pool post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses cleanup: rm massif.out -- 2.47.2