From: Philippe Waroquiers Date: Sat, 23 Sep 2017 14:41:18 +0000 (+0200) Subject: Follow up to 'On ppc, add generic_start_main.isra.0 as a below main function' X-Git-Tag: VALGRIND_3_14_0~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdc75efce6e027743ed2c2259584e784e523f446;p=thirdparty%2Fvalgrind.git Follow up to 'On ppc, add generic_start_main.isra.0 as a below main function' massif/tests/mmapunmap on ppc now indicates a below main function. Note: this ppc53 specific file is needed because the valgrind stack unwinder does not properly unwind in main. At the mmap syscall, gdb backtrace gives: Breakpoint 3, 0x00000000041dbae0 in .__GI_mmap () from /lib64/libc.so.6 (gdb) bt while the valgrind stack trace gives: Thread 1: status = VgTs_Runnable (lwpid 64207) ==64207== at 0x41DBAE0: mmap (in /usr/lib64/libc-2.17.so) ==64207== by 0x10000833: f (mmapunmap.c:9) ==64207== by 0x40E6BEB: (below main) (in /usr/lib64/libc-2.17.so) client stack range: [0x1FFEFF0000 0x1FFF00FFFF] client SP: 0x1FFF00ECE0 valgrind stack top usage: 15632 of 1048576 --- diff --git a/massif/tests/mmapunmap.post.exp-ppc64 b/massif/tests/mmapunmap.post.exp-ppc64 index 59550a3b8e..1ef9eef5b8 100644 --- a/massif/tests/mmapunmap.post.exp-ppc64 +++ b/massif/tests/mmapunmap.post.exp-ppc64 @@ -1 +1 @@ - n1: 81920000 0x........: generic_start_main.isra.0 (in /...libc...) + n0: 81920000 0x........: (below main) diff --git a/massif/tests/mmapunmap.vgtest b/massif/tests/mmapunmap.vgtest index 40e5664e39..9cf746e978 100644 --- a/massif/tests/mmapunmap.vgtest +++ b/massif/tests/mmapunmap.vgtest @@ -2,5 +2,5 @@ prog: mmapunmap vgopts: --pages-as-heap=yes --threshold=30.0 -q vgopts: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out vgopts: --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 -post: grep -A4 -e =peak massif.out | grep -e 'main (mmapunmap.c:16)\|generic_start_main.isra.0' | tr -s ' ' | ../../tests/filter_addresses | ../../tests/filter_libc +post: grep -A4 -e =peak massif.out | grep -e 'main (mmapunmap.c:16)\|(below main)' | tr -s ' ' | ../../tests/filter_addresses | ../../tests/filter_libc cleanup: rm massif.out