From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbbIJOOE (ORCPT ); Thu, 10 Sep 2015 10:14:04 -0400 Received: from mail.kernel.org ([198.145.29.136]:49665 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753709AbbIJOOA (ORCPT ); Thu, 10 Sep 2015 10:14:00 -0400 Date: Thu, 10 Sep 2015 11:13:55 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Kan Liang , Ingo Molnar , linux-kernel@vger.kernel.org, Adrian Hunter , Borislav Petkov , David Ahern , Frederic Weisbecker , Namhyung Kim , Stephane Eranian , Wang Nan Subject: Re: [RFC 00/13] perf_env/CPU socket reorg/fixes Message-ID: <20150910141355.GA23511@kernel.org> References: <1441828225-667-1-git-send-email-acme@kernel.org> <20150910091906.GA3854@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150910091906.GA3854@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com 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 Em Thu, Sep 10, 2015 at 11:19:06AM +0200, Jiri Olsa escreveu: > On Wed, Sep 09, 2015 at 04:50:12PM -0300, Arnaldo Carvalho de Melo wrote: > > Please take a look at these changes to fix the problems reported by > > Wang Nan wrt accesses to the cpu_topology_map information. > > > > The fixes are present on these following two csets: > > > > perf event: Use machine->env to find the cpu -> socket mapping > > perf report: Do not blindly use env->cpu[al.cpu].socket_id > > > > The rest are fixes made while working on this, infrastructure to enable > > the fixes, reverts for things that ended up not being necessary and some > > cleanups. > > > > It is available at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/env > > > > Please let me know if I can have your Acked-by, Tested-by or > > Reviewed-by. > > perf_env holds the data for perf.data session.. is the plan to keep No, perf_env holds the data for the environment where samples were taken. It is needed to generate a perf.data file, and also now is needed to map cpu -> socket_id, be it in a live session, where no perf.data file, nor perf_session stuff is used (perf trace, I keep meaning to do the 'perf top' conversion away from perf_session, others in the future). I.e. perf_event__preprocess_sample() doesn't have to know if the samples were freshly taken or if they come from another machine, possibly of a different architecture. > it like this, or it's to be used in some other way? Moving it out of > session/header real suggest that.. just asking ;-) They are already used in another way, i.e. we need to have that mapping of cpu -> socket_id, to stop reading /sys/ to figure that out. I.e. perf_env is, among other sampling/tracing environment, a cache of that info, taken at perf.data generation time or at tool start time, if that info is needed (i.e. if we use "socket" in -s). - Arnaldo