Skip to content

runtime: lost non-Go profiling samples are overcounted #21836

@aclements

Description

@aclements

cpuProfile.addExtra is called from the Go profiling signal handler to flush any accumulated non-Go profiling samples. If we lost any non-Go profiling samples, it flushes this as a special _LostExternalCode sample. However, it fails to reset the lost sample count, so every subsequent addExtra call will record another _LostExternalCode sample.

This fix should be as simple as setting p.lostExtra to 0, but this should get back-ported to 1.9.1.

/cc @ianlancetaylor @matloob

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions