Skip to content

runtime/coverage: Support set mode #75288

@r-hang

Description

@r-hang

Go's coverageredesign in a non unit set setting enforces that the program be instrumented in atomic coverage mode.
-

return fmt.Errorf("WriteCountersDir invoked for program built with -covermode=%s (please use -covermode=atomic)", cmode.String())

Can we support set mode and provide performance estimates for for atomic mode? https://go.dev/blog/cover states that set mode can incur ~3% overhead.

One possible application of this feature is the deployment coverage instrumented binaries in production in order to detect and remove unused code. Atomic mode is prohibitively expensive to do on some production workloads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions