summaryrefslogtreecommitdiff
path: root/vm_exec.c
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 /vm_exec.c
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 'vm_exec.c')
-rw-r--r--vm_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_exec.c b/vm_exec.c
index 8749bd1c37..947d4dc421 100644
--- a/vm_exec.c
+++ b/vm_exec.c
@@ -13,7 +13,7 @@
#if USE_YJIT
// The number of instructions executed on vm_exec_core. --yjit-stats uses this.
-RB_THREAD_LOCAL_SPECIFIER uint64_t rb_vm_insns_count = 0;
+uint64_t rb_vm_insns_count = 0;
#endif
#if VM_COLLECT_USAGE_DETAILS