Open
Description
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.