mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
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)
60 lines
3.8 KiB
Plaintext
60 lines
3.8 KiB
Plaintext
--------------------------------------------------------------------------------
|
|
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
|
|
ms_print arguments: massif.out
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
KB
|
|
11.75^ ###########
|
|
| #
|
|
| #
|
|
| #
|
|
| :::::::#
|
|
| : #
|
|
| : #
|
|
| ::::::: # ::::::::::::
|
|
| : : # :
|
|
| : : # :
|
|
| : : # :
|
|
| : : # :
|
|
| : : # :
|
|
| : : # :
|
|
| ::::::::::::: : # : ::::::
|
|
| : : : # : :
|
|
| : : : # : :
|
|
| : : : # : : ::::::
|
|
| : : : # : : :
|
|
| : : : # : : :
|
|
0 +----------------------------------------------------------------------->KB
|
|
0 23.50
|
|
|
|
Number of snapshots: 10
|
|
Detailed snapshots: [5 (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 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 (new-cpp.cpp:19)
|
|
|
|
|
->33.24% (4,000B) 0x........: main (new-cpp.cpp:20)
|
|
|
|
|
->16.62% (2,000B) 0x........: main (new-cpp.cpp:21)
|
|
|
|
|
->16.62% (2,000B) 0x........: main (new-cpp.cpp:22)
|
|
|
|
--------------------------------------------------------------------------------
|
|
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
|