scope_profiler.plotting_scripts.perf_events
Bar charts for built-in Linux perf-event counter totals and ratios.
Functions
| Name | Description |
|---|---|
available_perf_event_metrics | List available raw events and valid derived perf-event ratios. |
plot_perf_events | Plot one raw perf event or derived ratio for every region and rank. |
available_perf_event_metricsfunction#
def available_perf_event_metrics(profiling_data: ProfilingResults | Sequence[ProfilingResults]) -> list[str]List available raw events and valid derived perf-event ratios.
plot_perf_eventsfunction#
def plot_perf_events(profiling_data: ProfilingResults | Sequence[ProfilingResults], metric: str = 'ipc', ranks: list[int] | int | None = None, include: list[str] | str | None = None, exclude: list[str] | str | None = None, labels: Sequence[str] | None = None, filepath: str | None = None, show: bool = False, verbose: bool = True, cmap: str = DEFAULT_CMAP, backend: str = 'matplotlib') -> NonePlot one raw perf event or derived ratio for every region and rank.
metric may be an event name recorded in the run, "ipc"
(instructions/cycle), or "cache-misses-per-ki". Derived metrics are
calculated from the region’s aggregated counters, not averages of call
ratios, which preserves their proper weighting.