Applied in changeset commit:git|6e9bc8ee97075689e5a9ce58b0ee21a5854ec189. ---------- Add ruby_debug_* symbol aliases for external profilers Out-of-process profilers, such as the OpenTelemetry eBPF profiler, need ruby_current_ec to find...dalehamel (Dale Hamel)
Out-of-process profilers, such as the OpenTelemetry eBPF profiler, need ruby_current_ec to find the Ruby stack, the address range of rb_vm_exec to hand off from native to Ruby frames, and ruby_global_symbols to name methods implemented i...dalehamel (Dale Hamel)
Eregon (Benoit Daloze) wrote in #note-12: > @dalehamel Could you update the dev-meeting summary at https://bugs.ruby-lang.org/issues/22417#note-2 to reflect the latest patch? > ... Thanks for the guidance, I updated the comment and ope...dalehamel (Dale Hamel)
> The profiler has to access it during the VM is locked? No. The profiler only reads `ruby_global_symbols`, and it doesn't need the VM lock (which an external process couldn't take anyway). It is used to name methods implemented ...dalehamel (Dale Hamel)
## Summary Exporting the three symbols had no measurable cost on ruby-bench's `lobsters`, with or without ZJIT, on x86-64 or arm64. With default visibility, though, GCC compiles `vm.c` differently, which can move interpreter microbenc...dalehamel (Dale Hamel)
* [Feature #21539] Export symbols for external profiling of stripped shared Ruby builds (dalehamel) * External profilers need `ruby_current_ec`, `rb_vm_exec`, and `ruby_global_symbols`, which are lost when distributions strip libruby. ...dalehamel (Dale Hamel)
## Motivation External profilers such as [OpenTelemetry's eBPF profiler](https://github.com/open-telemetry/opentelemetry-ebpf-profiler) collect Ruby stacks from outside the Ruby process. Distribution packages commonly ship shared l...dalehamel (Dale Hamel)
> does this suffice your use case? Interesting, I'll need to investigate this - it certainly has potential. My use case is for experimental tracing work, and I basically want to be able to pre-compile original source with added in...dalehamel (Dale Hamel)