From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754155Ab1L2Usz (ORCPT ); Thu, 29 Dec 2011 15:48:55 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39512 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753525Ab1L2Usw (ORCPT ); Thu, 29 Dec 2011 15:48:52 -0500 Date: Thu, 29 Dec 2011 12:48:29 -0800 From: tip-bot for David Ahern Message-ID: 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 Reply-To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, acme@redhat.com, fweisbec@gmail.com, peterz@infradead.org, dsahern@gmail.com, tglx@linutronix.de, mingo@elte.hu In-Reply-To: <1324578603-12762-4-git-send-email-dsahern@gmail.com> References: <1324578603-12762-4-git-send-email-dsahern@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: look up thread using tid instead of pid Git-Commit-ID: 64aab93cdffb3967642ffab954395ae2400c0b06 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Thu, 29 Dec 2011 12:48:35 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 64aab93cdffb3967642ffab954395ae2400c0b06 Gitweb: http://git.kernel.org/tip/64aab93cdffb3967642ffab954395ae2400c0b06 Author: David Ahern AuthorDate: Thu, 22 Dec 2011 11:30:03 -0700 Committer: Arnaldo Carvalho de Melo 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 Cc: Ingo Molnar Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1324578603-12762-4-git-send-email-dsahern@gmail.com Signed-off-by: David Ahern Signed-off-by: Arnaldo Carvalho de Melo --- 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",