Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

havlak3

  • Loading branch information
rsc committed Feb 3, 2017
1 parent 58ac27b commit b78dac106bea1eb3be6bb3ca5dba57c130268232
Showing with 10 additions and 0 deletions.
  1. +10 −0 havlak/havlak.go
@@ -671,6 +671,7 @@ func buildBaseLoop(cfgraph *CFG, from int) int {
}

var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to this file")
var memprofile = flag.String("memprofile", "", "write memory profile to this file")

func main() {
flag.Parse()
@@ -716,6 +717,15 @@ func main() {
}

FindHavlakLoops(cfgraph, lsgraph)
if *memprofile != "" {
f, err := os.Create(*memprofile)
if err != nil {
log.Fatal(err)
}
pprof.WriteHeapProfile(f)
f.Close()
return
}

for i := 0; i < 50; i++ {
FindHavlakLoops(cfgraph, NewLSG())

0 comments on commit b78dac1

Please sign in to comment.
You can’t perform that action at this time.