Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf jit: Constify filename argument

Make it clearer the argument is just being used as a string.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Anne Macedo <retpolanne@posteo.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Casey Chen <cachen@purestorage.com>
Cc: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Dominique Martinet <asmadeus@codewreck.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jann Horn <jannh@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sun Haiyong <sunhaiyong@loongson.cn>
Cc: Weilin Wang <weilin.wang@intel.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Yunseong Kim <yskelg@gmail.com>
Cc: Ze Gao <zegao2021@gmail.com>
Link: https://lore.kernel.org/r/20240817064442.2152089-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
0847c193 a0310736

+5 -4
+2 -1
tools/perf/util/jit.h
··· 5 5 #include <data.h> 6 6 7 7 int jit_process(struct perf_session *session, struct perf_data *output, 8 - struct machine *machine, char *filename, pid_t pid, pid_t tid, u64 *nbytes); 8 + struct machine *machine, const char *filename, 9 + pid_t pid, pid_t tid, u64 *nbytes); 9 10 10 11 int jit_inject_record(const char *filename); 11 12
+3 -3
tools/perf/util/jitdump.c
··· 710 710 } 711 711 712 712 static int 713 - jit_inject(struct jit_buf_desc *jd, char *path) 713 + jit_inject(struct jit_buf_desc *jd, const char *path) 714 714 { 715 715 int ret; 716 716 ··· 737 737 * as captured in the RECORD_MMAP record 738 738 */ 739 739 static int 740 - jit_detect(char *mmap_name, pid_t pid, struct nsinfo *nsi) 740 + jit_detect(const char *mmap_name, pid_t pid, struct nsinfo *nsi) 741 741 { 742 742 char *p; 743 743 char *end = NULL; ··· 821 821 jit_process(struct perf_session *session, 822 822 struct perf_data *output, 823 823 struct machine *machine, 824 - char *filename, 824 + const char *filename, 825 825 pid_t pid, 826 826 pid_t tid, 827 827 u64 *nbytes)