From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbdIESQT (ORCPT ); Tue, 5 Sep 2017 14:16:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:58910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbdIESQQ (ORCPT ); Tue, 5 Sep 2017 14:16:16 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D10A21B7F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Tue, 5 Sep 2017 15:16:12 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v3 06/11] perf, tools, stat: Support JSON metrics in perf stat Message-ID: <20170905181612.GH22298@kernel.org> References: <20170831194036.30146-1-andi@firstfloor.org> <20170831194036.30146-7-andi@firstfloor.org> <20170904171128.GB22298@kernel.org> <20170904173725.GU2482@two.firstfloor.org> <20170905180919.GG22298@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170905180919.GG22298@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Sep 05, 2017 at 03:09:19PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Sep 04, 2017 at 10:37:25AM -0700, Andi Kleen escreveu: > > On Mon, Sep 04, 2017 at 02:11:28PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Thu, Aug 31, 2017 at 12:40:31PM -0700, Andi Kleen escreveu: > > > > The actual JSON metrics are in a separate pull request. > > > > > > Yeah, I noticed when trying to test it :-\ > > > > > > Was this pull req submitted? > > > > Not yet. I was waiting to finish review. > > > > It makes perf crash until you apply the metricgroup patchkit first. > > > > But you can get it here > > > > git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git perf/intel-json-metrics-2 > > Ok, so I tried installing the Broadwell ones (one of my test machines) > and got into: > > [root@jouet ~]# perf stat -M Pipeline flops > bpf: builtin compilation failed: -95, try external compiler So there is no 'flops' binary here, unsure if the problem is related to that, if so, we need a fix. But that doesn't seem to be the case, as with a metric that works I get a sensible error message: [root@jouet ~]# perf stat -M Memory_BW --metric-only -a flops Workload failed: No such file or directory [root@jouet ~]# Anyway, testing with some other metric I got some results: [root@jouet ~]# perf stat -M FLOPS --metric-only -a sleep 1 Cannot set up events {fp_arith_inst_retired.scalar_single,fp_arith_inst_retired.scalar_double,fp_arith_inst_retired.128b_packed_double,fp_arith_inst_retired.128b_packed_single,fp_arith_inst_retired.256b_packed_double,fp_arith_inst_retired.256b_packed_single,duration_time}:W Usage: perf stat [] [] -M, --metrics monitor specified metrics or metric groups (separated by ,) [root@jouet ~]# perf stat -M Memory_BW --metric-only -a sleep 1 Performance counter stats for 'system wide': MLP 2.9 1.001544615 seconds time elapsed [root@jouet ~]# > ERROR: problems with path cpu/uops_executed.c: No such file or directory > Cannot set up events {uops_retired.retire_slots,inst_retired.any}:W,{inst_retired.any,cycles}:W,{uops_executed.thread,cpu/uops_executed.core,cmask=1/,uops_executed.cycles_ge_1_uop_exec}:W > > Usage: perf stat [] [] > > -M, --metrics > monitor specified metrics or metric groups (separated by ,) > [root@jouet ~]# perf stat -M Pipeline flops > > > Wasn't this already fixed? > > This is with these patches applied: > > [acme@jouet linux]$ git log --oneline -5 > 5e6bf24a1929 (HEAD) perf stat: Support JSON metrics in perf stat > b1e1f50913c8 perf pmu: Extract function to get JSON alias map > af8aca46b528 perf stat: Print generic metric header even for failed expressions > 15669491ee54 perf stat: Factor out generic metric printing > 7d8900f2984c perf vendor events: Support metric_group and no event name in JSON parser > [acme@jouet linux]$ git log --oneline -10 > 5e6bf24a1929 (HEAD) perf stat: Support JSON metrics in perf stat > b1e1f50913c8 perf pmu: Extract function to get JSON alias map > af8aca46b528 perf stat: Print generic metric header even for failed expressions > 15669491ee54 perf stat: Factor out generic metric printing > 7d8900f2984c perf vendor events: Support metric_group and no event name in JSON parser > 8f6ea3aac2e2 perf tools: Support weak groups in 'perf stat' > b5ef5ea5e8ed perf sched timehist: Add pid and tid options > eba9fac01761 (tag: perf-core-for-mingo-4.14-20170901, acme/perf/core) perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB > 63ce8449bc10 perf stat: Only auto-merge events that are PMU aliases > fc33dccba395 perf test: Add test case for PERF_SAMPLE_PHYS_ADDR > [acme@jouet linux]$ > > Will try with all of them... > > - Arnaldo