From 7788bc4fee3ccd77fbc0c2b426748cd92a686eef Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 31 May 2022 20:36:18 +0200 Subject: [PATCH] Add some filtering to massif C++ tests with GCC on FreeBSD I should perhaps just delete these expected. The testcases don't work well with the stripped libstc++ without debuginfo on FreeBSD. That means that the --ignore-fn= options don't work to remove exception handling and iostream allocations and just leave the tesatcase allocations. --- massif/tests/new-cpp.post.exp-freebsd | 4 ++-- massif/tests/new-cpp.post.exp-x86-freebsd-gcc | 4 ++-- massif/tests/new-cpp.vgtest | 2 +- massif/tests/overloaded-new.post.exp-freebsd | 4 ++-- massif/tests/overloaded-new.post.exp-x86-freebsd-gcc | 4 ++-- massif/tests/overloaded-new.vgtest | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/massif/tests/new-cpp.post.exp-freebsd b/massif/tests/new-cpp.post.exp-freebsd index 6367d91799..a29a80c37b 100644 --- a/massif/tests/new-cpp.post.exp-freebsd +++ b/massif/tests/new-cpp.post.exp-freebsd @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./new-cpp -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 +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 ms_print arguments: massif.out -------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ Number of snapshots: 12 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/gcc10/libstdc++.so.6.0.28) +->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) diff --git a/massif/tests/new-cpp.post.exp-x86-freebsd-gcc b/massif/tests/new-cpp.post.exp-x86-freebsd-gcc index 558aa94d1c..b44673c201 100644 --- a/massif/tests/new-cpp.post.exp-x86-freebsd-gcc +++ b/massif/tests/new-cpp.post.exp-x86-freebsd-gcc @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./new-cpp -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 +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 ms_print arguments: massif.out -------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ Number of snapshots: 12 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/gcc9/libstdc++.so.6.0.28) +->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) diff --git a/massif/tests/new-cpp.vgtest b/massif/tests/new-cpp.vgtest index ebcef897a0..18b2d441f5 100644 --- a/massif/tests/new-cpp.vgtest +++ b/massif/tests/new-cpp.vgtest @@ -3,5 +3,5 @@ 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 -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses cleanup: rm massif.out diff --git a/massif/tests/overloaded-new.post.exp-freebsd b/massif/tests/overloaded-new.post.exp-freebsd index ac5fb2c2e9..5ea3666c08 100644 --- a/massif/tests/overloaded-new.post.exp-freebsd +++ b/massif/tests/overloaded-new.post.exp-freebsd @@ -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 +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 ms_print arguments: massif.out -------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ Number of snapshots: 12 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/gcc10/libstdc++.so.6.0.28) +->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) diff --git a/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc b/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc index 2d7fc92541..5d99373d69 100644 --- a/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc +++ b/massif/tests/overloaded-new.post.exp-x86-freebsd-gcc @@ -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 +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 ms_print arguments: massif.out -------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ Number of snapshots: 12 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/gcc9/libstdc++.so.6.0.28) +->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) diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index fc95acc2f3..0adb438ec8 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -3,5 +3,5 @@ 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 -post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ../../tests/filter_addresses cleanup: rm massif.out -- 2.47.2