Sign in

    Milky2018/wasmoon_jit/perf does not have a README file

    CompileSubphaseMetric

    pub struct CompileSubphaseMetric {
    name : String
    parent : String
    duration_us : Int64
    } derive(ToJson)

    CompileSubphaseMetric::to_json

    FunctionCompileStage

    pub(all) enum FunctionCompileStage {
    Optimize
    NativeLowering
    TargetLowering
    RegisterAllocation
    FramePlanning
    Emission
    }

    A complete compilation stage recorded for one function.

    Keep this typed at the recording boundary so adding or renaming a stage cannot silently lose metrics through an unknown string.

    FunctionMetrics

    pub struct FunctionMetrics {
    func_idx : Int
    func_name : String
    opt_level : Int
    ir_insts_before : Int
    ir_insts_after : Int
    function_compile_us : Int64
    optimize_us : Int64
    lower_us : Int64
    target_lower_us : Int64
    regalloc_us : Int64
    frame_plan_us : Int64
    emit_us : Int64
    compile_subphases : Array[CompileSubphaseMetric]
    code_size : Int
    spill_slots : Int
    spills : Int
    reloads : Int
    reg_moves : Int
    spill_to_spill : Int
    regalloc_loop : RegallocLoopMetric?
    ir_passes : Array[IRPassMetric]
    regalloc_phases : Array[RegallocPhaseMetric]
    } derive(ToJson)

    FunctionMetrics::to_json

    IRPassMetric

    pub struct IRPassMetric {
    name : String
    duration_us : Int64
    before_insts : Int
    after_insts : Int
    changed : Bool
    rewrite_attempts : Int?
    rewrite_apps : Int?
    rewrite_created_insts : Int?
    work_done : Int?
    value_lookup_probes : Int?
    budget_exhausted : Bool?
    } derive(ToJson)

    IRPassMetric::to_json

    Instant

    #alias(PerfTick)
    type Instant

    ModuleMetricsReport

    pub struct ModuleMetricsReport {
    schema_version : Int
    expected_functions : Int
    module_compile_us : Int64
    compile_subphases : Array[CompileSubphaseMetric]
    functions : Array[FunctionMetrics]
    } derive(ToJson)

    ModuleMetricsReport::to_json

    RegallocLoopMetric

    pub struct RegallocLoopMetric {
    queue_pops : Int
    register_probes : Int
    occupied_segments_scanned : Int
    conflicts : Int
    evictions : Int
    bundle_splits : Int
    second_chance_attempts : Int
    max_queue_length : Int
    } derive(ToJson)

    RegallocLoopMetric::to_json

    RegallocPhaseMetric

    pub struct RegallocPhaseMetric {
    name : String
    duration_us : Int64
    } derive(ToJson)

    RegallocPhaseMetric::to_json

    begin_function

    fn begin_function(func_idx : Int, func_name : String, opt_level : Int, ir_insts_before : Int) -> Unit

    clear_milkir_metrics_sink

    fn clear_milkir_metrics_sink() -> Unit

    detail_enabled

    fn detail_enabled() -> Bool

    elapsed_us

    fn elapsed_us(start : Instant) -> Int64

    enabled

    fn enabled() -> Bool

    export_json

    fn export_json() -> String

    finish_function

    fn finish_function(ir_insts_after : Int, code_size : Int) -> Unit

    install_milkir_metrics_sink

    fn install_milkir_metrics_sink() -> Unit

    instant_elapsed_as_secs_f64

    fn instant_elapsed_as_secs_f64(i : Instant) -> Double

    instant_now

    fn instant_now() -> Instant

    record_compile_subphase_us

    fn record_compile_subphase_us(phase_name : String, duration_us : Int64, parent? : String) -> Unit

    record_function_compile_us

    fn record_function_compile_us(duration_us : Int64) -> Unit

    record_ir_pass

    fn record_ir_pass(pass_name : String, before_insts : Int, after_insts : Int, changed : Bool, duration_us : Int64, rewrite_attempts? : Int?, rewrite_apps? : Int?, rewrite_created_insts? : Int?, work_done? : Int?, value_lookup_probes? : Int?, budget_exhausted? : Bool?) -> Unit

    record_module_subphase_us

    fn record_module_subphase_us(phase_name : String, duration_us : Int64) -> Unit

    record_regalloc_loop

    fn record_regalloc_loop(queue_pops : Int, register_probes : Int, occupied_segments_scanned : Int, conflicts : Int, evictions : Int, bundle_splits : Int, second_chance_attempts : Int, max_queue_length : Int) -> Unit

    record_regalloc_phase_us

    fn record_regalloc_phase_us(phase_name : String, duration_us : Int64) -> Unit

    record_regalloc_stats

    fn record_regalloc_stats(spill_slots : Int, spills : Int, reloads : Int, reg_moves : Int, spill_to_spill : Int) -> Unit

    record_stage_us

    fn record_stage_us(stage : FunctionCompileStage, duration_us : Int64) -> Unit

    reset_module

    fn reset_module(expected_functions : Int) -> Unit

    set_module_compile_us

    fn set_module_compile_us(us : Int64) -> Unit

    tick_now

    fn tick_now() -> Instant

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io