mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Topdown metric events require grouping with a slots event. In perf metrics this is currently achieved by metrics adding an unnecessary "0 * tma_info_thread_slots". New TMA metrics trigger optimizations of the metric expression that removes the event and breaks the metric due to the missing but required event. Add a pass immediately before sorting and fixing parsed events, that insert a slots event if one is missing. Update test expectations to match this. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250719030517.1990983-15-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
15 lines
389 B
C
15 lines
389 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _TOPDOWN_H
|
|
#define _TOPDOWN_H 1
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct evsel;
|
|
struct list_head;
|
|
|
|
bool topdown_sys_has_perf_metrics(void);
|
|
bool arch_is_topdown_slots(const struct evsel *evsel);
|
|
bool arch_is_topdown_metrics(const struct evsel *evsel);
|
|
int topdown_insert_slots_event(struct list_head *list, int idx, struct evsel *metric_event);
|
|
|
|
#endif
|