summaryrefslogtreecommitdiff
path: root/tools/perf/tests/parse-events.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2024-01-31 16:49:39 +0300
committerNamhyung Kim <namhyung@kernel.org>2024-02-03 00:07:45 +0300
commitf5144ecad74101f87843aa08070df26a3937102a (patch)
tree70e949a1622f1a38e7b1f1ed733369f5ea06e5dc /tools/perf/tests/parse-events.c
parent2882358b8b83b417a9d82205ae6aae5be00bd989 (diff)
downloadlinux-f5144ecad74101f87843aa08070df26a3937102a.tar.xz
perf parse-events: Improve error location of terms cloned from an event
A PMU event/alias will have a set of format terms that replace it when an event is parsed. The location of the terms is their position when parsed for the event/alias either from sysfs or json. This location is of little use when an event fails to parse as the error will be given in terms of the location in the string of events parsed not the json or sysfs string. Fix this by making the cloned terms location that of the event/alias. If a cloned term from an event/alias is invalid the bad format is hard to determine from the error string. Add the name of the bad format into the error string. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: James Clark <james.clark@arm.com> Cc: tchen168@asu.edu Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240131134940.593788-2-irogers@google.com
Diffstat (limited to 'tools/perf/tests/parse-events.c')
0 files changed, 0 insertions, 0 deletions