diff options
author | Adam Hess <HParker@github.com> | 2023-04-13 07:07:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 10:07:07 -0400 |
commit | 854baee2c936006d7f38ebb27ee577c00afc6249 (patch) | |
tree | c5bb8bf804adccc29a1af4065c62365dba9445c4 /ruby.c | |
parent | 02a7e12b80823919fb614ad3ea6241d5115d14fe (diff) |
YJIT: Add a sampling option to exit tracing (#7693)
Add a sampling option to trace exits
Running YJIT with trace exits enabled can make very large metrics files.
This allows us to configure a sample rate to make tracing exits possible
on larger tests. This also updates the documented YJIT options.
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -334,11 +334,13 @@ usage(const char *name, int help, int highlight, int columns) }; #if USE_YJIT static const struct ruby_opt_message yjit_options[] = { - M("--yjit-stats", "", "Enable collecting YJIT statistics"), - M("--yjit-exec-mem-size=num", "", "Size of executable memory block in MiB (default: 64)"), - M("--yjit-call-threshold=num", "", "Number of calls to trigger JIT (default: 30)"), - M("--yjit-max-versions=num", "", "Maximum number of versions per basic block (default: 4)"), - M("--yjit-greedy-versioning", "", "Greedy versioning mode (default: disabled)"), + M("--yjit-stats", "", "Enable collecting YJIT statistics"), + M("--yjit-trace-exits", "", "Record Ruby source location when exiting from generated code"), + M("--yjit-trace-exits-sample-rate", "", "Trace exit locations only every Nth occurrence"), + M("--yjit-exec-mem-size=num", "", "Size of executable memory block in MiB (default: 64)"), + M("--yjit-call-threshold=num", "", "Number of calls to trigger JIT (default: 30)"), + M("--yjit-max-versions=num", "", "Maximum number of versions per basic block (default: 4)"), + M("--yjit-greedy-versioning", "", "Greedy versioning mode (default: disabled)"), }; #endif #if USE_RJIT |