diff options
author | Takashi Kokubun <[email protected]> | 2022-12-26 22:46:40 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:11:20 -0800 |
commit | 9f8f1afba2572ead6ce5a8ca456cb9cabf094c98 (patch) | |
tree | 681863fd3b2bb86aba063e6bfffe361b7ddaf8cb /mjit_c.c | |
parent | 5ab8cf3f0d01ea8bf11bb03b865669a68d56a35a (diff) |
Implement --mjit-stats
Diffstat (limited to 'mjit_c.c')
-rw-r--r-- | mjit_c.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -38,6 +38,11 @@ #define SIZEOF(type) RB_SIZE2NUM(sizeof(type)) #define SIGNED_TYPE_P(type) RBOOL((type)(-1) < (type)(1)) +#if MJIT_STATS +// Insn side exit counters +static size_t mjit_insn_exits[VM_INSTRUCTION_SIZE] = { 0 }; +#endif // YJIT_STATS + // macOS: brew install capstone // Ubuntu/Debian: apt-get install libcapstone-dev // Fedora: dnf -y install capstone-devel @@ -74,6 +79,13 @@ dump_disasm(rb_execution_context_t *ec, VALUE self, VALUE from, VALUE to) return result; } +// Same as `RubyVM::MJIT.enabled?`, but this is used before it's defined. +static VALUE +mjit_enabled_p(rb_execution_context_t *ec, VALUE self) +{ + return RBOOL(mjit_enabled); +} + #include "mjit_c.rbinc" #endif // USE_MJIT |