From: Nicholas Nethercote Date: Wed, 12 Dec 2018 09:52:33 +0000 (+1100) Subject: Fix path handling in the new Cachegrind and Callgrind tests. X-Git-Tag: VALGRIND_3_15_0~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46fb3eb81ceadf808a3bf1d6dd4ae079a4f44256;p=thirdparty%2Fvalgrind.git Fix path handling in the new Cachegrind and Callgrind tests. --- diff --git a/cachegrind/tests/a.c b/cachegrind/tests/a.c new file mode 100644 index 0000000000..cd1c66e212 --- /dev/null +++ b/cachegrind/tests/a.c @@ -0,0 +1,7 @@ +int main(void) { + int z = 0; + for (int i = 0; i < 1000000; i++) { + z += i; + } + return z % 256; +} diff --git a/cachegrind/tests/ann1.post.exp b/cachegrind/tests/ann1.post.exp index d82b6abf28..10196377a7 100644 --- a/cachegrind/tests/ann1.post.exp +++ b/cachegrind/tests/ann1.post.exp @@ -20,7 +20,7 @@ Ir I1mr ILmr -------------------------------------------------------------------------------- Ir I1mr ILmr file:function -------------------------------------------------------------------------------- -5,000,015 1 1 /home/njn/grind/ws2/a.c:main +5,000,015 1 1 a.c:main 47,993 19 19 /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:do_lookup_x 28,534 11 11 /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:_dl_lookup_symbol_x 28,136 7 7 /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c:__GI___tunables_init @@ -31,7 +31,7 @@ Ir I1mr ILmr file:function 6,898 2 2 /build/glibc-OTsEL5/glibc-2.27/elf/dl-misc.c:_dl_name_match_p -------------------------------------------------------------------------------- --- Auto-annotated source: /home/njn/grind/ws2/a.c +-- Auto-annotated source: a.c -------------------------------------------------------------------------------- Ir I1mr ILmr diff --git a/cachegrind/tests/ann2.post.exp b/cachegrind/tests/ann2.post.exp index 83d9378f85..d12fca0552 100644 --- a/cachegrind/tests/ann2.post.exp +++ b/cachegrind/tests/ann2.post.exp @@ -20,7 +20,7 @@ Dw Dr Ir -------------------------------------------------------------------------------- Dw Dr Ir file:function -------------------------------------------------------------------------------- - 3 ( 0.02%) 4,000,004 (98.57%) 5,000,015 (95.61%) /home/njn/grind/ws2/a.c:main + 3 ( 0.02%) 4,000,004 (98.57%) 5,000,015 (95.61%) a.c:main 4,543 (25.23%) 17,566 ( 0.43%) 47,993 ( 0.92%) /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:do_lookup_x 3,083 (17.12%) 5,750 ( 0.14%) 28,534 ( 0.55%) /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:_dl_lookup_symbol_x 8 ( 0.04%) 5,521 ( 0.14%) 28,136 ( 0.54%) /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c:__GI___tunables_init @@ -28,7 +28,7 @@ Dw Dr Ir file:function 0 5,158 ( 0.13%) 25,408 ( 0.49%) /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcmp.S:strcmp -------------------------------------------------------------------------------- --- Auto-annotated source: /home/njn/grind/ws2/a.c +-- Auto-annotated source: a.c -------------------------------------------------------------------------------- Dw Dr Ir diff --git a/cachegrind/tests/cgout-test b/cachegrind/tests/cgout-test index d59359bf9f..b625ec8ccd 100644 --- a/cachegrind/tests/cgout-test +++ b/cachegrind/tests/cgout-test @@ -3525,7 +3525,7 @@ fn=wmemchr fl=/build/glibc-OTsEL5/glibc-2.27/wcsmbs/../sysdeps/x86_64/multiarch/wmemset.c fn=wmemset 31 2 0 0 2 0 0 0 0 0 -fl=/home/njn/grind/ws2/a.c +fl=a.c fn=main 1 2 0 0 0 0 0 1 0 0 2 1 1 1 0 0 0 1 0 0 diff --git a/callgrind/tests/ann1.post.exp b/callgrind/tests/ann1.post.exp index 12ee255070..201b967d1d 100644 --- a/callgrind/tests/ann1.post.exp +++ b/callgrind/tests/ann1.post.exp @@ -9,7 +9,7 @@ Events recorded: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw Events shown: Ir I1mr ILmr Event sort order: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw Thresholds: 99 0 0 0 0 0 0 0 0 -Include dirs: +Include dirs: ../../cachegrind/tests/ User annotated: Auto-annotation: on @@ -21,7 +21,7 @@ Ir I1mr ILmr -------------------------------------------------------------------------------- Ir I1mr ILmr file:function -------------------------------------------------------------------------------- -5,000,015 1 1 /home/njn/grind/ws2/a.c:main +5,000,015 1 1 a.c:main 47,993 19 19 /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:do_lookup_x 28,534 11 11 /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:_dl_lookup_symbol_x 28,136 7 7 /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c:__GI___tunables_init @@ -32,7 +32,7 @@ Ir I1mr ILmr file:function 6,898 2 2 /build/glibc-OTsEL5/glibc-2.27/elf/dl-misc.c:_dl_name_match_p -------------------------------------------------------------------------------- --- Auto-annotated source: /home/njn/grind/ws2/a.c +-- Auto-annotated source: ../../cachegrind/tests/ + a.c -------------------------------------------------------------------------------- Ir I1mr ILmr diff --git a/callgrind/tests/ann1.vgtest b/callgrind/tests/ann1.vgtest index 5791b97a6d..6b80ee3632 100644 --- a/callgrind/tests/ann1.vgtest +++ b/callgrind/tests/ann1.vgtest @@ -2,5 +2,5 @@ # the post-processing of the cgout-test file. prog: ../../tests/true vgopts: --callgrind-out-file=callgrind.out -post: perl ../../callgrind/callgrind_annotate --show=Ir,I1mr,ILmr --auto=yes ../../cachegrind/tests/cgout-test +post: perl ../../callgrind/callgrind_annotate --show=Ir,I1mr,ILmr --auto=yes --include=../../cachegrind/tests ../../cachegrind/tests/cgout-test cleanup: rm callgrind.out diff --git a/callgrind/tests/ann2.post.exp b/callgrind/tests/ann2.post.exp index 62dae609e8..47e5636038 100644 --- a/callgrind/tests/ann2.post.exp +++ b/callgrind/tests/ann2.post.exp @@ -9,7 +9,7 @@ Events recorded: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw Events shown: Dw Dr Ir Event sort order: Dr Thresholds: 99 -Include dirs: +Include dirs: ../../cachegrind/tests/ User annotated: Auto-annotation: on @@ -21,11 +21,11 @@ Dw Dr Ir -------------------------------------------------------------------------------- Dw Dr Ir file:function -------------------------------------------------------------------------------- - 3 ( 0.02%) 4,000,004 (98.57%) 5,000,015 (95.61%) /home/njn/grind/ws2/a.c:main + 3 ( 0.02%) 4,000,004 (98.57%) 5,000,015 (95.61%) a.c:main 4,543 (25.23%) 17,566 ( 0.43%) 47,993 ( 0.92%) /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:do_lookup_x -------------------------------------------------------------------------------- --- Auto-annotated source: /home/njn/grind/ws2/a.c +-- Auto-annotated source: ../../cachegrind/tests/ + a.c -------------------------------------------------------------------------------- Dw Dr Ir diff --git a/callgrind/tests/ann2.vgtest b/callgrind/tests/ann2.vgtest index 041fd856fa..e92f93ac4f 100644 --- a/callgrind/tests/ann2.vgtest +++ b/callgrind/tests/ann2.vgtest @@ -2,5 +2,5 @@ # the post-processing of the cgout-test file. prog: ../../tests/true vgopts: --callgrind-out-file=callgrind.out -post: perl ../../callgrind/callgrind_annotate --sort=Dr --show=Dw,Dr,Ir --auto=yes --show-percs=yes ../../cachegrind/tests/cgout-test +post: perl ../../callgrind/callgrind_annotate --sort=Dr --show=Dw,Dr,Ir --auto=yes --include=../../cachegrind/tests --show-percs=yes ../../cachegrind/tests/cgout-test cleanup: rm callgrind.out