rust/tests/coverage/drop_trait.cov-map
Zalathar ab786d3b98 coverage: Eliminate more counters by giving them to unreachable nodes
When preparing a function's coverage counters and metadata during codegen, any
part of the original coverage graph that was removed by MIR optimizations can
be treated as having an execution count of zero.

Somewhat counter-intuitively, if we give those unreachable nodes a _higher_
priority for receiving physical counters (instead of counter expressions), that
ends up reducing the total number of physical counters needed.

This works because if a node is unreachable, we don't actually create a
physical counter for it. Instead that node gets a fixed zero counter, and any
other node that would have relied on that physical counter in its counter
expression can just ignore that term completely.
2025-02-13 13:45:53 +11:00

22 lines
794 B
Plaintext

Function name: <drop_trait::Firework as core::ops::drop::Drop>::drop
Raw bytes (9): 0x[01, 01, 00, 01, 01, 09, 05, 02, 06]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 9, 5) to (start + 2, 6)
Highest counter ID seen: c0
Function name: drop_trait::main
Raw bytes (24): 0x[01, 01, 00, 04, 01, 0e, 01, 05, 0c, 01, 06, 09, 01, 16, 00, 02, 06, 04, 0b, 01, 05, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 14, 1) to (start + 5, 12)
- Code(Counter(0)) at (prev + 6, 9) to (start + 1, 22)
- Code(Zero) at (prev + 2, 6) to (start + 4, 11)
- Code(Counter(0)) at (prev + 5, 1) to (start + 0, 2)
Highest counter ID seen: c0