Skip to content

Commit 044a43f

Browse files
authored
ZJIT: Trace infer_types as a sub-pass of other passes (ruby#16714)
This helps us see how much time it takes in compiler tracing.
1 parent 4978bfb commit 044a43f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

zjit/src/hir.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4328,7 +4328,7 @@ impl Function {
43284328
}
43294329
}
43304330
}
4331-
self.infer_types();
4331+
crate::stats::trace_compile_phase("infer_types", || self.infer_types());
43324332
}
43334333

43344334
fn inline(&mut self) {
@@ -4382,7 +4382,7 @@ impl Function {
43824382
}
43834383
}
43844384
}
4385-
self.infer_types();
4385+
crate::stats::trace_compile_phase("infer_types", || self.infer_types());
43864386
}
43874387

43884388
fn load_shape(&mut self, block: BlockId, recv: InsnId) -> InsnId {
@@ -4670,7 +4670,7 @@ impl Function {
46704670
}
46714671
}
46724672
}
4673-
self.infer_types();
4673+
crate::stats::trace_compile_phase("infer_types", || self.infer_types());
46744674
}
46754675

46764676
fn gen_patch_points_for_optimized_ccall(&mut self, block: BlockId, recv_class: VALUE, method_id: ID, cme: *const rb_callable_method_entry_struct, state: InsnId) {
@@ -4989,7 +4989,7 @@ impl Function {
49894989
self.push_insn_id(block, insn_id);
49904990
}
49914991
}
4992-
self.infer_types();
4992+
crate::stats::trace_compile_phase("infer_types", || self.infer_types());
49934993
}
49944994

49954995
/// Convert `Send` instructions with no profile data into `SideExit` with recompile info.
@@ -5488,7 +5488,7 @@ impl Function {
54885488
changed = true;
54895489
}
54905490
if changed {
5491-
self.infer_types();
5491+
crate::stats::trace_compile_phase("infer_types", || self.infer_types());
54925492
}
54935493
}
54945494

0 commit comments

Comments
 (0)