News for hackers. Stuff that matters.
Re:More powerful Go execution traces by Veserv on Thursday March 14, 2024 @07:44PM (#39710377)
The usage of the term execution trace really threw me off. I am more familiar with that term meaning a instruction execution trace or maybe just a function trace, so it made no sense why stack unwinding would be a bottleneck. Turns out it is actually a goroutine event (with stack trace at time of event) trace [1]. I guess Go does not have a code execution trace package?

[1] https://pkg.go.dev/runtime/trace

Re:More powerful Go execution traces by Thaxll on Thursday March 14, 2024 @08:06PM (#39710544)
Tracing code is a way to see what's happening in your code which Go provides:

https://www.infoq.com/articles/debugging-go-programs-pprof-t...

Many other language use the same technique, see Python with: https://github.com/bloomberg/memray

Re:More powerful Go execution traces by Veserv on Thursday March 14, 2024 @08:22PM (#39710658)
I was talking about execution tracing, specifically, not tracing as a general concept. Tracing as a general concept just means a non-sampled time-series event stream and as commonly used these days generally also includes "stacking" to distinguish it from generic event streams or logging.

When you add a additional term like "execution" you are specializing the term to mean a event stream of "execution". In areas I am familiar with, that would normally mean a trace of the complete execution of the program down to the instruction-level so you can trace the precise "execution" of the program through the code.

What is described here would, in the terminology I am familiar with, be more like... a thread status and system event trace just applied to goroutines and the Go runtime, respectively, I guess? It does also include the stack trace at the time of the event, so it does have more data than that, but that is qualitatively different than a instruction execution trace that allows you to trace the exact sequence of execution of your program.

Re:More powerful Go execution traces by felixge on Friday March 15, 2024 @03:29AM (#39712937)
Go doesn't have an instruction (execution) or function call tracer. Go's tracer is primarily tracing scheduler events. So maybe the term scheduler tracer should have been used?

Anyway, using the term "execution tracer" in Go goes back to the initial design doc from 2014: https://docs.google.com/document/u/1/d/1FP5apqzBgr7ahCCgFO-y...