From: tip-bot for David Ahern <dsahern@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@redhat.com, peterz@infradead.org, fweisbec@gmail.com,
dsahern@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf script: look up thread using tid instead of pid
Date: Thu, 29 Dec 2011 12:48:29 -0800 [thread overview]
Message-ID: <tip-64aab93cdffb3967642ffab954395ae2400c0b06@git.kernel.org> (raw)
In-Reply-To: <1324578603-12762-4-git-send-email-dsahern@gmail.com>
Commit-ID: 64aab93cdffb3967642ffab954395ae2400c0b06
Gitweb: http://git.kernel.org/tip/64aab93cdffb3967642ffab954395ae2400c0b06
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Thu, 22 Dec 2011 11:30:03 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 23 Dec 2011 16:35:00 -0200
perf script: look up thread using tid instead of pid
This allows the thread name to be dispalyed when dumping
events:
myapp 25118 [000] 450385.538815: context-switches ...
myapp:worker 25119 [000] 450385.538894: context-switches ...
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1324578603-12762-4-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-script.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index ea71c5e..d71b745 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -443,7 +443,7 @@ static int process_sample_event(struct perf_tool *tool __used,
struct machine *machine)
{
struct addr_location al;
- struct thread *thread = machine__findnew_thread(machine, event->ip.pid);
+ struct thread *thread = machine__findnew_thread(machine, event->ip.tid);
if (thread == NULL) {
pr_debug("problem processing %d event, skipping it.\n",
prev parent reply other threads:[~2011-12-29 20:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 18:30 [PATCH 0/3] perf: working with multithreaded processes with named threads David Ahern
2011-12-22 18:30 ` [PATCH 1/3] perf: fix comm for " David Ahern
2011-12-29 20:46 ` [tip:perf/core] perf tools: Fix " tip-bot for David Ahern
2011-12-22 18:30 ` [PATCH 2/3 v2] perf: look up thread names for system wide profiling David Ahern
2011-12-29 20:47 ` [tip:perf/core] perf tools: Look " tip-bot for David Ahern
2011-12-22 18:30 ` [PATCH 3/3] perf script: look up thread using tid instead of pid David Ahern
2011-12-29 20:48 ` tip-bot for David Ahern [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-64aab93cdffb3967642ffab954395ae2400c0b06@git.kernel.org \
--to=dsahern@gmail.com \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome