File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -395,6 +395,22 @@ fn measure_case(
395395 "{label} compiled new JIT traces inside the measured region"
396396 ) ;
397397 TraceShapeStats :: capture ( & vm) . print ( label) ;
398+ println ! (
399+ "jit_bridge_stats label={label} hits={:?}" ,
400+ vm. jit_native_bridge_stats_snapshot( )
401+ ) ;
402+ let mut traces = vm. jit_snapshot ( ) . traces ;
403+ traces. sort_by_key ( |trace| std:: cmp:: Reverse ( trace. executions ) ) ;
404+ for trace in traces. into_iter ( ) . take ( 15 ) {
405+ println ! (
406+ "jit_hot_trace label={label} root_ip={} line={:?} executions={} ops={:?} ssa={}" ,
407+ trace. root_ip,
408+ trace. start_line,
409+ trace. executions,
410+ trace. op_names,
411+ trace. ssa_text( ) . replace( '\n' , " | " )
412+ ) ;
413+ }
398414 }
399415
400416 let total_duration: Duration = batches. iter ( ) . copied ( ) . sum ( ) ;
@@ -465,9 +481,11 @@ fn run_default_ruleset_perf() {
465481 & config,
466482 & expected,
467483 ) ;
484+ let mut jit_vm = Vm :: new ( default_ruleset_program) ;
485+ jit_vm. set_jit_native_bridge_stats_enabled ( true ) ;
468486 let jit = measure_case (
469487 "default_ruleset_jit_perf" ,
470- Vm :: new ( default_ruleset_program ) ,
488+ jit_vm ,
471489 WarmupPolicy :: JitUntilStable ,
472490 & config,
473491 & expected,
You can’t perform that action at this time.
0 commit comments