diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-10 15:19:23 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-10 16:51:09 -0300 |
commit | bf4414ae7b86cddca60a5b510954a37d30583a1f (patch) | |
tree | 39f15982d08d925fbb55aaad9ee99570ca0b2119 /tools/perf/util/header.c | |
parent | 7e155d4d5e2912f75443c18c02dd6f1dbd4eef84 (diff) | |
download | linux-stable-bf4414ae7b86cddca60a5b510954a37d30583a1f.tar.gz linux-stable-bf4414ae7b86cddca60a5b510954a37d30583a1f.tar.bz2 linux-stable-bf4414ae7b86cddca60a5b510954a37d30583a1f.zip |
perf symbols: Constify dso->long_name
Same reason as for dso->short_name, it may point to a const string, and
in most places it is treated as const, i.e. it is just accessed for
using its contents as a key or to show it on reports.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-nf7mxf33zt5qw207pbxxryot@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 125cdc9250ee..0bb830f6b49c 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -177,7 +177,7 @@ perf_header__set_cmdline(int argc, const char **argv) continue; \ else -static int write_buildid(char *name, size_t name_len, u8 *build_id, +static int write_buildid(const char *name, size_t name_len, u8 *build_id, pid_t pid, u16 misc, int fd) { int err; @@ -209,7 +209,7 @@ static int __dsos__write_buildid_table(struct list_head *head, dsos__for_each_with_build_id(pos, head) { int err; - char *name; + const char *name; size_t name_len; if (!pos->hit) @@ -387,7 +387,7 @@ static int dso__cache_build_id(struct dso *dso, struct machine *machine, { bool is_kallsyms = dso->kernel && dso->long_name[0] != '/'; bool is_vdso = is_vdso_map(dso->short_name); - char *name = dso->long_name; + const char *name = dso->long_name; char nm[PATH_MAX]; if (dso__is_kcore(dso)) { |