# code coverage dumping tool basic implementation · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/de47acd732dca8b4d2f2b3559307f488ccac940d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: de47acd732dca8b4d2f2b3559307f488ccac940d

Requested commit: de47acd732dca8b4d2f2b3559307f488ccac940d

Commit: de47acd732dca8b4d2f2b3559307f488ccac940d

Tree: 06bba0e41326343b49bee8f164b03f791c8c7f21

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
code coverage dumping tool basic implementation

* std.debug.Dwarf: add `sortCompileUnits` along with a field to track
  the state for the purpose of assertions and correct API usage.
  This makes batch lookups faster.
  - in the future, findCompileUnit should be enhanced to rely on sorted
    compile units as well.
* implement `std.debug.Dwarf.resolveSourceLocations` as well as
  `std.debug.Info.resolveSourceLocations`. It's still pretty slow, since
  it calls getLineNumberInfo for each array element, repeating a lot of
  work unnecessarily.
* integrate these APIs with `std.Progress` to understand what is taking
  so long.

The output I'm seeing from this tool shows a lot of missing source
locations. In particular, the main area of interest is missing for my
tokenizer fuzzing example.

```

## Parents

- [2e12b45d8b43d69e144887df4b04a2d383ff25d4](https://git.cafe/gitcafe/zig/commit/2e12b45d8b43d69e144887df4b04a2d383ff25d4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/de47acd732dca8b4d2f2b3559307f488ccac940d?format=markdown)
