]> sourceware.org Git - valgrind.git/commitdiff
Rename a bunch of `cg_annotate` test files.
authorNicholas Nethercote <n.nethercote@gmail.com>
Thu, 23 Mar 2023 03:04:53 +0000 (14:04 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Sun, 26 Mar 2023 21:52:28 +0000 (08:52 +1100)
For more consistency.

25 files changed:
cachegrind/tests/Makefile.am
cachegrind/tests/ann-diff.post.exp [moved from cachegrind/tests/diff.post.exp with 96% similarity]
cachegrind/tests/ann-diff.stderr.exp [moved from cachegrind/tests/ann1.stderr.exp with 100% similarity]
cachegrind/tests/ann-diff.vgtest [new file with mode: 0644]
cachegrind/tests/ann1.cgout [moved from cachegrind/tests/cgout-test with 99% similarity]
cachegrind/tests/ann1.vgtest [deleted file]
cachegrind/tests/ann1a.post.exp [moved from cachegrind/tests/ann1.post.exp with 99% similarity]
cachegrind/tests/ann1a.stderr.exp [moved from cachegrind/tests/ann3.stderr.exp with 100% similarity]
cachegrind/tests/ann1a.vgtest [new file with mode: 0644]
cachegrind/tests/ann1b.cgout [moved from cachegrind/tests/cgout-test2 with 100% similarity]
cachegrind/tests/ann1b.post.exp [new file with mode: 0644]
cachegrind/tests/ann1b.stderr.exp [moved from cachegrind/tests/diff.stderr.exp with 100% similarity]
cachegrind/tests/ann1b.vgtest [new file with mode: 0644]
cachegrind/tests/ann2-aux/ann2-via-I.rs [moved from cachegrind/tests/ann3-aux/ann3-via-I.rs with 100% similarity]
cachegrind/tests/ann2-basic.rs [moved from cachegrind/tests/ann3-basic.rs with 100% similarity]
cachegrind/tests/ann2-more-recent-than-cgout.rs [moved from cachegrind/tests/ann3-more-recent-than-cgout.rs with 100% similarity]
cachegrind/tests/ann2-negatives.rs [moved from cachegrind/tests/ann3-negatives.rs with 100% similarity]
cachegrind/tests/ann2-past-the-end.rs [moved from cachegrind/tests/ann3-past-the-end.rs with 100% similarity]
cachegrind/tests/ann2-unmentioned.rs [moved from cachegrind/tests/ann3-unmentioned.rs with 100% similarity]
cachegrind/tests/ann2.cgout [moved from cachegrind/tests/cgout-test3 with 86% similarity]
cachegrind/tests/ann2.post.exp
cachegrind/tests/ann2.vgtest
cachegrind/tests/ann3.post.exp [deleted file]
cachegrind/tests/ann3.vgtest [deleted file]
cachegrind/tests/diff.vgtest [deleted file]

index ded05c8fdb088fd1bf5ba2401bda46fe3636bec5..cee1f29167634ed403fc2df2b311fff77d6efcae 100644 (file)
@@ -10,16 +10,15 @@ DIST_SUBDIRS = x86 .
 
 dist_noinst_SCRIPTS = filter_stderr filter_cachesim_discards
 
-# Note that test.c and a.c are not compiled.
-# They just serve as input for cg_annotate in ann1 and ann2.
+# Note that `test.c` and `a.c` are not compiled.
+# They just serve as input for cg_annotate in `ann1a` and `ann1b`.
 EXTRA_DIST = \
-       cgout-test \
-       ann1.post.exp ann1.stderr.exp ann1.vgtest \
-       ann2.post.exp ann2.stderr.exp ann2.vgtest \
-       ann3.post.exp ann3.stderr.exp ann3.vgtest \
+       ann-diff.post.exp ann-diff.stderr.exp ann-diff.vgtest \
+       ann1a.post.exp ann1a.stderr.exp ann1a.vgtest ann1.cgout \
+       ann1b.post.exp ann1b.stderr.exp ann1b.vgtest ann1b.cgout \
+       ann2.post.exp ann2.stderr.exp ann2.vgtest ann2.cgout \
        chdir.vgtest chdir.stderr.exp \
        clreq.vgtest clreq.stderr.exp \
-       diff.post.exp diff.stderr.exp diff.vgtest \
        dlclose.vgtest dlclose.stderr.exp dlclose.stdout.exp \
        notpower2.vgtest notpower2.stderr.exp \
        test.c a.c \
similarity index 96%
rename from cachegrind/tests/diff.post.exp
rename to cachegrind/tests/ann-diff.post.exp
index ed95860ddfde6938c2df0561e26081fdc4d40d05..986edf35ef53b34e5fde59aa372c426b0400f658 100644 (file)
@@ -1,7 +1,7 @@
 --------------------------------------------------------------------------------
-Files compared:   cgout-test; cgout-test2
+Files compared:   ann1.cgout; ann1b.cgout
 Command:          ./a.out; ./a.out
-Data file:        cgout-diff
+Data file:        ann-diff.cgout
 Events recorded:  Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
 Events shown:     Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
 Event sort order: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
diff --git a/cachegrind/tests/ann-diff.vgtest b/cachegrind/tests/ann-diff.vgtest
new file mode 100644 (file)
index 0000000..e3dc099
--- /dev/null
@@ -0,0 +1,6 @@
+# The `prog` doesn't matter because we don't use its output. Instead we test
+# the post-processing of the `ann{1,1b}.cgout` test files.
+prog: ../../tests/true
+vgopts: --cachegrind-out-file=cachegrind.out
+post: perl ../../cachegrind/cg_diff ann1.cgout ann1b.cgout > ann-diff.cgout && perl ../../cachegrind/cg_annotate ann-diff.cgout
+cleanup: rm ann-diff.cgout
similarity index 99%
rename from cachegrind/tests/cgout-test
rename to cachegrind/tests/ann1.cgout
index b625ec8ccd6c149e369a5d94043d999387a301fd..fbe91822c349d879a9b02519ba2da343024a7b9d 100644 (file)
@@ -3,6 +3,10 @@ desc: D1 cache:         32768 B, 64 B, 8-way associative
 desc: LL cache:         19922944 B, 64 B, 19-way associative
 cmd: ./a.out
 events: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw 
+
+# Note: this file is called ann1.cgout because it is used by the tests `ann1a`
+# and `ann1b`.
+
 fl=/build/glibc-OTsEL5/glibc-2.27/csu/../csu/init-first.c
 fn=_init
 52 8 1 1 0 0 0 4 0 0
diff --git a/cachegrind/tests/ann1.vgtest b/cachegrind/tests/ann1.vgtest
deleted file mode 100644 (file)
index 660f524..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# The 'prog' doesn't matter because we don't use its output. Instead we test
-# the post-processing of the cgout-test file.
-prog: ../../tests/true
-vgopts: --cachegrind-out-file=cachegrind.out
-post: touch cgout-test && python3 ../../cachegrind/cg_annotate --show=Ir,I1mr,ILmr --show-percs=no cgout-test
-cleanup: rm cachegrind.out
similarity index 99%
rename from cachegrind/tests/ann1.post.exp
rename to cachegrind/tests/ann1a.post.exp
index e4c1d7c8d9818d99b8cfd3e57085cc8de18eddfe..05e9c5afa69163c2a4464d6ebdd4436f0acca2ad 100644 (file)
@@ -3,7 +3,7 @@ I1 cache:         32768 B, 64 B, 8-way associative
 D1 cache:         32768 B, 64 B, 8-way associative
 LL cache:         19922944 B, 64 B, 19-way associative
 Command:          ./a.out
-Data file:        cgout-test
+Data file:        ann1.cgout
 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
diff --git a/cachegrind/tests/ann1a.vgtest b/cachegrind/tests/ann1a.vgtest
new file mode 100644 (file)
index 0000000..1774f1b
--- /dev/null
@@ -0,0 +1,6 @@
+# The `prog` doesn't matter because we don't use its output. Instead we test
+# the post-processing of the `ann1.cgout` file.
+prog: ../../tests/true
+vgopts: --cachegrind-out-file=cachegrind.out
+post: touch ann1.cgout && python3 ../../cachegrind/cg_annotate --show=Ir,I1mr,ILmr --show-percs=no ann1.cgout
+cleanup: rm cachegrind.out
diff --git a/cachegrind/tests/ann1b.post.exp b/cachegrind/tests/ann1b.post.exp
new file mode 100644 (file)
index 0000000..302416a
--- /dev/null
@@ -0,0 +1,51 @@
+--------------------------------------------------------------------------------
+I1 cache:         32768 B, 64 B, 8-way associative
+D1 cache:         32768 B, 64 B, 8-way associative
+LL cache:         19922944 B, 64 B, 19-way associative
+Command:          ./a.out
+Data file:        ann1.cgout
+Events recorded:  Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
+Events shown:     Dw Dr Ir
+Event sort order: Dr
+Threshold:        0.1
+Include dirs:     
+User annotated:   a.c
+Auto-annotation:  off
+
+--------------------------------------------------------------------------------
+Dw              Dr                 Ir                 
+--------------------------------------------------------------------------------
+18,005 (100.0%) 4,057,955 (100.0%) 5,229,753 (100.0%)  PROGRAM TOTALS
+
+--------------------------------------------------------------------------------
+Dw            Dr                Ir                 file:function
+--------------------------------------------------------------------------------
+    3  (0.0%) 4,000,004 (98.6%) 5,000,015 (95.6%)  a.c:main
+4,543 (25.2%)    17,566  (0.4%)    47,993  (0.9%)  /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:do_lookup_x
+3,083 (17.1%)     5,750  (0.1%)    28,534  (0.5%)  /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:_dl_lookup_symbol_x
+    8  (0.0%)     5,521  (0.1%)    28,136  (0.5%)  /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c:__GI___tunables_init
+2,490 (13.8%)     5,219  (0.1%)    21,821  (0.4%)  /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86_64/dl-machine.h:_dl_relocate_object
+    0             5,158  (0.1%)    25,408  (0.5%)  /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcmp.S:strcmp
+
+--------------------------------------------------------------------------------
+-- User-annotated source: a.c
+--------------------------------------------------------------------------------
+Dw        Dr                Ir                
+
+ 1 (0.0%)         0                 2  (0.0%)  int main(void) {
+ 1 (0.0%)         0                 1  (0.0%)     int z = 0;
+ 1 (0.0%) 2,000,001 (49.3%) 3,000,004 (57.4%)     for (int i = 0; i < 1000000; i++) {
+ 0        2,000,000 (49.3%) 2,000,000 (38.2%)        z += i;
+ .                .                 .             }
+ 0                1  (0.0%)         6  (0.0%)     return z % 256;
+ 0                2  (0.0%)         2  (0.0%)  }
+
+--------------------------------------------------------------------------------
+Dw              Dr                Ir                
+--------------------------------------------------------------------------------
+     3   (0.0%) 4,000,004 (98.6%) 5,000,015 (95.6%)    annotated: files known & above threshold & readable, line numbers known
+     0                  0                 0            annotated: files known & above threshold & readable, line numbers unknown
+     0                  0                 0          unannotated: files known & above threshold & unreadable 
+18,002 (100.0%)    57,951  (1.4%)   229,738  (4.4%)  unannotated: files known & below threshold
+     0                  0                 0          unannotated: files unknown
+
diff --git a/cachegrind/tests/ann1b.vgtest b/cachegrind/tests/ann1b.vgtest
new file mode 100644 (file)
index 0000000..5eacaa8
--- /dev/null
@@ -0,0 +1,6 @@
+# The `prog` doesn't matter because we don't use its output. Instead we test
+# the post-processing of the `ann1.cgout` file.
+prog: ../../tests/true
+vgopts: --cachegrind-out-file=cachegrind.out
+post: touch ann1.cgout && python3 ../../cachegrind/cg_annotate --sort=Dr --show=Dw,Dr,Ir --auto=no ann1.cgout a.c
+cleanup: rm cachegrind.out
similarity index 86%
rename from cachegrind/tests/cgout-test3
rename to cachegrind/tests/ann2.cgout
index 600ae9b317341751bd62aec6273b4a18a783d35b..08ddddc31757664928ba7df4a7a6734a1fd2ca1a 100644 (file)
@@ -1,8 +1,8 @@
-cmd: ann3
+cmd: ann2
 events: A SomeCount VeryLongEventName
 
 # A file testing various things.
-fl=ann3-basic.rs
+fl=ann2-basic.rs
 # This one has the counts to get the totals to 100,000/100,000/0.
 fn=f0
 7 70091 90291 0
@@ -41,12 +41,12 @@ fn=f6
 20 50 0 0
 
 # File with source newer than the cgout file.
-fl=ann3-more-recent-than-cgout.rs
+fl=ann2-more-recent-than-cgout.rs
 fn=new
 2 1000 0 0
 
 # File with negative and positive values.
-fl=ann3-negatives.rs
+fl=ann2-negatives.rs
 # Various, and the sum is zero.
 fn=neg1
 0 -1000 -1000 -1000
@@ -65,8 +65,8 @@ fn=neg3
 11 10000 0 -20
 
 # File with source newer than the cgout file.
-fl=ann3-past-the-end.rs
-# This filename is repeated in ann3-could-not-be-found.rs above.
+fl=ann2-past-the-end.rs
+# This filename is repeated in ann2-could-not-be-found.rs above.
 fn=f1
 1  200 100 0
 20 300 100 0
@@ -74,20 +74,20 @@ fn=f1
 22 200 0 -1000
 
 # File mentioned here, but not present on disk.
-fl=ann3-could-not-be-found.rs
+fl=ann2-could-not-be-found.rs
 fn=f1
 100 3000 2000 0
 101    3000     2000        0
 102     3000    2000    0
 
-# File found in ann3-aux/, via -I.
-fl=ann3-via-I.rs
+# File found in ann2-aux/, via -I.
+fl=ann2-via-I.rs
 fn=f1
 1 1000 500 0
 
 # File below the threshold. (It also doesn't exist, but that doesn't matter. We
 # don't try to open it because it's below the threshold.)
-fl=ann3-below-threshold.rs
+fl=ann2-below-threshold.rs
 fn=below1
 1 100 50 0
 2 100 50 0
index 98f083e91237aa09bd36f4403621c9d721cf07c8..204a472d3e51492d7bca6ed98269fcaf37bda5d1 100644 (file)
 --------------------------------------------------------------------------------
-I1 cache:         32768 B, 64 B, 8-way associative
-D1 cache:         32768 B, 64 B, 8-way associative
-LL cache:         19922944 B, 64 B, 19-way associative
-Command:          ./a.out
-Data file:        cgout-test
-Events recorded:  Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
-Events shown:     Dw Dr Ir
-Event sort order: Dr
-Threshold:        0.1
-Include dirs:     
-User annotated:   a.c
-Auto-annotation:  off
+Command:          ann2
+Data file:        ann2.cgout
+Events recorded:  A SomeCount VeryLongEventName
+Events shown:     A SomeCount VeryLongEventName
+Event sort order: A SomeCount VeryLongEventName
+Threshold:        0.5
+Include dirs:     ann2-no-such-dir
+                  ann2-no-such-dir-2
+                  ann2-aux
+User annotated:   ann2-unmentioned.rs
+                  ann2-no-such-file.rs
+Auto-annotation:  on
 
 --------------------------------------------------------------------------------
-Dw              Dr                 Ir                 
+A                SomeCount          VeryLongEventName 
 --------------------------------------------------------------------------------
-18,005 (100.0%) 4,057,955 (100.0%) 5,229,753 (100.0%)  PROGRAM TOTALS
+100,000 (100.0%)   100,000 (100.0%)                 0  PROGRAM TOTALS
 
 --------------------------------------------------------------------------------
-Dw            Dr                Ir                 file:function
+A              SomeCount         VeryLongEventName        file:function
 --------------------------------------------------------------------------------
-    3  (0.0%) 4,000,004 (98.6%) 5,000,015 (95.6%)  a.c:main
-4,543 (25.2%)    17,566  (0.4%)    47,993  (0.9%)  /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:do_lookup_x
-3,083 (17.1%)     5,750  (0.1%)    28,534  (0.5%)  /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c:_dl_lookup_symbol_x
-    8  (0.0%)     5,521  (0.1%)    28,136  (0.5%)  /build/glibc-OTsEL5/glibc-2.27/elf/dl-tunables.c:__GI___tunables_init
-2,490 (13.8%)     5,219  (0.1%)    21,821  (0.4%)  /build/glibc-OTsEL5/glibc-2.27/elf/../sysdeps/x86_64/dl-machine.h:_dl_relocate_object
-    0             5,158  (0.1%)    25,408  (0.5%)  /build/glibc-OTsEL5/glibc-2.27/string/../sysdeps/x86_64/strcmp.S:strcmp
+70,091 (70.1%)    90,291 (90.3%)                 0        ann2-basic.rs:f0
+15,000 (15.0%)       600  (0.6%)                 0        ann2-basic.rs:f1
+ 9,000  (9.0%)     6,000  (6.0%)                 0        ann2-could-not-be-found.rs:f1
+ 2,000  (2.0%)       100  (0.1%)                 0        ann2-basic.rs:f2
+ 1,000  (1.0%)       500  (0.5%)                 0        ann2-via-I.rs:f1
+ 1,000  (1.0%)       300  (0.3%)            -1,000 (n/a)  ann2-past-the-end.rs:f1
+-1,000 (-1.0%)         0                         0        ann2-negatives.rs:neg3
+-1,000 (-1.0%)         0                         0        ann2-negatives.rs:neg2
+ 1,000  (1.0%)         0                         0        ann2-more-recent-than-cgout.rs:new
+ 1,000  (1.0%)         0                         0        ???:unknown
+   500  (0.5%)         0                         0        ann2-basic.rs:f6
+   500  (0.5%)         0                         0        ann2-basic.rs:f4
 
 --------------------------------------------------------------------------------
--- User-annotated source: a.c
+-- Auto-annotated source: ann2-basic.rs
 --------------------------------------------------------------------------------
-Dw        Dr                Ir                
+A              SomeCount         VeryLongEventName 
 
- 1 (0.0%)         0                 2  (0.0%)  int main(void) {
- 1 (0.0%)         0                 1  (0.0%)     int z = 0;
- 1 (0.0%) 2,000,001 (49.3%) 3,000,004 (57.4%)     for (int i = 0; i < 1000000; i++) {
- 0        2,000,000 (49.3%) 2,000,000 (38.2%)        z += i;
- .                .                 .             }
- 0                1  (0.0%)         6  (0.0%)     return z % 256;
- 0                2  (0.0%)         2  (0.0%)  }
+ 7,100  (7.1%)       100  (0.1%)                 0  <unknown (line 0)>
+
+-- line 2 ----------------------------------------
+     .                 .                         .  two
+     .                 .                         .  three
+ 5,000  (5.0%)       500  (0.5%)                 0  four
+ 5,000  (5.0%)       100  (0.1%)                 0  five
+     .                 .                         .  six
+70,091 (70.1%)    90,291 (90.3%)                 0  seven
+     .                 .                         .  eight
+   110  (0.1%)         9  (0.0%)                 0  nine
+     .                 .                         .  ten
+     .                 .                         .  eleven
+   200  (0.2%)         0                         0  twelve
+   200  (0.2%)         0                         0  thirteen
+   100  (0.1%)         0                         0  fourteen
+     0                 0                         0  fifteen
+     0                 0                         0  sixteen
+     0                 0                         0  seventeen
+     0                 0                         0  eighteen
+   499  (0.5%)     2,000  (2.0%)                 0  nineteen
+   300  (0.3%)         0                         0  twenty
+
+--------------------------------------------------------------------------------
+-- Auto-annotated source: ann2-more-recent-than-cgout.rs
+--------------------------------------------------------------------------------
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@ Source file 'ann2-more-recent-than-cgout.rs' is more recent than input file 'ann2.cgout'.
+@ Annotations may not be correct.
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+A            SomeCount VeryLongEventName 
+
+    .                .                 .  one
+1,000 (1.0%)         0                 0  two
+    .                .                 .  three
+    .                .                 .  four
+-- line 4 ----------------------------------------
+
+--------------------------------------------------------------------------------
+-- Auto-annotated source: ann2-negatives.rs
+--------------------------------------------------------------------------------
+A                     SomeCount         VeryLongEventName       
+
+    -2,000    (-2.0%)    -1,000 (-1.0%)              -990 (n/a)  <unknown (line 0)>
+
+     2,000     (2.0%)     2,000  (2.0%)             2,000 (n/a)  one
+    -1,000    (-1.0%)    -1,000 (-1.0%)                 0        two
+         .                    .                         .        three
+         .                    .                         .        four
+   999,000   (999.0%)         0                  -150,000 (n/a)  five
+-1,000,000 (-1000.0%)         0                   150,000 (n/a)  six
+         .                    .                         .        seven
+         .                    .                         .        eight
+         .                    .                         .        nine
+   -10,000   (-10.0%)         0                        10 (n/a)  ten
+    10,000    (10.0%)         0                       -20 (n/a)  eleven
+         .                    .                         .        twelve
+         .                    .                         .        thirteen
+-- line 13 ----------------------------------------
+
+--------------------------------------------------------------------------------
+-- Auto-annotated source: ann2-past-the-end.rs
+--------------------------------------------------------------------------------
+A          SomeCount        VeryLongEventName       
+
+200 (0.2%)       100 (0.1%)                 0        one
+  .                .                        .        two
+  .                .                        .        three
+-- line 3 ----------------------------------------
+-- line 18 ----------------------------------------
+300 (0.3%)       100 (0.1%)                 0        <bogus line 20>
+300 (0.3%)       100 (0.1%)                 0        <bogus line 21>
+200 (0.2%)         0                   -1,000 (n/a)  <bogus line 22>
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@ Information recorded about lines past the end of 'ann2-past-the-end.rs'.
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+--------------------------------------------------------------------------------
+-- User-annotated source: ann2-unmentioned.rs
+--------------------------------------------------------------------------------
+  No information has been collected for ann2-unmentioned.rs
+
+--------------------------------------------------------------------------------
+-- Auto-annotated source: ann2-aux/ann2-via-I.rs
+--------------------------------------------------------------------------------
+A            SomeCount        VeryLongEventName 
+
+1,000 (1.0%)       500 (0.5%)                 0  one
+
+--------------------------------------------------------------------------------
+The following files chosen for auto-annotation could not be read:
+--------------------------------------------------------------------------------
+  ann2-could-not-be-found.rs
+  ann2-no-such-file.rs
 
 --------------------------------------------------------------------------------
-Dw              Dr                Ir                
+A              SomeCount         VeryLongEventName       
 --------------------------------------------------------------------------------
-     3   (0.0%) 4,000,004 (98.6%) 5,000,015 (95.6%)    annotated: files known & above threshold & readable, line numbers known
    0                  0                 0            annotated: files known & above threshold & readable, line numbers unknown
    0                  0                 0          unannotated: files known & above threshold & unreadable 
-18,002 (100.0%)    57,951  (1.4%)   229,738  (4.4%)  unannotated: files known & below threshold
    0                  0                 0          unannotated: files unknown
+84,500 (84.5%)    94,700 (94.7%)               990 (n/a)    annotated: files known & above threshold & readable, line numbers known
5,100  (5.1%)      -900 (-0.9%)              -990 (n/a)    annotated: files known & above threshold & readable, line numbers unknown
9,000  (9.0%)     6,000  (6.0%)                 0        unannotated: files known & above threshold & unreadable 
+   400  (0.4%)       200  (0.2%)                 0        unannotated: files known & below threshold
1,000  (1.0%)         0                         0        unannotated: files unknown
 
index 9ef76e38e9bda564768a24273a155ca796863240..b2ec364c7279da2eb5a7da22824b336f673ac05c 100644 (file)
@@ -1,6 +1,13 @@
-# The 'prog' doesn't matter because we don't use its output. Instead we test
-# the post-processing of the cgout-test file.
+# This tests all sorts of edge cases. See the comments in `ann2.cgout` for
+# more details.
+#
+# The `prog` doesn't matter because we don't use its output. Instead we test
+# the post-processing of the `ann2.cgout` file.
 prog: ../../tests/true
 vgopts: --cachegrind-out-file=cachegrind.out
-post: touch cgout-test && python3 ../../cachegrind/cg_annotate --sort=Dr --show=Dw,Dr,Ir --auto=no cgout-test a.c
+
+# The `sleep` is to ensure the mtime of the second touched file is greater than
+# the mtime of the first touched file.
+post: touch ann2.cgout && sleep 0.1 && touch ann2-more-recent-than-cgout.rs && python3 ../../cachegrind/cg_annotate --context 2 --auto --show-percs=yes --threshold=0.5 -Iann2-no-such-dir --include ann2-no-such-dir-2 -I=ann2-aux ann2.cgout ann2-unmentioned.rs ann2-no-such-file.rs
+
 cleanup: rm cachegrind.out
diff --git a/cachegrind/tests/ann3.post.exp b/cachegrind/tests/ann3.post.exp
deleted file mode 100644 (file)
index 2b86957..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
---------------------------------------------------------------------------------
-Command:          ann3
-Data file:        cgout-test3
-Events recorded:  A SomeCount VeryLongEventName
-Events shown:     A SomeCount VeryLongEventName
-Event sort order: A SomeCount VeryLongEventName
-Threshold:        0.5
-Include dirs:     ann3-no-such-dir
-                  ann3-no-such-dir-2
-                  ann3-aux
-User annotated:   ann3-unmentioned.rs
-                  ann3-no-such-file.rs
-Auto-annotation:  on
-
---------------------------------------------------------------------------------
-A                SomeCount          VeryLongEventName 
---------------------------------------------------------------------------------
-100,000 (100.0%)   100,000 (100.0%)                 0  PROGRAM TOTALS
-
---------------------------------------------------------------------------------
-A              SomeCount         VeryLongEventName        file:function
---------------------------------------------------------------------------------
-70,091 (70.1%)    90,291 (90.3%)                 0        ann3-basic.rs:f0
-15,000 (15.0%)       600  (0.6%)                 0        ann3-basic.rs:f1
- 9,000  (9.0%)     6,000  (6.0%)                 0        ann3-could-not-be-found.rs:f1
- 2,000  (2.0%)       100  (0.1%)                 0        ann3-basic.rs:f2
- 1,000  (1.0%)       500  (0.5%)                 0        ann3-via-I.rs:f1
- 1,000  (1.0%)       300  (0.3%)            -1,000 (n/a)  ann3-past-the-end.rs:f1
--1,000 (-1.0%)         0                         0        ann3-negatives.rs:neg3
--1,000 (-1.0%)         0                         0        ann3-negatives.rs:neg2
- 1,000  (1.0%)         0                         0        ann3-more-recent-than-cgout.rs:new
- 1,000  (1.0%)         0                         0        ???:unknown
-   500  (0.5%)         0                         0        ann3-basic.rs:f6
-   500  (0.5%)         0                         0        ann3-basic.rs:f4
-
---------------------------------------------------------------------------------
--- Auto-annotated source: ann3-basic.rs
---------------------------------------------------------------------------------
-A              SomeCount         VeryLongEventName 
-
- 7,100  (7.1%)       100  (0.1%)                 0  <unknown (line 0)>
-
--- line 2 ----------------------------------------
-     .                 .                         .  two
-     .                 .                         .  three
- 5,000  (5.0%)       500  (0.5%)                 0  four
- 5,000  (5.0%)       100  (0.1%)                 0  five
-     .                 .                         .  six
-70,091 (70.1%)    90,291 (90.3%)                 0  seven
-     .                 .                         .  eight
-   110  (0.1%)         9  (0.0%)                 0  nine
-     .                 .                         .  ten
-     .                 .                         .  eleven
-   200  (0.2%)         0                         0  twelve
-   200  (0.2%)         0                         0  thirteen
-   100  (0.1%)         0                         0  fourteen
-     0                 0                         0  fifteen
-     0                 0                         0  sixteen
-     0                 0                         0  seventeen
-     0                 0                         0  eighteen
-   499  (0.5%)     2,000  (2.0%)                 0  nineteen
-   300  (0.3%)         0                         0  twenty
-
---------------------------------------------------------------------------------
--- Auto-annotated source: ann3-more-recent-than-cgout.rs
---------------------------------------------------------------------------------
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@ Source file 'ann3-more-recent-than-cgout.rs' is more recent than input file 'cgout-test3'.
-@ Annotations may not be correct.
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-A            SomeCount VeryLongEventName 
-
-    .                .                 .  one
-1,000 (1.0%)         0                 0  two
-    .                .                 .  three
-    .                .                 .  four
--- line 4 ----------------------------------------
-
---------------------------------------------------------------------------------
--- Auto-annotated source: ann3-negatives.rs
---------------------------------------------------------------------------------
-A                     SomeCount         VeryLongEventName       
-
-    -2,000    (-2.0%)    -1,000 (-1.0%)              -990 (n/a)  <unknown (line 0)>
-
-     2,000     (2.0%)     2,000  (2.0%)             2,000 (n/a)  one
-    -1,000    (-1.0%)    -1,000 (-1.0%)                 0        two
-         .                    .                         .        three
-         .                    .                         .        four
-   999,000   (999.0%)         0                  -150,000 (n/a)  five
--1,000,000 (-1000.0%)         0                   150,000 (n/a)  six
-         .                    .                         .        seven
-         .                    .                         .        eight
-         .                    .                         .        nine
-   -10,000   (-10.0%)         0                        10 (n/a)  ten
-    10,000    (10.0%)         0                       -20 (n/a)  eleven
-         .                    .                         .        twelve
-         .                    .                         .        thirteen
--- line 13 ----------------------------------------
-
---------------------------------------------------------------------------------
--- Auto-annotated source: ann3-past-the-end.rs
---------------------------------------------------------------------------------
-A          SomeCount        VeryLongEventName       
-
-200 (0.2%)       100 (0.1%)                 0        one
-  .                .                        .        two
-  .                .                        .        three
--- line 3 ----------------------------------------
--- line 18 ----------------------------------------
-300 (0.3%)       100 (0.1%)                 0        <bogus line 20>
-300 (0.3%)       100 (0.1%)                 0        <bogus line 21>
-200 (0.2%)         0                   -1,000 (n/a)  <bogus line 22>
-
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@ Information recorded about lines past the end of 'ann3-past-the-end.rs'.
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
---------------------------------------------------------------------------------
--- User-annotated source: ann3-unmentioned.rs
---------------------------------------------------------------------------------
-  No information has been collected for ann3-unmentioned.rs
-
---------------------------------------------------------------------------------
--- Auto-annotated source: ann3-aux/ann3-via-I.rs
---------------------------------------------------------------------------------
-A            SomeCount        VeryLongEventName 
-
-1,000 (1.0%)       500 (0.5%)                 0  one
-
---------------------------------------------------------------------------------
-The following files chosen for auto-annotation could not be read:
---------------------------------------------------------------------------------
-  ann3-could-not-be-found.rs
-  ann3-no-such-file.rs
-
---------------------------------------------------------------------------------
-A              SomeCount         VeryLongEventName       
---------------------------------------------------------------------------------
-84,500 (84.5%)    94,700 (94.7%)               990 (n/a)    annotated: files known & above threshold & readable, line numbers known
- 5,100  (5.1%)      -900 (-0.9%)              -990 (n/a)    annotated: files known & above threshold & readable, line numbers unknown
- 9,000  (9.0%)     6,000  (6.0%)                 0        unannotated: files known & above threshold & unreadable 
-   400  (0.4%)       200  (0.2%)                 0        unannotated: files known & below threshold
- 1,000  (1.0%)         0                         0        unannotated: files unknown
-
diff --git a/cachegrind/tests/ann3.vgtest b/cachegrind/tests/ann3.vgtest
deleted file mode 100644 (file)
index c4fb4cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# This tests all sorts of edge cases. See the comments in `cgout-test3` for
-# more details.
-#
-# The `prog` doesn't matter because we don't use its output. Instead we test
-# the post-processing of the cgout-test file.
-prog: ../../tests/true
-vgopts: --cachegrind-out-file=cachegrind.out
-
-# The `sleep` is to ensure the mtime of the second touched file is greater than
-# the mtime of the first touched file.
-post: touch cgout-test3 && sleep 0.1 && touch ann3-more-recent-than-cgout.rs && python3 ../../cachegrind/cg_annotate --context 2 --auto --show-percs=yes --threshold=0.5 -Iann3-no-such-dir --include ann3-no-such-dir-2 -I=ann3-aux cgout-test3 ann3-unmentioned.rs ann3-no-such-file.rs
-
-cleanup: rm cachegrind.out
diff --git a/cachegrind/tests/diff.vgtest b/cachegrind/tests/diff.vgtest
deleted file mode 100644 (file)
index f38361e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# The 'prog' doesn't matter because we don't use its output. Instead we test
-# the post-processing of the cgout-test file.
-prog: ../../tests/true
-vgopts: --cachegrind-out-file=cachegrind.out
-post: perl ../../cachegrind/cg_diff cgout-test cgout-test2 > cgout-diff && perl ../../cachegrind/cg_annotate cgout-diff
-cleanup: rm cgout-diff
This page took 0.124399 seconds and 5 git commands to generate.