Skip to content

proposal: runtime: expose goid and gopc in GoroutineProfile #59663

@vaind

Description

@vaind

While investigating runtime.GoroutineProfile() for profiling (sampling), I've noticed the resulting StackRecord is missing any way to identify a Goroutine across collected samples. Actual copy of goid and gopc from g could happen in saveg() to StackRecord, but I'm not sure that's the best idea, considering, StackRecord is also used in a couple of other places where it wouldn't make sense to add these fields. Also, it wouldn't be a generic StackRecord then...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Declined

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions