ftmemsim-valgrind/massif/tests/new-cpp.vgtest
Philippe Waroquiers d1232dd32a massif: match --ignore-fn with the first IP that has a fnname
Currently, --ignore-fn is only matched with the top IP entries that
have a fnname. With this change, we first search for the first IP that
has a fnname.
This e.g. allows to ignore the allocation for a stacktrace such as:
   0x1 0x2 0x3 fn_to_ignore otherfn

This is then used in massif c++ tests new-cpp and overloaded-new to ignore
the c++ libstdc++ allocation similar to:
==10754== 72,704 bytes in 1 blocks are still reachable in loss record 10 of 10
==10754==    at 0x4C2BBCD: malloc (vg_replace_malloc.c:299)
==10754==    by 0x4EC39BF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22)
==10754==    by 0x400F8A9: call_init.part.0 (dl-init.c:72)
==10754==    by 0x400F9BA: call_init (dl-init.c:30)
==10754==    by 0x400F9BA: _dl_init (dl-init.c:120)
==10754==    by 0x4000C59: ??? (in /lib/x86_64-linux-gnu/ld-2.24.so)
2017-09-23 13:30:42 +02:00

7 lines
405 B
Plaintext

prog: new-cpp
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
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out