summaryrefslogtreecommitdiff
path: root/src/internal/coverage/stringtab/stringtab.go
Commit message (Collapse)AuthorAgeFilesLines
* internal/coverage: minor code cleanupsThan McIntosh2022-10-111-1/+1
| | | | | | | | Delete some unused code, various cleanups to fix staticcheck warnings. Change-Id: Ie475d57735a83351a4977f0dd4bc1387ce06a20e Reviewed-on: https://go-review.googlesource.com/c/go/+/441935 Reviewed-by: David Chase <drchase@google.com>
* internal/coverage: add apis for reading/writing counter dataThan McIntosh2022-09-261-9/+26
| | | | | | | | | | | | | | | | | | | | Add utilities for reading and writing of counter data files as part of the new code coverage implementation. Trivia note: currently the contents of counter data files are emitted in little-endian form, which for the counters is somewhat painful in that we need to visit each counter value and properly encode it. It might be better to instead emit counters in native endianity and then teach the tools to decode properly in the case of an endianity mismatch. Updates #51430. Change-Id: I124fdcb40fc339a48b64b35264bf24c3be50ddd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/359403 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Than McIntosh <thanm@google.com>
* internal/coverage: add coverage meta-data decoderThan McIntosh2022-09-261-2/+35
| | | | | | | | | | | | | | | | | Add a coverage meta-data decoder, which provides APIs for reading encoded coverage meta-data and expanding it usable form. This package is intended to be used in the coverage tooling that reads data files emitted from coverage runs. Along with the new decoding package is a unit test that runs the encode/decode paths together to check to make sure that "decode(encode(X)) == X". Updates #51430. Change-Id: I81d27d8da0b2fcfa5039114a6e35a4b463d19b3c Reviewed-on: https://go-review.googlesource.com/c/go/+/353454 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
* internal/coverage: add coverage meta-data encoderThan McIntosh2022-09-261-0/+89
Add a new package with APIs for encoding coverage meta-data. This provides support for accumulating information about each function during the compilation process, and then encoding and emitting a payload for a coverage meta-data symbol. Not yet connected to the rest of the coverage machinery (that will appear in a later patch). Updates #51430. Change-Id: I61054ce87f205b25fb1bfedaa740fd7425c34de4 Reviewed-on: https://go-review.googlesource.com/c/go/+/353453 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>