-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
The current README states:
Current approach: TracePoint API
Currently we're using the [TracePoint API](https://rubyapi.org/3.4/o/tracepoint). This is very flexible and can function with probably multiple Ruby versions out of the box. However, this is limited:
it's not optimal
it can't track more detailed info/state, needed for some CodeTracer features(or for more optimal replays).
For other languages, we've used a more deeply integrated approach: patching the interpreter or VM itself (e.g. Noir).
Possible Alternative Approaches
Create a C extension for the VM, based on the rb_add_event_hook2
This would be a straight-forward port of the current code, but developed as a native extension (e.g. in C/C++ or Rust). The expected speedup will be significant.
Examining the source code of the native recorder, written in Rust lead to the discovery that we're already using the undocumented rb_add_event_hook2() API function, mentioned as "Possible Alternative Approaches", with the undocumented RUBY_EVENT_HOOK_FLAG_RAW_ARG parameter. I'm not sure about the "Pure" Ruby recorder, though. This still needs to be checked, but the documentation needs to be updated.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation