]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf script: Cache the output type
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 Dec 2024 19:10:28 +0000 (16:10 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 Dec 2024 20:35:54 +0000 (17:35 -0300)
commitefff5add204fd30c4f1707a87369e00704721315
treefca3672f7d9b4c547872cf6d7b6163eff0b0fb90
parent233157785a34612e5899be6edcc6a53ea682d379
perf script: Cache the output type

Right now every time we need to figure out the type of an evsel for
output purposes we do a quick sequence of ifs, but there are new cases
where there is a need to do more complex iterations over multiple data
structures, sso allow for caching this operation on a hole of 'struct
evsel'.

This should really be done on the evsel->priv area that 'perf script'
sets up, but more work is needed to make sure that it is allocated when
we need it, right now it is only used for conditionally, add some
comments so that we move this to that 'perf script' specific area when
the conditions are in place for that.

Acked-by: Thomas Falcon <thomas.falcon@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/lkml/Z2XCi3PgstSrV0SE@x1
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h