diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-10 19:19:23 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-10 20:51:09 +0100 |
commit | bf4414ae7b86cddca60a5b510954a37d30583a1f (patch) | |
tree | 39f15982d08d925fbb55aaad9ee99570ca0b2119 /tools/perf/util/dso.h | |
parent | perf symbols: Remove open coded management of long_name_allocated member (diff) | |
download | linux-bf4414ae7b86cddca60a5b510954a37d30583a1f.tar.xz linux-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/dso.h')
-rw-r--r-- | tools/perf/util/dso.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index 7b434691525a..a2d71292f746 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -96,7 +96,7 @@ struct dso { u8 rel; u8 build_id[BUILD_ID_SIZE]; const char *short_name; - char *long_name; + const char *long_name; u16 long_name_len; u16 short_name_len; char name[0]; @@ -111,7 +111,7 @@ struct dso *dso__new(const char *name); void dso__delete(struct dso *dso); void dso__set_short_name(struct dso *dso, const char *name, bool name_allocated); -void dso__set_long_name(struct dso *dso, char *name, bool name_allocated); +void dso__set_long_name(struct dso *dso, const char *name, bool name_allocated); int dso__name_len(const struct dso *dso); |