aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/dso.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-12-10 13:46:29 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-10 14:51:10 -0500
commit3344996e4f2980be568ecf0cd59cb85e646da029 (patch)
treed1cb8cb22734c448eb952b9845fd4002c184421b /tools/perf/util/dso.h
parentee021d42238daadc7ba49274bb0ba7dff219c6ab (diff)
perf symbols: Constify some DSO methods parameters
Those methods are not supposed to change the data structures they manipulate, so make that clearer by using the const qualifier in the function signature and in some variables. Suggested-by: Ingo Molnar <mingo@kernel.org> 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-j7oyakex7zy3r82h33rdw25x@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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index a2d71292f746..99f3c647d683 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -128,7 +128,7 @@ void dso__read_running_kernel_build_id(struct dso *dso,
128int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir); 128int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir);
129 129
130char dso__symtab_origin(const struct dso *dso); 130char dso__symtab_origin(const struct dso *dso);
131int dso__binary_type_file(struct dso *dso, enum dso_binary_type type, 131int dso__binary_type_file(const struct dso *dso, enum dso_binary_type type,
132 char *root_dir, char *file, size_t size); 132 char *root_dir, char *file, size_t size);
133 133
134int dso__data_fd(struct dso *dso, struct machine *machine); 134int dso__data_fd(struct dso *dso, struct machine *machine);
@@ -143,7 +143,7 @@ struct dso *dso__kernel_findnew(struct machine *machine, const char *name,
143 const char *short_name, int dso_type); 143 const char *short_name, int dso_type);
144 144
145void dsos__add(struct list_head *head, struct dso *dso); 145void dsos__add(struct list_head *head, struct dso *dso);
146struct dso *dsos__find(struct list_head *head, const char *name, 146struct dso *dsos__find(const struct list_head *head, const char *name,
147 bool cmp_short); 147 bool cmp_short);
148struct dso *__dsos__findnew(struct list_head *head, const char *name); 148struct dso *__dsos__findnew(struct list_head *head, const char *name);
149bool __dsos__read_build_ids(struct list_head *head, bool with_hits); 149bool __dsos__read_build_ids(struct list_head *head, bool with_hits);