aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-11-20 08:29:46 -0500
committerIngo Molnar <mingo@kernel.org>2013-11-20 08:29:46 -0500
commite98a6e59dff885eb387163b1a7abe019a44ba90b (patch)
tree7b6c80f50a69d962765626ef7e3641081dcf2d02 /tools/perf/util/thread.c
parent0022cedd4a7d8a87841351e2b018bb6794cf2e67 (diff)
parent6b5fa0ba4f85a8499287aefaf3f1375450c40c6d (diff)
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo: * Tag thread comm as overriden, showing the right comm for threads after forks. (Frederic Weisbecker) * Fix memory leak when processing perf.data file header. (Namhyung Kim.) * Don't try to free string constant used for anonymous event groups. (Namhyung Kim) * Fix use of multiple options in processing field in libtraceevent. (Steven Rostedt) * Fix conversion of pointer to integer of different size in libtraceevent. (Arnaldo Carvalho de Melo) 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.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index cd8e2f592719..49eaf1d7d89d 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -70,14 +70,13 @@ int thread__set_comm(struct thread *thread, const char *str, u64 timestamp)
70 /* Override latest entry if it had no specific time coverage */ 70 /* Override latest entry if it had no specific time coverage */
71 if (!curr->start) { 71 if (!curr->start) {
72 comm__override(curr, str, timestamp); 72 comm__override(curr, str, timestamp);
73 return 0; 73 } else {
74 new = comm__new(str, timestamp);
75 if (!new)
76 return -ENOMEM;
77 list_add(&new->list, &thread->comm_list);
74 } 78 }
75 79
76 new = comm__new(str, timestamp);
77 if (!new)
78 return -ENOMEM;
79
80 list_add(&new->list, &thread->comm_list);
81 thread->comm_set = true; 80 thread->comm_set = true;
82 81
83 return 0; 82 return 0;