github.com/ks888/tgo@v0.0.0-20190130135156-80bf89407292/testutils/testdata/startOnly.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/ks888/tgo/lib/tracer"
     7  )
     8  
     9  func tracedFunc() {
    10  	// do not change this order. Test the case in which the tracing point is same as the call-inst breakpoint.
    11  	tracer.Start()
    12  	f()
    13  }
    14  
    15  //go:noinline
    16  func f() {
    17  }
    18  
    19  func main() {
    20  	tracedFunc()
    21  
    22  	fmt.Println("not traced")
    23  }