Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756019Ab3G2WTS (ORCPT ); Mon, 29 Jul 2013 18:19:18 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:65040 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754183Ab3G2WTQ (ORCPT ); Mon, 29 Jul 2013 18:19:16 -0400 Message-ID: <51F6EA60.7020208@gmail.com> Date: Mon, 29 Jul 2013 16:19:12 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Adrian Hunter CC: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Frederic Weisbecker , Jiri Olsa , Mike Galbraith , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Stephane Eranian , Ingo Molnar Subject: Re: [PATCH V8 04/15] perf tools: change machine__findnew_thread() to set thread pid References: <1374144177-24762-1-git-send-email-adrian.hunter@intel.com> <1374144177-24762-5-git-send-email-adrian.hunter@intel.com> <51F29DAC.7000803@gmail.com> <51F4F5D4.8080405@intel.com> In-Reply-To: <51F4F5D4.8080405@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 27 On 7/28/13 4:43 AM, Adrian Hunter wrote: >>> - thread = machine__findnew_thread(machine, event->ip.pid); >>> + thread = machine__findnew_thread(machine, event->ip.pid, >>> event->ip.pid); >> >> event->ip.tid? at a minimum current functionality is retained with >> machine__findnew_thread(machine, 0, event->ip.pid) > > perf tools records mmap information against the process's main thread > for which pid == tid. So the correct values are being passed here. Yes. It's a case by case -- if you want syms use pid, otherwise use tid. It would be less confusing if the API was improved - always take pid and tid along with an arg that says 'want syms' or a separate function name. But I digress. Looking at your patch does maintain the tid element so it should be fine. I ran a few tests with perf-script and the output is the same after the patch, so.. Acked-by: David Ahern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/