Skip to content

Ensure code is not invalidated when a TracePoint :class event is enabled #2371

Open
@eregon

Description

@eregon

See https://twitter.com/eregontp/status/1400446685113774088
and https://bugs.ruby-lang.org/issues/17881

On TruffleRuby, code compiles fine whether there are TracePoint or not, but enabling or disabling a TracePoint causes invalidations & recompilations.
For the :class event, there is no need to invalidate and we can just always check explicitly if there is an active :class TracePoint on module/class Foo since that's slow path anyway.

The :class event is used by Zeitwerk.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions