Re: [PATCH v1 05/15] perf pmu: Allow hardcoded terms to be applied to attributes
From: Arnaldo Carvalho de Melo
Date: Wed Sep 11 2024 - 10:32:11 EST
On Fri, Sep 06, 2024 at 10:08:20PM -0700, Ian Rogers wrote:
> Hard coded terms like "config=10" are skipped by perf_pmu__config
> assuming they were already applied to a perf_event_attr by parse
> event's config_attr function. When doing a reverse number to name
> lookup in perf_pmu__name_from_config, as the hardcoded terms aren't
> applied the config value is incorrect leading to misses or false
> matches. Fix this by adding a parameter to have perf_pmu__config apply
> hardcoded terms too (not just in parse event's config_term_common).
Stopped here:
CC /tmp/build/perf-tools-next/util/stat.o
util/pmu.c: In function ‘pmu_config_term’:
util/pmu.c:1397:17: error: switch missing default case [-Werror=switch-default]
1397 | switch (term->type_term) {
| ^~~~~~
CC /tmp/build/perf-tools-next/util/stat-shadow.o