瀏覽代碼

Only log when actually compiling

Fabian 3 年之前
父節點
當前提交
2a52dae27e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/rust/jit.rs

+ 3 - 3
src/rust/jit.rs

@@ -872,9 +872,6 @@ fn jit_analyze_and_generate(
     cs_offset: u32,
     state_flags: CachedStateFlags,
 ) {
-    dbg_log!("Compile code for page at {:x}", page.to_address());
-    profiler::stat_increment(stat::COMPILE);
-
     if jit_page_has_pending_code(ctx, page) {
         return;
     }
@@ -882,6 +879,9 @@ fn jit_analyze_and_generate(
     let entry_points = ctx.entry_points.remove(&page);
 
     if let Some(entry_points) = entry_points {
+        dbg_log!("Compile code for page at {:x}", page.to_address());
+        profiler::stat_increment(stat::COMPILE);
+
         let cpu = CpuContext {
             eip: 0,
             prefixes: 0,