Skip to main content

setup_perf_events

Function setup_perf_events 

Source
pub fn setup_perf_events(
    map: &impl MapCore,
    cpu: i32,
    spec: &PerfEventSpec,
    counter_idx: u32,
) -> Result<()>
Expand description

Open a perf event on @cpu and register its fd in the given BPF PMU map (the scheduler’s scx_pmu_map) at the slot for (@cpu, @counter_idx). counter_idx 0 is the migration event, 1 the sticky event, matching the PMU library install order.