From: tip-bot for Frederic Weisbecker <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@kernel.org, namhyung@kernel.org, fweisbec@gmail.com,
dsahern@gmail.com, tglx@linutronix.de
Subject: [tip:perf/urgent] perf tools: Tag thread comm as overriden
Date: Wed, 20 Nov 2013 05:55:12 -0800 [thread overview]
Message-ID: <tip-a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb@git.kernel.org> (raw)
In-Reply-To: <20131116010207.GA18855@localhost.localdomain>
Commit-ID: a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb
Gitweb: http://git.kernel.org/tip/a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Sat, 16 Nov 2013 02:02:09 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.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@gmail.com>
Tested-by: David Ahern <dsahern@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20131116010207.GA18855@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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;
prev parent reply other threads:[~2013-11-20 13:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 4:58 perf tip: fails to convert comm David Ahern
2013-11-13 18:03 ` Frederic Weisbecker
2013-11-13 18:06 ` David Ahern
2013-11-13 18:30 ` Frederic Weisbecker
2013-11-13 18:07 ` Arnaldo Carvalho de Melo
2013-11-13 18:29 ` Frederic Weisbecker
2013-11-15 16:29 ` David Ahern
2013-11-16 1:02 ` Frederic Weisbecker
2013-11-16 11:53 ` Namhyung Kim
2013-11-16 15:18 ` David Ahern
2013-11-20 13:55 ` tip-bot for Frederic Weisbecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a5285ad9e30fd90b88a11adcab97bd4c3ffe44eb@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.