mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.fuzz] internal/fuzz: add additional debug logging
When GODEBUG=fuzzdebug=1, log additional debug level information about what the fuzzer is doing. This provides useful information for investigating the operation and performance of the fuzzing engine, and is necessary for profiling new fuzzing strategies. Change-Id: Ic3e24e7a128781377e62785767a218811c3c2030 Reviewed-on: https://go-review.googlesource.com/c/go/+/324972 Trust: Roland Shoemaker <roland@golang.org> Trust: Katie Hockman <katie@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
This commit is contained in:
parent
542e8c74e7
commit
2c98915ac7
5 changed files with 102 additions and 21 deletions
|
|
@ -45,6 +45,16 @@ func SnapshotCoverage() {
|
|||
copy(coverageSnapshot, cov)
|
||||
}
|
||||
|
||||
func countEdges(cov []byte) int {
|
||||
n := 0
|
||||
for _, c := range cov {
|
||||
if c > 0 {
|
||||
n++
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
var coverageSnapshot []byte
|
||||
|
||||
// _counters and _ecounters mark the start and end, respectively, of where
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue