Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753810AbbHDRHr (ORCPT ); Tue, 4 Aug 2015 13:07:47 -0400 Received: from mga11.intel.com ([192.55.52.93]:36860 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbbHDRHq convert rfc822-to-8bit (ORCPT ); Tue, 4 Aug 2015 13:07:46 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,610,1432623600"; d="scan'208";a="535921168" From: "Liang, Kan" To: Arnaldo Carvalho de Melo , Jiri Olsa CC: "a.p.zijlstra@chello.nl" , "luto@kernel.org" , "mingo@redhat.com" , "eranian@google.com" , "ak@linux.intel.com" , "mark.rutland@arm.com" , "Hunter, Adrian" , "jolsa@kernel.org" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH V3 3/5] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D Thread-Topic: [PATCH V3 3/5] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D Thread-Index: AQHQyWV+CleGj+RxfkeQc0495vEJF53x4jqAgAAvdwCAAAgyAIAKAvBA Date: Tue, 4 Aug 2015 17:07:40 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077018D186D@SHSMSX103.ccr.corp.intel.com> References: <1438082975-47730-1-git-send-email-kan.liang@intel.com> <1438082975-47730-4-git-send-email-kan.liang@intel.com> <20150729125329.GH9606@krava.brq.redhat.com> <20150729154322.GI575@kernel.org> <20150729161242.GJ575@kernel.org> In-Reply-To: <20150729161242.GJ575@kernel.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1693 Lines: 46 > Em Wed, Jul 29, 2015 at 12:43:22PM -0300, Arnaldo Carvalho de Melo > escreveu: > > Em Wed, Jul 29, 2015 at 02:53:29PM +0200, Jiri Olsa escreveu: > > > > switch (event->header.type) { > > > > case PERF_RECORD_SAMPLE: > > > > - dump_sample(evsel, event, sample); > > > > if (evsel == NULL) { > > > > ++evlist->stats.nr_unknown_id; > > > > return 0; > > > > } > > > > + dump_sample(session, evlist, evsel, event, sample); > > > > > > same here, you could pass only session all the way through > > > > I'll take a look at how interesting it would be to have a > > evsel->evlist, that if NULL means the evsel is freestanding, but when > > it is linked to an evlist, then it will be there. This way we wouldn't > > have to pass (evlist, evsel) when the main purpose of a function is > > about an evsel but we need information that is logically associated to > > all evsels in a list, i.e. that is in evsel->evlist. > > There are no cases where a function receives (evsel, evlist) with that evlist > containing that evsel :-\ > > Perhaps this will be the first, i.e. rename perf_session_env to perf_env, > then store it in evlist->env, then when processing something where we > have a evsel or evlist we can access that env from: > > evsel->evlist->env; > > Will continue after lunch, trying to prototype what I just described. > Hi Arnaldo, Have you got a chance to implement the prototype for evlist->env? Thanks, Kan -- 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/