diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-02-16 22:47:59 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-03-12 11:14:34 +0000 |
| commit | c35c26ec6312219507c518bae2e56c1ea46a5f36 (patch) | |
| tree | ce5b570187b5720857d7d1d38c4c399354f394bc /pkg/fuzzer/stats.go | |
| parent | 5d97b658d9c2ec0cd68e5632ce7f11bfe5d6c282 (diff) | |
pkg/fuzzer: factor out the fuzzing engine
This is the first step for #1541.
Move the fuzzing engine that used to be interleaved with other syz-fuzzer
code into a separate package.
For now, the algorithm is more or less the same as it was, the only
difference is that a pkg/fuzzer instance scales to the available
computing power.
Add an executor-based test that performs real fuzzing.
Diffstat (limited to 'pkg/fuzzer/stats.go')
| -rw-r--r-- | pkg/fuzzer/stats.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkg/fuzzer/stats.go b/pkg/fuzzer/stats.go new file mode 100644 index 000000000..17bc6131c --- /dev/null +++ b/pkg/fuzzer/stats.go @@ -0,0 +1,26 @@ +// Copyright 2024 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package fuzzer + +const ( + statGenerate = "exec gen" + statFuzz = "exec fuzz" + statCandidate = "exec candidate" + statTriage = "exec triage" + statMinimize = "exec minimize" + statSmash = "exec smash" + statHint = "exec hints" + statSeed = "exec seeds" + statCollide = "exec collide" + statExecTotal = "exec total" + statBufferTooSmall = "buffer too small" +) + +func (fuzzer *Fuzzer) GrabStats() map[string]uint64 { + fuzzer.mu.Lock() + defer fuzzer.mu.Unlock() + ret := fuzzer.stats + fuzzer.stats = map[string]uint64{} + return ret +} |
