Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754754Ab2FKOJA (ORCPT ); Mon, 11 Jun 2012 10:09:00 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:40270 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753883Ab2FKOI7 (ORCPT ); Mon, 11 Jun 2012 10:08:59 -0400 Date: Mon, 11 Jun 2012 11:08:52 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Dmitry Antipov , Ingo Molnar , Paul Mackerras , Peter Zijlstra , linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org, patches@linaro.org Subject: Re: [PATCH] perf sched replay: fix event lookup Message-ID: <20120611140852.GB2202@infradead.org> References: <1339232758-920-1-git-send-email-dmitry.antipov@linaro.org> <87pq96pfj9.fsf@sejong.aot.lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pq96pfj9.fsf@sejong.aot.lge.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 27 Em Mon, Jun 11, 2012 at 02:46:02PM +0900, Namhyung Kim escreveu: > On Sat, 9 Jun 2012 13:05:58 +0400, Dmitry Antipov wrote: > > Use new function trace_find_event_by_name to lookup events before > > looking through /sys files. This helps 'perf sched replay' to map > > event names to IDs correctly when processing perf.data recorded > > on another machine. > > Basically the same approach with the previous reply, please put this > into trace_event__id(). And minor nits below.. Well, trace_event__id() is private to evlist and evlist so far is a local thing, i.e. it doesn't know anything about perf.data files. So I think we should have a per perf.data (perf_session) method that knows that it shouldn't look _at all_ to /sys, but just at what came in the perf.data file. As well when we want something that is on the running machine, even if we're dealing somehow with a perf.data file, we shouldn't use what is in it. - Arnaldo -- 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/