Skip to content

NamedRegionTimer is not thread safe #44417

Open
@llvmbot

Description

@llvmbot
Bugzilla Link 45072
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

The NamedRegionTimer obtains a timer instance from NamedRegionTimers global,
which keeps a single timer per timer name and timer group name. Those names are
generally constants and a single timer might end up being used from multiple
threads:

Assertion `!Running && "Cannot start a running timer"' failed.

This affects rustc -Z time-llvm-passes when compiling with multiple codegen units.

Downstream bug reports:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillallvmUmbrella label for LLVM issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions