diff --git a/Cargo.toml b/Cargo.toml index 7a80f8ea..6e92b93f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,6 @@ quickcheck = "0.6.2" [features] default = [] profiler = [] -profiler_instrument = [] [lib] crate-type = ["cdylib"] diff --git a/src/rust/codegen.rs b/src/rust/codegen.rs index 09b0156e..ba125f45 100644 --- a/src/rust/codegen.rs +++ b/src/rust/codegen.rs @@ -535,7 +535,7 @@ fn gen_safe_read( ctx.builder.br_if(0); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { ctx.builder.get_local(&address_local); ctx.builder.get_local(&entry_local); ctx.builder.call_fn2("report_safe_read_jit_slow"); @@ -565,7 +565,7 @@ fn gen_safe_read( ctx.builder.const_i32(1); ctx.builder.and_i32(); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { ctx.builder.if_void(); gen_debug_track_jit_exit(ctx.builder, ctx.start_of_current_instruction); ctx.builder.block_end(); @@ -673,7 +673,7 @@ fn gen_safe_write( ctx.builder.br_if(0); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { ctx.builder.get_local(&address_local); ctx.builder.get_local(&entry_local); ctx.builder.call_fn2("report_safe_write_jit_slow"); @@ -713,7 +713,7 @@ fn gen_safe_write( ctx.builder.const_i32(1); ctx.builder.and_i32(); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { ctx.builder.if_void(); gen_debug_track_jit_exit(ctx.builder, ctx.start_of_current_instruction); ctx.builder.block_end(); @@ -825,7 +825,7 @@ pub fn gen_safe_read_write( ctx.builder.br_if(0); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { ctx.builder.get_local(&address_local); ctx.builder.get_local(&entry_local); ctx.builder.call_fn2("report_safe_read_write_jit_slow"); @@ -854,7 +854,7 @@ pub fn gen_safe_read_write( ctx.builder.const_i32(1); ctx.builder.and_i32(); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { ctx.builder.if_void(); gen_debug_track_jit_exit(ctx.builder, ctx.start_of_current_instruction); ctx.builder.block_end(); @@ -1795,7 +1795,7 @@ pub fn gen_move_registers_from_memory_to_locals(ctx: &mut JitContext) { } pub fn gen_profiler_stat_increment(builder: &mut WasmBuilder, stat: profiler::stat) { - if !cfg!(feature = "profiler") || !cfg!(feature = "profiler_instrument") { + if !cfg!(feature = "profiler") { return; } let addr = unsafe { profiler::stat_array.as_mut_ptr().offset(stat as isize) } as u32; @@ -1803,7 +1803,7 @@ pub fn gen_profiler_stat_increment(builder: &mut WasmBuilder, stat: profiler::st } pub fn gen_debug_track_jit_exit(builder: &mut WasmBuilder, address: u32) { - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { gen_fn1_const(builder, "track_jit_exit", address); } } diff --git a/src/rust/cpu/cpu.rs b/src/rust/cpu/cpu.rs index 210e33bc..2acc6461 100644 --- a/src/rust/cpu/cpu.rs +++ b/src/rust/cpu/cpu.rs @@ -2358,7 +2358,7 @@ pub unsafe fn cycle_internal() { ); dbg_assert!(*timestamp_counter != initial_tsc, "TSC didn't change"); - if cfg!(feature = "profiler") && cfg!(feature = "profiler_instrument") { + if cfg!(feature = "profiler") { dbg_assert!(match ::cpu::cpu::debug_last_jump { LastJump::Compiled { .. } => true, _ => false, diff --git a/src/rust/opstats.rs b/src/rust/opstats.rs index 1bf807e9..847bbaea 100644 --- a/src/rust/opstats.rs +++ b/src/rust/opstats.rs @@ -126,7 +126,7 @@ fn decode(mut instruction: u32) -> Instruction { } pub fn gen_opstats(builder: &mut WasmBuilder, opcode: u32) { - if !cfg!(feature = "profiler") || !cfg!(feature = "profiler_instrument") { + if !cfg!(feature = "profiler") { return; } @@ -208,7 +208,7 @@ pub fn record_opstat_unguarded_register(opcode: u32) { } pub fn gen_opstat_unguarded_register(builder: &mut WasmBuilder, opcode: u32) { - if !cfg!(feature = "profiler") || !cfg!(feature = "profiler_instrument") { + if !cfg!(feature = "profiler") { return; }