tools/syz-cover: add cmdprof profiling

Update #2006
This commit is contained in:
Dmitry Vyukov 2020-09-22 14:19:46 +02:00
parent 06cecac317
commit f0a967b9bd

View File

@ -28,6 +28,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/google/syzkaller/pkg/cmdprof"
"github.com/google/syzkaller/pkg/cover" "github.com/google/syzkaller/pkg/cover"
"github.com/google/syzkaller/pkg/osutil" "github.com/google/syzkaller/pkg/osutil"
"github.com/google/syzkaller/sys/targets" "github.com/google/syzkaller/sys/targets"
@ -43,6 +44,7 @@ func main() {
flagExport = flag.String("csv", "", "export coverage data in csv format (optional)") flagExport = flag.String("csv", "", "export coverage data in csv format (optional)")
) )
flag.Parse() flag.Parse()
defer cmdprof.Install()()
if len(flag.Args()) == 0 { if len(flag.Args()) == 0 {
fmt.Fprintf(os.Stderr, "usage: syz-cover [flags] rawcover.file\n") fmt.Fprintf(os.Stderr, "usage: syz-cover [flags] rawcover.file\n")