summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorAdam Hess <HParker@github.com>2023-04-13 07:07:07 -0700
committerGitHub <noreply@github.com>2023-04-13 10:07:07 -0400
commit854baee2c936006d7f38ebb27ee577c00afc6249 (patch)
treec5bb8bf804adccc29a1af4065c62365dba9445c4 /ruby.c
parent02a7e12b80823919fb614ad3ea6241d5115d14fe (diff)
downloadruby-854baee2c936006d7f38ebb27ee577c00afc6249.tar.gz
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>
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ruby.c b/ruby.c
index 17a9ba68ac..b3a1c23712 100644
--- a/ruby.c
+++ b/ruby.c
@@ -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