about summary refs log tree commit diff
path: root/tests/coverage/attr
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-10-08 13:13:05 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-10-11 21:04:37 +1100
commit599f95ecc26fb68cccbf79780dd1825a4cf73eb0 (patch)
treece4a2c66912ac798355db676724e3bb8957726f7 /tests/coverage/attr
parentce697f919d88b143d70312c0e7f3952fcb9869db (diff)
downloadrust-599f95ecc26fb68cccbf79780dd1825a4cf73eb0.tar.gz
rust-599f95ecc26fb68cccbf79780dd1825a4cf73eb0.zip
coverage: Include the highest counter ID seen in `.cov-map` dumps
When making changes that have a large impact on coverage counter creation, this
makes it easier to see whether the number of physical counters has changed.

(The highest counter ID seen in coverage maps is not necessarily the same as
the number of physical counters actually used by the instrumented code, but
it's the best approximation we can get from looking only at the coverage maps,
and it should be reasonably accurate in most cases.)
Diffstat (limited to 'tests/coverage/attr')
-rw-r--r--tests/coverage/attr/impl.cov-map3
-rw-r--r--tests/coverage/attr/module.cov-map3
-rw-r--r--tests/coverage/attr/nested.cov-map2
-rw-r--r--tests/coverage/attr/off-on-sandwich.cov-map3
4 files changed, 11 insertions, 0 deletions
diff --git a/tests/coverage/attr/impl.cov-map b/tests/coverage/attr/impl.cov-map
index 9b0deed8b64..4d068c290f4 100644
--- a/tests/coverage/attr/impl.cov-map
+++ b/tests/coverage/attr/impl.cov-map
@@ -5,6 +5,7 @@ Number of files: 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 14, 5) to (start + 0, 19)
+Highest counter ID seen: (none)
 
 Function name: <impl::MyStruct>::on_inherit (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 05, 00, 17]
@@ -13,6 +14,7 @@ Number of files: 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 22, 5) to (start + 0, 23)
+Highest counter ID seen: (none)
 
 Function name: <impl::MyStruct>::on_on (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 19, 05, 00, 12]
@@ -21,4 +23,5 @@ Number of files: 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 25, 5) to (start + 0, 18)
+Highest counter ID seen: (none)
 
diff --git a/tests/coverage/attr/module.cov-map b/tests/coverage/attr/module.cov-map
index 34898eb4ca8..b318ac85a6c 100644
--- a/tests/coverage/attr/module.cov-map
+++ b/tests/coverage/attr/module.cov-map
@@ -5,6 +5,7 @@ Number of files: 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 12, 5) to (start + 0, 15)
+Highest counter ID seen: (none)
 
 Function name: module::on::inherit (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 14, 05, 00, 14]
@@ -13,6 +14,7 @@ Number of files: 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 20, 5) to (start + 0, 20)
+Highest counter ID seen: (none)
 
 Function name: module::on::on (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 17, 05, 00, 0f]
@@ -21,4 +23,5 @@ Number of files: 1
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 23, 5) to (start + 0, 15)
+Highest counter ID seen: (none)
 
diff --git a/tests/coverage/attr/nested.cov-map b/tests/coverage/attr/nested.cov-map
index 466aec8956e..2bd95325373 100644
--- a/tests/coverage/attr/nested.cov-map
+++ b/tests/coverage/attr/nested.cov-map
@@ -6,6 +6,7 @@ Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 63, 1) to (start + 1, 15)
 - Code(Counter(0)) at (prev + 11, 5) to (start + 1, 2)
+Highest counter ID seen: c0
 
 Function name: nested::closure_tail
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 4e, 01, 01, 0f, 01, 11, 05, 01, 02]
@@ -15,4 +16,5 @@ Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 78, 1) to (start + 1, 15)
 - Code(Counter(0)) at (prev + 17, 5) to (start + 1, 2)
+Highest counter ID seen: c0
 
diff --git a/tests/coverage/attr/off-on-sandwich.cov-map b/tests/coverage/attr/off-on-sandwich.cov-map
index d5fbac6ebf7..ae5c9bd19a2 100644
--- a/tests/coverage/attr/off-on-sandwich.cov-map
+++ b/tests/coverage/attr/off-on-sandwich.cov-map
@@ -6,6 +6,7 @@ Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 15, 5) to (start + 2, 18)
 - Code(Counter(0)) at (prev + 7, 5) to (start + 0, 6)
+Highest counter ID seen: c0
 
 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 21, 09, 02, 17, 01, 0b, 09, 00, 0a]
@@ -15,6 +16,7 @@ Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 33, 9) to (start + 2, 23)
 - Code(Counter(0)) at (prev + 11, 9) to (start + 0, 10)
+Highest counter ID seen: c0
 
 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c::sparse_d
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 24, 0d, 02, 1b, 01, 07, 0d, 00, 0e]
@@ -24,4 +26,5 @@ Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 36, 13) to (start + 2, 27)
 - Code(Counter(0)) at (prev + 7, 13) to (start + 0, 14)
+Highest counter ID seen: c0