diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-10-20 12:05:13 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-23 09:59:39 +0200 |
| commit | 54ae9c6db3587bd1db98d3c0b6d751bbbda43a60 (patch) | |
| tree | b958fb38f6d90fb099359e6743d1545cac04b940 /tools | |
| parent | 4f9fc95501bebe08ba8977582c055c9068c2c08f (diff) | |
tools/syz-execprog: print total number of comps/hints
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-execprog/execprog.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index ff85f4032..9a9a1b48a 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -178,11 +178,27 @@ func main() { } if *flagHints { compMaps := ipc.GetCompMaps(info) + ncomps, ncandidates := 0, 0 + for _, comps := range compMaps { + for v, args := range comps { + ncomps += len(args) + if *flagOutput == "stdout" { + fmt.Printf("comp 0x%x:", v) + for arg := range args { + fmt.Printf(" 0x%x", arg) + } + fmt.Printf("\n") + } + } + } p.MutateWithHints(compMaps, func(p *prog.Prog) { - fmt.Printf("%v\n", string(p.Serialize())) + ncandidates++ + if *flagOutput == "stdout" { + fmt.Printf("PROGRAM:\n%s\n", p.Serialize()) + } }) + fmt.Printf("ncomps=%v ncandidates=%v\n", ncomps, ncandidates) } - return true }() { return |
