A Dynamic Tracing framework for R
R-dyntrace is a dynamic tracing framework for R. It is a modified GNU R Virtual Machine that exposes the interpreter internals through probes. Callbacks attached to these probes are called with the relevant interpreter state when the corresponding probes get triggered.
It is recommended to build this project locally and not install it system-wide. To download and compile version 3.5.0:
git clone --branch r-3.5.0 https://github.com/PRL-PRG/R-dyntrace.git
cd R-dyntrace
./configure --enable-R-shlib --with-blas --with-lapack --with-included-gettext --disable-byte-compiled-packages
make -j
Version | Source | Status |
---|---|---|
R-3.5.0 | R-3.5.0 | |
R-3.5.1 | R-3.5.1 | |
R-3.5.2 | R-3.5.2 | |
R-3.5.3 | R-3.5.3 | |
R-3.6.0 | R-3.6.0 | |
R-3.6.1 | R-3.6.1 |
The framework supports the following probes.
Event | Probe |
---|---|
Tracing entry | dyntrace_entry(expression, environment) |
Tracing exit | dyntrace_exit(expression, environment, result, error) |
Event | Probe |
---|---|
Closure entry | closure_entry(call, op, rho) |
Closure exit | closure_exit(call, op, rho, retval) |
Builtin entry | builtin_entry(call, op, rho) |
Builtin exit | builtin_exit(call, op, rho, retval) |
Special entry | special_entry(call, op, rho) |
Special exit | special_exit(call, op, rho, retval) |
Event | Probe |
---|---|
Promise force entry | promise_force_entry(promise) |
Promise force exit | promise_force_exit(promise) |
Promise value lookup | promise_value_lookup(promise) |
Promise value assign | promise_value_assign(promise, value) |
Promise expression lookup | promise_expression_lookup(promise) |
Promise expression assign | promise_expression_assign(promise, expression) |
Promise environment lookup | promise_environment_lookup(promise) |
Promise environment assign | promise_environment_assign(promise, environment) |
Event | Probe |
---|---|
Eval entry | eval_entry(expression, rho) |
Eval exit | eval_exit(expression, rho, return_value) |
Event | Probe |
---|---|
GC entry | gc_entry(size_needed) |
GC exit | gc_exit(gc_count) |
GC unmark | gc_unmark(object) |
GC allocate | gc_allocate(object) |
Event | Probe |
---|---|
Context entry | context_entry(context) |
Context exit | context_exit(context) |
Context jump | context_jump(context, return_value, restart) |
Event | Probe |
---|---|
S3 entry | S3_generic_entry(generic, object) |
S3 exit | S3_generic_exit(generic, object, retval) |
S3 dispatch entry | S3_dispatch_entry(generic, cls, method, object) |
S3 dispatch exit | S3_dispatch_exit(generic, cls, method, object, retval) |
Event | Probe |
---|---|
Variable definition | environment_variable_define(symbol, value, rho) |
Variable assignment | environment_variable_assign(symbol, value, rho) |
Variable removal | environment_variable_remove(symbol, rho) |
Variable lookup | environment_variable_lookup(symbol, value, rho) |
Variable existence | environment_variable_exists(symbol, rho) |