diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-01-26 15:21:47 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:27 -0400 |
commit | b7f93e81dfe6864273707172be92896b54b6053e (patch) | |
tree | 0e04e68ed0d2e472a5819de3e5acbc7a3051e661 /ujit.h | |
parent | 36232a48a63923e6d3bd3ccad30a12a02b20e89b (diff) |
Implement --ujit-stats and instructoin counting
VM and ujit instruction counting in debug builds.
shopify/ruby#19
Diffstat (limited to 'ujit.h')
-rw-r--r-- | ujit.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -31,6 +31,10 @@ typedef struct rb_iseq_struct rb_iseq_t; #define rb_iseq_t rb_iseq_t #endif +struct rb_ujit_options { + bool gen_stats; +}; + RUBY_SYMBOL_EXPORT_BEGIN RUBY_EXTERN bool rb_ujit_enabled; RUBY_SYMBOL_EXPORT_END @@ -44,8 +48,9 @@ bool rb_ujit_enabled_p(void) // Threshold==1 means compile on first execution #define UJIT_CALL_THRESHOLD (2u) +void rb_ujit_collect_vm_usage_insn(int insn); void rb_ujit_method_lookup_change(VALUE cme_or_cc); void rb_ujit_compile_iseq(const rb_iseq_t *iseq); -void rb_ujit_init(void); +void rb_ujit_init(struct rb_ujit_options *options); #endif // #ifndef UJIT_H |