Support for v1.23 trace file
bronze1man opened this issue · 3 comments
bronze1man commented

my source code to get trace file
package main
import (
"os"
"runtime/trace"
"net/http"
)
func main(){
os.Setenv("GODEBUG", "traceallocfree=1")
f,err:=os.Create("./tmp/1.trace")
if err!=nil{
panic(err)
}
trace.Start(f)
defer trace.Stop()
toTrace()
}
func toTrace(){
resp,err:=http.Get("https://www.google.com")
_ = resp
_ = err
}
bronze1man commented
honnef.co/go/gotraceui v0.4.0 not working
go install honnef.co/go/gotraceui/cmd/gotraceui@latest
go: downloading honnef.co/go/gotraceui v0.4.0
go: downloading gioui.org v0.4.1
go: downloading gioui.org/x v0.4.0
go: downloading golang.org/x/text v0.9.0
go: downloading github.com/go-text/typesetting v0.0.0-20230803102845-24e03d8b5372
go: downloading golang.org/x/image v0.7.0
go: downloading gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2
go: downloading gioui.org/shader v1.0.8
go: downloading golang.org/x/exp/shiny v0.0.0-20220827204233-334a2380cb91
# honnef.co/go/gotraceui/cmd/gotraceui
ld: warning: ignoring duplicate libraries: '-lobjc'
bronze1man commented
honnef.co/go/gotraceui v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0 not working with different error:
go install honnef.co/go/gotraceui/cmd/gotraceui@master
go: downloading honnef.co/go/gotraceui v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0
go: downloading golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8
# honnef.co/go/gotraceui/cmd/gotraceui
ld: warning: ignoring duplicate libraries: '-lobjc'
~/go/bin/gotraceui ./tmp/1.trace
panic: unhandled kind Experimental
goroutine 6 [running]:
honnef.co/go/gotraceui/trace/ptrace.processEvents(0xc0007a40d0, 0xc000220120, 0x0?)
/Users/a/go/pkg/mod/honnef.co/go/gotraceui@v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0/trace/ptrace/ptrace.go:903 +0x57df
honnef.co/go/gotraceui/trace/ptrace.Parse(0xc0007a40d0, 0xc0000120a8)
/Users/a/go/pkg/mod/honnef.co/go/gotraceui@v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0/trace/ptrace/ptrace.go:386 +0x25b
main.loadTrace({_, _}, {_, _}, _)
/Users/a/go/pkg/mod/honnef.co/go/gotraceui@v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0/cmd/gotraceui/main.go:1474 +0x1d2
main.(*MainWindow).OpenTrace(0xc0001c0008, {0x1012de2c8, 0xc00072a018})
/Users/a/go/pkg/mod/honnef.co/go/gotraceui@v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0/cmd/gotraceui/main.go:373 +0x105
main.openTraceFromCmdline.func1()
/Users/a/go/pkg/mod/honnef.co/go/gotraceui@v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0/cmd/gotraceui/main.go:1284 +0x4e
created by main.openTraceFromCmdline in goroutine 1
/Users/a/go/pkg/mod/honnef.co/go/gotraceui@v0.5.0-0.dev.0.20240707115136-a47c61fbb6d0/cmd/gotraceui/main.go:1282 +0x1b3