From 2addfcda6297288cd48c399dfbef1f5752162011 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 29 May 2024 11:28:03 +0200 Subject: 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. --- pkg/fuzzer/queue/queue.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'pkg/fuzzer/queue/queue.go') 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 } -- cgit mrf-deployment