[前][次][番号順一覧][スレッド一覧]

ruby-changes:69241

From: Noah <ko1@a...>
Date: Thu, 21 Oct 2021 08:24:20 +0900 (JST)
Subject: [ruby-changes:69241] fab469b678 (master): Document YJIT options in --help

https://git.ruby-lang.org/ruby.git/commit/?id=fab469b678

From fab469b6787220648f6c5bb8104f9a1246d9eadd Mon Sep 17 00:00:00 2001
From: Noah Gibbs <noah.gibbs@s...>
Date: Mon, 4 Oct 2021 13:52:01 +0100
Subject: Document YJIT options in --help

---
 ruby.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/ruby.c b/ruby.c
index e87e6f46ea..648720c4ed 100644
--- a/ruby.c
+++ b/ruby.c
@@ -350,6 +350,15 @@ usage(const char *name, int help, int highlight, int columns) https://github.com/ruby/ruby/blob/trunk/ruby.c#L350
         M("--jit-max-cache=num", "", "Max number of methods to be JIT-ed in a cache (default: 100)"),
         M("--jit-min-calls=num", "", "Number of calls to trigger JIT (for testing, default: 10000)"),
     };
+    static const struct message yjit_options[] = {
+#if RUBY_DEBUG
+        M("--yjit-stats",             "", "Enable collecting YJIT statistics"),
+#endif
+        M("--yjit-exec-mem-size=num", "", "Size of executable memory block in MiB (default: 256)"),
+        M("--yjit-call-threshold",    "", "Number of calls to trigger JIT (default: 10)"),
+        M("--yjit-max-versions",      "", "Maximum number of versions to generate per basic block (default: 4)"),
+        M("--yjit-greedy-versioning", "", "Greedy versioning mode, may increase code size (default: disabled)"),
+    };
     int i;
     const char *sb = highlight ? esc_standout+1 : esc_none;
     const char *se = highlight ? esc_reset : esc_none;
@@ -376,9 +385,12 @@ usage(const char *name, int help, int highlight, int columns) https://github.com/ruby/ruby/blob/trunk/ruby.c#L385
     printf("%s""Warning categories:%s\n", sb, se);
     for (i = 0; i < numberof(warn_categories); ++i)
 	SHOW(warn_categories[i]);
-    printf("%s""JIT options (experimental):%s\n", sb, se);
+    printf("%s""MJIT options (experimental):%s\n", sb, se);
     for (i = 0; i < numberof(mjit_options); ++i)
-	SHOW(mjit_options[i]);
+    SHOW(mjit_options[i]);
+    printf("%s""YJIT options (experimental):%s\n", sb, se);
+    for (i = 0; i < numberof(yjit_options); ++i)
+    SHOW(yjit_options[i]);
 }
 
 #define rubylib_path_new rb_str_new
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]