]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix path handling in the new Cachegrind and Callgrind tests.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 12 Dec 2018 09:52:33 +0000 (20:52 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Wed, 12 Dec 2018 09:52:33 +0000 (20:52 +1100)
cachegrind/tests/a.c [new file with mode: 0644]
cachegrind/tests/ann1.post.exp
cachegrind/tests/ann2.post.exp
cachegrind/tests/cgout-test
callgrind/tests/ann1.post.exp
callgrind/tests/ann1.vgtest
callgrind/tests/ann2.post.exp
callgrind/tests/ann2.vgtest

diff --git a/cachegrind/tests/a.c b/cachegrind/tests/a.c
new file mode 100644 (file)
index 0000000..cd1c66e
--- /dev/null
@@ -0,0 +1,7 @@
+int main(void) {
+   int z = 0;
+   for (int i = 0; i < 1000000; i++) {
+      z += i;
+   }
+   return z % 256;
+}
index d82b6abf2806becd970a3fcb878395f4d57704d0..10196377a71b5cc0501cd833013634f765280b0a 100644 (file)
@@ -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 
 
index 83d9378f85a690b69b421e32c1361f196e635626..d12fca05520cfb671f1999882596dbe186b6edb3 100644 (file)
@@ -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                 
 
index d59359bf9f5c7c43df862bd6b3d644337bd9a16c..b625ec8ccd6c149e369a5d94043d999387a301fd 100644 (file)
@@ -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
index 12ee255070ea245e570c66011e7d2c4783a2fdda..201b967d1dfe23dba7b96ea727a35cb0e9e76e58 100644 (file)
@@ -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 
 
index 5791b97a6d5526984020e6c49b6071c3cdfe578f..6b80ee3632a66ca95a5c03fd6549856a70dda2b1 100644 (file)
@@ -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
index 62dae609e82cafb5d91b1e3f3e2f2a9e19542ea8..47e56360382372c2847c810f0c381821ebfc39bb 100644 (file)
@@ -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                 
 
index 041fd856fad8e6536166ade87d143ac4c29c61eb..e92f93ac4fbe9e0f6a23d786e5835e502d8f587f 100644 (file)
@@ -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