Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740AbbG0Mqv (ORCPT ); Mon, 27 Jul 2015 08:46:51 -0400 Received: from mga03.intel.com ([134.134.136.65]:20985 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbbG0Mqt convert rfc822-to-8bit (ORCPT ); Mon, 27 Jul 2015 08:46:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,553,1432623600"; d="scan'208";a="613574683" From: "Liang, Kan" To: Jiri Olsa , Andi Kleen CC: Jiri Olsa , Arnaldo Carvalho de Melo , Ulrich Drepper , Will Deacon , Stephane Eranian , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra Subject: RE: [RFC 00/47] perf stat: Add scripting support Thread-Topic: [RFC 00/47] perf stat: Add scripting support Thread-Index: AQHQw8OTKfkIre4u9k2dhWIAUvk/cp3tRpsAgAIBf+A= Date: Mon, 27 Jul 2015 12:46:39 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077018CCC9E@SHSMSX103.ccr.corp.intel.com> References: <1437481927-29538-1-git-send-email-jolsa@kernel.org> <20150721144308.GL1747@two.firstfloor.org> <20150726135108.GB17020@krava.brq.redhat.com> In-Reply-To: <20150726135108.GB17020@krava.brq.redhat.com> 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: 1919 Lines: 46 > > On Tue, Jul 21, 2015 at 04:43:08PM +0200, Andi Kleen wrote: > > On Tue, Jul 21, 2015 at 02:31:20PM +0200, Jiri Olsa wrote: > > > hi, > > > sending RFC on another attempt for stat scripting. > > > > > > The initial attempt defined its own formula lang and allowed > > > triggering user's script on the end of the stat command: > > > http://marc.info/?l=linux-kernel&m=136742146322273&w=2 > > > > > > This patchset abandons the idea of new formula language and rather > > > adds support to: > > > - store stat data into perf.data file > > > - add python support to process stat events > > > > > > Basically it allows to store stat data into perf.data and post > > > process it with python scripts in a similar way we do for sampling > > > data. > > > > I suspect there is some overlap with Kan's patchkit to put uncore data > > into perf.data too. > > hum, haven't seen this, was it posted already? > Not yet. But I think the proposal is different as yours. It intends to regularly read (10-20ms interval) counter during perf sampling. So I modified the perf record, added a timer to read counter regularly, and wrote the delta results into perf.data. We want to do that is because we can read memory bandwidth from uncore event during cpu PMU event is sampling. The sophisticated bandwidth analysis requires fine granularity. We cannot use sample read, because we need stable interval. We tried to run perf record and perf stat together by script. But the script way have various issue and complex to parses the output. So I propose to change the perf record and regularly write the counter value into perf.data I will send them to review soon. 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/