Skip to content

runtime/trace, x/exp/trace: explicitly encode end of trace and surface it in parser #73904

Open
@dominikh

Description

@dominikh

A common source of bad traces is user error, specifically not calling trace.Stop, or not waiting for the call to finish before exiting the process. Such traces already lead to parse errors, but it's difficult to tell if a parse error is due to a bug in the trace writer, the parser, or said user error. If we had a marker or footer of sorts at the very end of the trace, its absence would be a strong indicator of user error.

On Slack, @mknyszek told me that the flight recorder added an "end of generation" event, but that this is currently not exposed in the final file or the parser, and that it could be used for this purpose.

Metadata

Metadata

Assignees

Labels

FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions