diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-07-18 06:16:06 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-07-18 06:16:06 +0200 |
| commit | ec6dbcb7ade2a616675cbe3185cf299ee1615c9f (patch) | |
| tree | 4953f7eca477e011aa9e16cdb236220ed9cec4be /tools/perf/util/thread.c | |
| parent | ff2ebe46e15bd49d52b9c2f3fc77f3a9d94eac7b (diff) | |
| parent | 0b437860818dc717f6a9e8a5089223a8414f5fff (diff) | |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
o Support S/390 in 'perf kvm stat' (Alexander Yarygin)
Developer Stuff:
o Various fixes and prep work related to supporting Intel PT (Adrian Hunter)
o Introduce multiple debug variables control (Jiri Olsa)
o Add callchain and additional sample information for python scripts (Joseph Schuchart)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/thread.c')
| -rw-r--r-- | tools/perf/util/thread.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 2fde0d5e40b5..9692c06a9e21 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -13,7 +13,7 @@ int thread__init_map_groups(struct thread *thread, struct machine *machine) struct thread *leader; pid_t pid = thread->pid_; - if (pid == thread->tid) { + if (pid == thread->tid || pid == -1) { thread->mg = map_groups__new(); } else { leader = machine__findnew_thread(machine, pid, pid); @@ -60,8 +60,10 @@ void thread__delete(struct thread *thread) { struct comm *comm, *tmp; - map_groups__put(thread->mg); - thread->mg = NULL; + if (thread->mg) { + map_groups__put(thread->mg); + thread->mg = NULL; + } list_for_each_entry_safe(comm, tmp, &thread->comm_list, list) { list_del(&comm->list); comm__free(comm); @@ -127,12 +129,12 @@ int thread__comm_len(struct thread *thread) size_t thread__fprintf(struct thread *thread, FILE *fp) { return fprintf(fp, "Thread %d %s\n", thread->tid, thread__comm_str(thread)) + - map_groups__fprintf(thread->mg, verbose, fp); + map_groups__fprintf(thread->mg, fp); } void thread__insert_map(struct thread *thread, struct map *map) { - map_groups__fixup_overlappings(thread->mg, map, verbose, stderr); + map_groups__fixup_overlappings(thread->mg, map, stderr); map_groups__insert(thread->mg, map); } |
