-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
June 2021 status? #4
Comments
I just checked and it looks like I started a version4 fix:
This was feb 2018, so I don't know how many trace versions have been released since then. It looks like this is the last trace version I supported: // encodeHeader will encode a valid trace version object into a well formed
// trace header.
-func encodeHeader(w io.Writer, v Version) (err error) {
+func encodeHeader(w io.Writer, v event.Version) (err error) {
var n int
switch v {
- case Version1:
+ case event.Version1:
n, err = w.Write([]byte("go 1.5 trace\x00\x00\x00\x00"))
- case Version2:
+ case event.Version2:
n, err = w.Write([]byte("go 1.7 trace\x00\x00\x00\x00"))
- case Version3:
+ case event.Version3:
n, err = w.Write([]byte("go 1.8 trace\x00\x00\x00\x00"))
+ case event.Version4:
+ n, err = w.Write([]byte("go 1.9 trace\x00\x00\x00\x00"))
+ default:
+ err = errors.New(`trace header version was invalid`)
}
if err == nil && n != 16 {
err = io.ErrShortWrite Looks like this "Version4" (go ver 1.9) had the same frame size and arg offset as the previous version, with only two new events: schema{"EvGCMarkAssistStart", Version4, []string{ArgTimestamp, ArgStackID}},
schema{"EvGCMarkAssistDone", Version4, []string{ArgTimestamp}}, Checking out the current runtime, there are only a few more: traceEvUserTaskCreate = 45 // trace.NewContext [timestamp, internal task id, internal parent task id, stack, name string]
traceEvUserTaskEnd = 46 // end of a task [timestamp, internal task id, stack]
traceEvUserRegion = 47 // trace.WithRegion [timestamp, internal task id, mode(0:start, 1:end), stack, name string]
traceEvUserLog = 48 // trace.Log [timestamp, internal task id, key string id, stack, value string] I'm not familiar with the trace.NewContext API, but these could potentially be fairly straight forward to add on. I imagine I started this work one weekend but couldn't finish and got busy at my day job, I could commit it for you but it is definitely incomplete. It appears I mixed it up with some refactoring as well >_< as it comes in at around 7K loc. Let me know if you want to take a stab at it, I'll add ya to repo. |
Is
go-trace
still a thing even though we're up to 1.16 now? If this package is no longer maintained, is it already out-of-date? If so, is there an alternative package somewhere which has similar-ish functionality?The text was updated successfully, but these errors were encountered: