diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2025-09-10 17:02:21 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2025-09-10 18:21:54 -0400 |
| commit | 8d05669bafc06717814b508e433f77836cf375dd (patch) | |
| tree | cd7c2c0b7a8034cab03c6575cbe19d2e5df7c229 | |
| parent | 1b9fc426bbf6b6ca83ef6301f7a11f3fb7cc4f84 (diff) | |
YJIT: Print more disassembly in release builds
These `#[cfg(feature = "disasm")]` were unnecessary and we can provide
the information like ruby source location regardless of the availability
of capstone.
| -rw-r--r-- | yjit/src/codegen.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 2ab45f41db..2bac85e62b 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -821,11 +821,11 @@ fn gen_stub_exit(ocb: &mut OutlinedCb) -> Option<CodePtr> { /// Generate an exit to return to the interpreter fn gen_exit(exit_pc: *mut VALUE, asm: &mut Assembler) { - #[cfg(all(feature = "disasm", not(test)))] - { + #[cfg(not(test))] + asm_comment!(asm, "exit to interpreter on {}", { let opcode = unsafe { rb_vm_insn_addr2opcode((*exit_pc).as_ptr()) }; - asm_comment!(asm, "exit to interpreter on {}", insn_name(opcode as usize)); - } + insn_name(opcode as usize) + }); if asm.ctx.is_return_landing() { asm.mov(SP, Opnd::mem(64, CFP, RUBY_OFFSET_CFP_SP)); @@ -1292,7 +1292,6 @@ pub fn gen_single_block( let mut asm = Assembler::new(jit.num_locals()); asm.ctx = ctx; - #[cfg(feature = "disasm")] if get_option_ref!(dump_disasm).is_some() { let blockid_idx = blockid.idx; let chain_depth = if asm.ctx.get_chain_depth() > 0 { format!("(chain_depth: {})", asm.ctx.get_chain_depth()) } else { "".to_string() }; @@ -9047,7 +9046,6 @@ fn gen_send_general( let recv_opnd: YARVOpnd = recv.into(); // Log the name of the method we're calling to - #[cfg(feature = "disasm")] asm_comment!(asm, "call to {}", get_method_name(Some(comptime_recv_klass), mid)); // Gather some statistics about sends |
