From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754792AbbIHNdJ (ORCPT ); Tue, 8 Sep 2015 09:33:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754175AbbIHNdG (ORCPT ); Tue, 8 Sep 2015 09:33:06 -0400 Date: Tue, 8 Sep 2015 15:33:02 +0200 From: Jiri Olsa To: pi3orama Cc: "Wangnan (F)" , "kan.liang@intel.com" , "acme@kernel.org" , "linux-kernel@vger.kernel.org" , "lizefan@huawei.com" , Adrian Hunter , Andi Kleen , Jiri Olsa , Namhyung Kim , Stephane Eranian , Arnaldo Carvalho de Melo Subject: Re: [PATCH] perf report: Fix invalid memory accessing Message-ID: <20150908133302.GE2038@krava.brq.redhat.com> References: <1441630315-189525-1-git-send-email-wangnan0@huawei.com> <55ED90BE.9090706@huawei.com> <20150908073747.GA2038@krava.brq.redhat.com> <55EE9887.9030304@huawei.com> <20150908131349.GD2038@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Sep 08, 2015 at 09:16:31PM +0800, pi3orama wrote: SNIP > >> Now I understand your suggestion. You mean we can build env->cpu before > >> processing the first sample, then init al.socket using that map instead > > > > hum, that should be the case anyway.. features are read before events > > > >> of calling cpu_map__get_socket_id() unconditionally in an ad-hoc way. > >> > >> And I have another question that, since build_cpu_topo() and > >> perf_event__preprocess_sample() are more or less doing similar things, > >> why we need both of them? > > > > perf_event__preprocess_sample is called for each sample, > > while build_cpu_topo is part of storing topology feature > Sorry, what I wanted to say should be: > cpu_map__get_socket_id() and build_cpu_topo()... cpu_map__get_socket_id is also used by perf stat jirka