]> Cypherpunks repositories - gostls13.git/commit
runtime/coverage: runtime routines to emit coverage data
authorThan McIntosh <thanm@google.com>
Mon, 11 Oct 2021 11:34:20 +0000 (07:34 -0400)
committerThan McIntosh <thanm@google.com>
Wed, 28 Sep 2022 11:48:10 +0000 (11:48 +0000)
commit87db4ffadac291bc878cb892e05601610ca68ef5
treef4695950a3146f016640d1916753aeff429c86af
parent7a74829858bbc2fdf8b2d8902f7df46935cf6be9
runtime/coverage: runtime routines to emit coverage data

This patch fleshes out the runtime support for emitting coverage data
at the end of a run of an instrumented binary. Data is emitted in the
form of a pair of files, a meta-out-file and counter-data-outfile,
each written to the dir GOCOVERDIR. The meta-out-file is emitted only
if required; no need to emit again if an existing meta-data file with
the same hash and length is present.

Updates #51430.

Change-Id: I59d20a4b8c05910c933ee29527972f8e401b1685
Reviewed-on: https://go-review.googlesource.com/c/go/+/355451
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
src/cmd/go/internal/work/gc.go
src/go/build/deps_test.go
src/internal/coverage/rtcov/rtcov.go
src/runtime/coverage/dummy.s [new file with mode: 0644]
src/runtime/coverage/emit.go [new file with mode: 0644]
src/runtime/coverage/hooks.go [new file with mode: 0644]
src/runtime/coverage/testsupport.go [new file with mode: 0644]
src/runtime/covercounter.go [new file with mode: 0644]
src/runtime/covermeta.go