aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/fuzzer/queue/queue.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-29 11:28:03 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-06-03 15:04:36 +0000
commit2addfcda6297288cd48c399dfbef1f5752162011 (patch)
tree30a7d6f2f7d3bea992ebe1c38e698d1862ec44be /pkg/fuzzer/queue/queue.go
parentf0e94da92f1381e56ecd1c28575aaac54cdfc79d (diff)
syz-manager: add corpus triage mode
Add corpus triage mode and support it in testbed. This is useful to benchmark just the triage phase w/o any subsequent fuzzing. First, fuzzing is more random. Second, if triage duration is different in different versions, then they will do different amount of fuzzing in fixed testbed time.
Diffstat (limited to 'pkg/fuzzer/queue/queue.go')
-rw-r--r--pkg/fuzzer/queue/queue.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/pkg/fuzzer/queue/queue.go b/pkg/fuzzer/queue/queue.go
index a9411c1bd..cb70f5a9b 100644
--- a/pkg/fuzzer/queue/queue.go
+++ b/pkg/fuzzer/queue/queue.go
@@ -173,7 +173,6 @@ type Source interface {
// PlainQueue is a straighforward thread-safe Request queue implementation.
type PlainQueue struct {
- stat *stats.Val
mu sync.Mutex
queue []*Request
pos int
@@ -183,10 +182,6 @@ func Plain() *PlainQueue {
return &PlainQueue{}
}
-func PlainWithStat(val *stats.Val) *PlainQueue {
- return &PlainQueue{stat: val}
-}
-
func (pq *PlainQueue) Len() int {
pq.mu.Lock()
defer pq.mu.Unlock()
@@ -194,9 +189,6 @@ func (pq *PlainQueue) Len() int {
}
func (pq *PlainQueue) Submit(req *Request) {
- if pq.stat != nil {
- pq.stat.Add(1)
- }
pq.mu.Lock()
defer pq.mu.Unlock()
@@ -235,9 +227,6 @@ func (pq *PlainQueue) nextLocked() *Request {
ret := pq.queue[pq.pos]
pq.queue[pq.pos] = nil
pq.pos++
- if pq.stat != nil {
- pq.stat.Add(-1)
- }
return ret
}