diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-11-19 16:42:32 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-11-20 11:33:58 +0000 |
| commit | f56b4dcc82d7af38bf94d643c5750cf49a91a297 (patch) | |
| tree | 19b2ea6bfcbf61ab7287d420f39c45432bd9b4cc /pkg/fuzzer/stats.go | |
| parent | 7d02db5adbb376babbbd3199f8c530e468292727 (diff) | |
pkg/manager: show number of times coverage for each call has overflowed
If the overflows happen often, it's bad.
Add visibility into this.
Diffstat (limited to 'pkg/fuzzer/stats.go')
| -rw-r--r-- | pkg/fuzzer/stats.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/pkg/fuzzer/stats.go b/pkg/fuzzer/stats.go index 7990f8b13..40c71d309 100644 --- a/pkg/fuzzer/stats.go +++ b/pkg/fuzzer/stats.go @@ -3,9 +3,17 @@ package fuzzer -import "github.com/google/syzkaller/pkg/stat" +import ( + "sync/atomic" + + "github.com/google/syzkaller/pkg/stat" + "github.com/google/syzkaller/prog" +) type Stats struct { + // Indexed by prog.Syscall.ID + the last element for extra/remote. + Syscalls []SyscallStats + statCandidates *stat.Val statNewInputs *stat.Val statJobs *stat.Val @@ -27,8 +35,16 @@ type Stats struct { statExecCollide *stat.Val } -func newStats() Stats { +type SyscallStats struct { + // Number of times coverage buffer for this syscall has overflowed. + CoverOverflows atomic.Uint64 + // Number of times comparisons buffer for this syscall has overflowed. + CompsOverflows atomic.Uint64 +} + +func newStats(target *prog.Target) Stats { return Stats{ + Syscalls: make([]SyscallStats, len(target.Syscalls)+1), statCandidates: stat.New("candidates", "Number of candidate programs in triage queue", stat.Console, stat.Graph("corpus")), statNewInputs: stat.New("new inputs", "Potential untriaged corpus candidates", |
