summaryrefslogtreecommitdiff
path: root/mjit.h
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-09-06 12:33:51 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2022-09-06 15:45:10 +0900
commit5b3bd91fcba7224e9ece54c862dc96461cf4bf79 (patch)
treec5d0e51cd54b18cb9045b746113bb65e3b89262a /mjit.h
parentf6925fab853ffc1872038f33d93e4e5c5379b4db (diff)
Add an option to lazily boot MJIT for experiments
You may use `RUBYOPT=--mjit=pause irb` to play with RubyVM::MJIT::C, control the boot timing of MJIT, or customize the implementation while paused. It's an undocumented feature for such experiments.
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/mjit.h b/mjit.h
index 55b9fbcfcd..130ab5abae 100644
--- a/mjit.h
+++ b/mjit.h
@@ -49,7 +49,7 @@ struct mjit_options {
bool debug;
// Add arbitrary cflags.
char* debug_flags;
- // If not 0, all ISeqs are synchronously compiled. For testing.
+ // If true, all ISeqs are synchronously compiled. For testing.
bool wait;
// Number of calls to trigger JIT compilation. For testing.
unsigned int min_calls;
@@ -59,6 +59,8 @@ struct mjit_options {
// Maximal permitted number of iseq JIT codes in a MJIT memory
// cache.
int max_cache_size;
+ // [experimental] If true, do not start MJIT until MJIT.resume is called.
+ bool pause;
};
// State of optimization switches