diff options
Diffstat (limited to 'tools/perf/util')
| -rw-r--r-- | tools/perf/util/Build | 2 | ||||
| -rw-r--r-- | tools/perf/util/python-ext-sources | 4 | ||||
| -rw-r--r-- | tools/perf/util/thread_map.c | 3 | ||||
| -rw-r--r-- | tools/perf/util/vdso.c | 8 |
4 files changed, 7 insertions, 10 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 601d11440596..d2d318c59b37 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build | |||
| @@ -143,6 +143,6 @@ $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE | |||
| 143 | $(call rule_mkdir) | 143 | $(call rule_mkdir) |
| 144 | $(call if_changed_dep,cc_o_c) | 144 | $(call if_changed_dep,cc_o_c) |
| 145 | 145 | ||
| 146 | $(OUTPUT)util/hweight.o: ../../lib/hweight.c FORCE | 146 | $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE |
| 147 | $(call rule_mkdir) | 147 | $(call rule_mkdir) |
| 148 | $(call if_changed_dep,cc_o_c) | 148 | $(call if_changed_dep,cc_o_c) |
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources index e23ded40c79e..0766d98c5da5 100644 --- a/tools/perf/util/python-ext-sources +++ b/tools/perf/util/python-ext-sources | |||
| @@ -10,7 +10,7 @@ util/ctype.c | |||
| 10 | util/evlist.c | 10 | util/evlist.c |
| 11 | util/evsel.c | 11 | util/evsel.c |
| 12 | util/cpumap.c | 12 | util/cpumap.c |
| 13 | ../../lib/hweight.c | 13 | ../lib/hweight.c |
| 14 | util/thread_map.c | 14 | util/thread_map.c |
| 15 | util/util.c | 15 | util/util.c |
| 16 | util/xyarray.c | 16 | util/xyarray.c |
| @@ -19,5 +19,5 @@ util/rblist.c | |||
| 19 | util/stat.c | 19 | util/stat.c |
| 20 | util/strlist.c | 20 | util/strlist.c |
| 21 | util/trace-event.c | 21 | util/trace-event.c |
| 22 | ../../lib/rbtree.c | 22 | ../lib/rbtree.c |
| 23 | util/string.c | 23 | util/string.c |
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c index da7646d767fe..292ae2c90e06 100644 --- a/tools/perf/util/thread_map.c +++ b/tools/perf/util/thread_map.c | |||
| @@ -136,8 +136,7 @@ struct thread_map *thread_map__new_by_uid(uid_t uid) | |||
| 136 | if (grow) { | 136 | if (grow) { |
| 137 | struct thread_map *tmp; | 137 | struct thread_map *tmp; |
| 138 | 138 | ||
| 139 | tmp = realloc(threads, (sizeof(*threads) + | 139 | tmp = thread_map__realloc(threads, max_threads); |
| 140 | max_threads * sizeof(pid_t))); | ||
| 141 | if (tmp == NULL) | 140 | if (tmp == NULL) |
| 142 | goto out_free_namelist; | 141 | goto out_free_namelist; |
| 143 | 142 | ||
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index 4b89118f158d..44d440da15dc 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c | |||
| @@ -236,18 +236,16 @@ static struct dso *__machine__findnew_compat(struct machine *machine, | |||
| 236 | const char *file_name; | 236 | const char *file_name; |
| 237 | struct dso *dso; | 237 | struct dso *dso; |
| 238 | 238 | ||
| 239 | pthread_rwlock_wrlock(&machine->dsos.lock); | ||
| 240 | dso = __dsos__find(&machine->dsos, vdso_file->dso_name, true); | 239 | dso = __dsos__find(&machine->dsos, vdso_file->dso_name, true); |
| 241 | if (dso) | 240 | if (dso) |
| 242 | goto out_unlock; | 241 | goto out; |
| 243 | 242 | ||
| 244 | file_name = vdso__get_compat_file(vdso_file); | 243 | file_name = vdso__get_compat_file(vdso_file); |
| 245 | if (!file_name) | 244 | if (!file_name) |
| 246 | goto out_unlock; | 245 | goto out; |
| 247 | 246 | ||
| 248 | dso = __machine__addnew_vdso(machine, vdso_file->dso_name, file_name); | 247 | dso = __machine__addnew_vdso(machine, vdso_file->dso_name, file_name); |
| 249 | out_unlock: | 248 | out: |
| 250 | pthread_rwlock_unlock(&machine->dsos.lock); | ||
| 251 | return dso; | 249 | return dso; |
| 252 | } | 250 | } |
| 253 | 251 | ||
