[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7ch3SkBzjXUsGXKTqQzAkvCpm1jOmf5YEf609t1v=4v0wg@mail.gmail.com>
Date: Wed, 16 Nov 2022 15:04:52 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>,
Weilin Wang <weilin.wang@...el.com>,
Perry Taylor <perry.taylor@...el.com>,
Caleb Biggers <caleb.biggers@...el.com>,
Leo Yan <leo.yan@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Sandipan Das <sandipan.das@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Xin Gao <gaoxin@...rlc.com>, Rob Herring <robh@...nel.org>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v3 10/10] perf list: Add json output option
Hi,
On Tue, Nov 15, 2022 at 5:44 AM Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
>
> Em Mon, Nov 14, 2022 at 01:07:23PM -0800, Ian Rogers escreveu:
> > Output events and metrics in a json format by overriding the print
> > callbacks. Currently other command line options aren't supported and
> > metrics are repeated once per metric group.
>
> Applied the patch with a few fixes and added this to the last cset:
>
> commit c9367a0658ebcfe8ab0bc4af2648f144c64b53a4
> Author: Ian Rogers <irogers@...gle.com>
> Date: Mon Nov 14 13:07:23 2022 -0800
>
> perf list: Add JSON output option
>
> Output events and metrics in a JSON format by overriding the print
> callbacks. Currently other command line options aren't supported and
> metrics are repeated once per metric group.
>
> Committer testing:
>
> $ perf list cache
>
> List of pre-defined events (to be used in -e or -M):
>
> L1-dcache-load-misses [Hardware cache event]
> L1-dcache-loads [Hardware cache event]
> L1-dcache-prefetches [Hardware cache event]
> L1-icache-load-misses [Hardware cache event]
> L1-icache-loads [Hardware cache event]
> branch-load-misses [Hardware cache event]
> branch-loads [Hardware cache event]
> dTLB-load-misses [Hardware cache event]
> dTLB-loads [Hardware cache event]
> iTLB-load-misses [Hardware cache event]
> iTLB-loads [Hardware cache event]
> $ perf list --json cache
> [
> {
> "Unit": "cache",
It's confusing to call it 'unit', but we have it in the JSON metrics, sigh..
Thanks,
Namhyung
> "EventName": "L1-dcache-load-misses",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "L1-dcache-loads",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "L1-dcache-prefetches",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "L1-icache-load-misses",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "L1-icache-loads",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "branch-load-misses",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "branch-loads",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "dTLB-load-misses",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "dTLB-loads",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "iTLB-load-misses",
> "EventType": "Hardware cache event"
> },
> {
> "Unit": "cache",
> "EventName": "iTLB-loads",
> "EventType": "Hardware cache event"
> }
> ]
> $
>
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: Caleb Biggers <caleb.biggers@...el.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Kajol Jain <kjain@...ux.ibm.com>
> Cc: Kan Liang <kan.liang@...ux.intel.com>
> Cc: Leo Yan <leo.yan@...aro.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Perry Taylor <perry.taylor@...el.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Ravi Bangoria <ravi.bangoria@....com>
> Cc: Rob Herring <robh@...nel.org>
> Cc: Sandipan Das <sandipan.das@....com>
> Cc: Stephane Eranian <eranian@...gle.com>
> Cc: Weilin Wang <weilin.wang@...el.com>
> Cc: Xin Gao <gaoxin@...rlc.com>
> Cc: Xing Zhengjun <zhengjun.xing@...ux.intel.com>
> Link: http://lore.kernel.org/lkml/20221114210723.2749751-11-irogers@google.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Powered by blists - more mailing lists