diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/build-id.c | 2 | ||||
-rw-r--r-- | tools/perf/util/build-id.h | 2 | ||||
-rw-r--r-- | tools/perf/util/dso.c | 11 | ||||
-rw-r--r-- | tools/perf/util/dso.h | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index a92770c98cc7..6baabe63182b 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c | |||
@@ -89,7 +89,7 @@ int build_id__sprintf(const u8 *build_id, int len, char *bf) | |||
89 | return raw - build_id; | 89 | return raw - build_id; |
90 | } | 90 | } |
91 | 91 | ||
92 | char *dso__build_id_filename(struct dso *dso, char *bf, size_t size) | 92 | char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size) |
93 | { | 93 | { |
94 | char build_id_hex[BUILD_ID_SIZE * 2 + 1]; | 94 | char build_id_hex[BUILD_ID_SIZE * 2 + 1]; |
95 | 95 | ||
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h index 929f28a7c14d..845ef865eced 100644 --- a/tools/perf/util/build-id.h +++ b/tools/perf/util/build-id.h | |||
@@ -10,7 +10,7 @@ extern struct perf_tool build_id__mark_dso_hit_ops; | |||
10 | struct dso; | 10 | struct dso; |
11 | 11 | ||
12 | int build_id__sprintf(const u8 *build_id, int len, char *bf); | 12 | int build_id__sprintf(const u8 *build_id, int len, char *bf); |
13 | char *dso__build_id_filename(struct dso *dso, char *bf, size_t size); | 13 | char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size); |
14 | 14 | ||
15 | int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event, | 15 | int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event, |
16 | struct perf_sample *sample, struct perf_evsel *evsel, | 16 | struct perf_sample *sample, struct perf_evsel *evsel, |
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 19babb0d365d..fbc66fde6b30 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c | |||
@@ -28,7 +28,7 @@ char dso__symtab_origin(const struct dso *dso) | |||
28 | return origin[dso->symtab_type]; | 28 | return origin[dso->symtab_type]; |
29 | } | 29 | } |
30 | 30 | ||
31 | int dso__binary_type_file(struct dso *dso, enum dso_binary_type type, | 31 | int dso__binary_type_file(const struct dso *dso, enum dso_binary_type type, |
32 | char *root_dir, char *file, size_t size) | 32 | char *root_dir, char *file, size_t size) |
33 | { | 33 | { |
34 | char build_id_hex[BUILD_ID_SIZE * 2 + 1]; | 34 | char build_id_hex[BUILD_ID_SIZE * 2 + 1]; |
@@ -200,11 +200,10 @@ dso_cache__free(struct rb_root *root) | |||
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
203 | static struct dso_cache* | 203 | static struct dso_cache *dso_cache__find(const struct rb_root *root, u64 offset) |
204 | dso_cache__find(struct rb_root *root, u64 offset) | ||
205 | { | 204 | { |
206 | struct rb_node **p = &root->rb_node; | 205 | struct rb_node * const *p = &root->rb_node; |
207 | struct rb_node *parent = NULL; | 206 | const struct rb_node *parent = NULL; |
208 | struct dso_cache *cache; | 207 | struct dso_cache *cache; |
209 | 208 | ||
210 | while (*p != NULL) { | 209 | while (*p != NULL) { |
@@ -566,7 +565,7 @@ void dsos__add(struct list_head *head, struct dso *dso) | |||
566 | list_add_tail(&dso->node, head); | 565 | list_add_tail(&dso->node, head); |
567 | } | 566 | } |
568 | 567 | ||
569 | struct dso *dsos__find(struct list_head *head, const char *name, bool cmp_short) | 568 | struct dso *dsos__find(const struct list_head *head, const char *name, bool cmp_short) |
570 | { | 569 | { |
571 | struct dso *pos; | 570 | struct dso *pos; |
572 | 571 | ||
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, | |||
128 | int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir); | 128 | int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir); |
129 | 129 | ||
130 | char dso__symtab_origin(const struct dso *dso); | 130 | char dso__symtab_origin(const struct dso *dso); |
131 | int dso__binary_type_file(struct dso *dso, enum dso_binary_type type, | 131 | int 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 | ||
134 | int dso__data_fd(struct dso *dso, struct machine *machine); | 134 | int 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 | ||
145 | void dsos__add(struct list_head *head, struct dso *dso); | 145 | void dsos__add(struct list_head *head, struct dso *dso); |
146 | struct dso *dsos__find(struct list_head *head, const char *name, | 146 | struct dso *dsos__find(const struct list_head *head, const char *name, |
147 | bool cmp_short); | 147 | bool cmp_short); |
148 | struct dso *__dsos__findnew(struct list_head *head, const char *name); | 148 | struct dso *__dsos__findnew(struct list_head *head, const char *name); |
149 | bool __dsos__read_build_ids(struct list_head *head, bool with_hits); | 149 | bool __dsos__read_build_ids(struct list_head *head, bool with_hits); |