summaryrefslogtreecommitdiff
path: root/yjit/bindgen/src
diff options
context:
space:
mode:
authorAaron Patterson <[email protected]>2025-02-13 09:56:21 -0800
committerAaron Patterson <[email protected]>2025-02-14 14:39:35 -0500
commit8cafa5b8ce5e35881bf5077d2bfafc03274189f2 (patch)
tree6e9c50df55391f49a4c31c24cd331b5e0f3f368c /yjit/bindgen/src
parentc1ce3d719dab2761fbca37f9336a33b47af187ed (diff)
Only count VM instructions in YJIT stats builds
The instruction counter is slowing multi-Ractor applications. I had changed it to use a thread local, but using a thread local is slowing single threaded applications. This commit only enables the instruction counter in YJIT stats builds until we can figure out a way to gather the information with lower overhead. Co-authored-by: Randy Stauner <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12670
Diffstat (limited to 'yjit/bindgen/src')
-rw-r--r--yjit/bindgen/src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs
index b6f4c4b7c4..e8f88cef64 100644
--- a/yjit/bindgen/src/main.rs
+++ b/yjit/bindgen/src/main.rs
@@ -317,7 +317,6 @@ fn main() {
.allowlist_function("rb_yjit_get_page_size")
.allowlist_function("rb_yjit_iseq_builtin_attrs")
.allowlist_function("rb_yjit_iseq_inspect")
- .allowlist_function("rb_yjit_vm_insns_count")
.allowlist_function("rb_yjit_builtin_function")
.allowlist_function("rb_set_cfp_(pc|sp)")
.allowlist_function("rb_yjit_multi_ractor_p")
@@ -381,6 +380,9 @@ fn main() {
.allowlist_function("rb_ivar_get")
.allowlist_function("rb_mod_name")
+ // From internal/vm.h
+ .allowlist_var("rb_vm_insns_count")
+
// From include/ruby/internal/intern/vm.h
.allowlist_function("rb_get_alloc_func")