[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb@git.kernel.org>
Date: Wed, 20 Nov 2013 05:55:12 -0800
From: tip-bot for Frederic Weisbecker <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com,
mingo@...nel.org, namhyung@...nel.org, fweisbec@...il.com,
dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/urgent] perf tools: Tag thread comm as overriden
Commit-ID: a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb
Gitweb: http://git.kernel.org/tip/a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb
Author: Frederic Weisbecker <fweisbec@...il.com>
AuthorDate: Sat, 16 Nov 2013 02:02:09 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 19 Nov 2013 10:33:29 -0300
perf tools: Tag thread comm as overriden
The problem is that when a thread overrides its default ":%pid" comm, we
forget to tag the thread comm as overriden. Hence, this overriden comm
is not inherited on future forks. Fix it.
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
Tested-by: David Ahern <dsahern@...il.com>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: http://lkml.kernel.org/r/20131116010207.GA18855@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/thread.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index cd8e2f5..49eaf1d 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)
/* Override latest entry if it had no specific time coverage */
if (!curr->start) {
comm__override(curr, str, timestamp);
- return 0;
+ } else {
+ new = comm__new(str, timestamp);
+ if (!new)
+ return -ENOMEM;
+ list_add(&new->list, &thread->comm_list);
}
- new = comm__new(str, timestamp);
- if (!new)
- return -ENOMEM;
-
- list_add(&new->list, &thread->comm_list);
thread->comm_set = true;
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists