mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 05:18:45 +02:00
perf session: Constify tool
Make tool const now that all uses are const and perf_tool__fill_defaults() won't be used. The aim is to better capture that sessions don't mutate tools. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Cameron <jonathan.cameron@huawei.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Nick Terrell <terrelln@fb.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <song@kernel.org> Cc: Sun Haiyong <sunhaiyong@loongson.cn> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Yanteng Si <siyanteng@loongson.cn> Cc: Yicong Yang <yangyicong@hisilicon.com> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20240812204720.631678-28-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
15d4a6f41d
commit
8f29be326d
|
|
@ -1770,7 +1770,7 @@ static int __perf_session__process_decomp_events(struct perf_session *session);
|
|||
static int __perf_session__process_pipe_events(struct perf_session *session)
|
||||
{
|
||||
struct ordered_events *oe = &session->ordered_events;
|
||||
struct perf_tool *tool = session->tool;
|
||||
const struct perf_tool *tool = session->tool;
|
||||
struct ui_progress prog;
|
||||
union perf_event *event;
|
||||
uint32_t size, cur_size = 0;
|
||||
|
|
@ -2200,7 +2200,7 @@ static int __perf_session__process_events(struct perf_session *session)
|
|||
.in_place_update = session->data->in_place_update,
|
||||
};
|
||||
struct ordered_events *oe = &session->ordered_events;
|
||||
struct perf_tool *tool = session->tool;
|
||||
const struct perf_tool *tool = session->tool;
|
||||
struct ui_progress prog;
|
||||
int err;
|
||||
|
||||
|
|
@ -2250,7 +2250,7 @@ static int __perf_session__process_events(struct perf_session *session)
|
|||
static int __perf_session__process_dir_events(struct perf_session *session)
|
||||
{
|
||||
struct perf_data *data = session->data;
|
||||
struct perf_tool *tool = session->tool;
|
||||
const struct perf_tool *tool = session->tool;
|
||||
int i, ret, readers, nr_readers;
|
||||
struct ui_progress prog;
|
||||
u64 total_size = perf_data__size(session->data);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ struct perf_session {
|
|||
u64 one_mmap_offset;
|
||||
struct ordered_events ordered_events;
|
||||
struct perf_data *data;
|
||||
struct perf_tool *tool;
|
||||
const struct perf_tool *tool;
|
||||
u64 bytes_transferred;
|
||||
u64 bytes_compressed;
|
||||
struct zstd_data zstd_data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user