diff options
| author | Max Bernstein <tekknolagi@gmail.com> | 2025-08-28 10:20:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-28 17:20:15 +0000 |
| commit | 7d670ead3008284822dea0e4c62ec7f2d12a2aec (patch) | |
| tree | 8d9f4ab453471df90ea1ce738851a284c37ccac9 | |
| parent | 85217252250a796ceca5c6a4be2e07bfedaaba60 (diff) | |
ZJIT: Disable profiling in compile_iseq (#14385)
This catches both the interpreter-JIT and JIT-JIT cases.
Fixes https://github.com/Shopify/ruby/issues/719
| -rw-r--r-- | zjit.c | 3 | ||||
| -rw-r--r-- | zjit/src/codegen.rs | 3 |
2 files changed, 3 insertions, 3 deletions
@@ -165,9 +165,6 @@ rb_zjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec, bool jit RB_VM_LOCKING() { rb_vm_barrier(); - // Convert ZJIT instructions back to bare instructions - rb_zjit_profile_disable(iseq); - // Compile a block version starting at the current instruction uint8_t *rb_zjit_iseq_gen_entry_point(const rb_iseq_t *iseq, rb_execution_context_t *ec); // defined in Rust uintptr_t code_ptr = (uintptr_t)rb_zjit_iseq_gen_entry_point(iseq, ec); diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 189741b07c..023498e3be 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -1398,6 +1398,9 @@ pub fn local_size_and_idx_to_bp_offset(local_size: usize, local_idx: usize) -> i /// Convert ISEQ into High-level IR fn compile_iseq(iseq: IseqPtr) -> Option<Function> { + // Convert ZJIT instructions back to bare instructions + unsafe { crate::cruby::rb_zjit_profile_disable(iseq) }; + // Reject ISEQs with very large temp stacks. // We cannot encode too large offsets to access locals in arm64. let stack_max = unsafe { rb_get_iseq_body_stack_max(iseq) }; |
