From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756247AbbCCOTZ (ORCPT ); Tue, 3 Mar 2015 09:19:25 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36052 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbbCCOTX (ORCPT ); Tue, 3 Mar 2015 09:19:23 -0500 Date: Tue, 3 Mar 2015 23:18:41 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Frederic Weisbecker , Adrian Hunter , Stephane Eranian , Andi Kleen , David Ahern Subject: Re: [PATCH 10/38] perf tools: Pass session arg to perf_event__preprocess_sample() Message-ID: <20150303141841.GD27046@danjae> References: <1425352070-1115-1-git-send-email-namhyung@kernel.org> <1425352070-1115-11-git-send-email-namhyung@kernel.org> <20150303135930.GG5187@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150303135930.GG5187@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 03, 2015 at 10:59:30AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 03, 2015 at 12:07:22PM +0900, Namhyung Kim escreveu: > > The perf_event__preprocess_sample() translates a given ip into a > > matching symbol. To do that, it first finds a corresponding thread > > and map in the current thread tree. But for indexed data files, it > > needs to find a thread (and map) with slightly different APIs using > > timestamp. So it needs a way to know whether this session deals with > > an indexed data file or not. > > I need to look into this, but in general, I'm trying to _remove_ > accesses to perf_session :-) The reason is that it needs to know whether the current session has index so that it's accessing the samples in sequence or in random order. If we can save that info at some other place (like a global variable?) it doesn't need to pass session. Thanks, Namhyung