[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Aug 2022 14:55:38 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Sandipan Das <sandipan.das@....com>,
Claire Jensen <cjense@...gle.com>, Alyssa Ross <hi@...ssa.is>,
Like Xu <likexu@...cent.com>,
James Clark <james.clark@....com>,
Florian Fischer <florian.fischer@...q.space>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-perf-users <linux-perf-users@...r.kernel.org>,
Claire Jensen <clairej735@...il.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v7 0/2] JSON output for perf stat
Hi Ian,
On Fri, Aug 5, 2022 at 1:01 PM Ian Rogers <irogers@...gle.com> wrote:
>
> Parsing the CSV or text output of perf stat can be problematic when
> new output is added (columns in CSV format). JSON names values and
> simplifies the job of parsing. Add a JSON output option to perf-stat
> then add unit test that parses and validates the output.
>
> This is a resend of two v2 patches:
> https://lore.kernel.org/lkml/20210813220754.2104922-1-cjense@google.com/
> https://lore.kernel.org/lkml/20210813220936.2105426-1-cjense@google.com/
> with a few formatting changes and improvements to the linter.
>
> v7. Weakens a test and adds a Makefile.perf change Suggested-by:
> Arnaldo Carvalho de Melo <acme@...nel.org>.
>
> v6. Is a rebase.
>
> v5. Drops the merged CSV check, fixes a json test issue found by
> Arnaldo and a typo.
>
> v4. Does some minor fixes to the json linter.
>
> v3. There is some tidy up of CSV code including a potential memory
> over run in the os.nfields set up caught by sanitizers. To
> facilitate this an AGGR_MAX value is added. v3 also adds the CSV
> testing.
>
> v2. Fixes the system wide no aggregation test to not run if the
> paranoia is wrong. It also makes the counter-value check handle
> the "<not counted>" and "<not supported>" cases.
>
> Claire Jensen (2):
> perf stat: Add JSON output option
> perf test: Json format checking
I'd really like to clean up the perf stat output code as it's already hard
to deal with.. Let me do that after adding this. So,
Acked-by: Namhyung Kim <namhyung@...nel.org>
Thanks,
Namhyung
>
> tools/perf/Documentation/perf-stat.txt | 21 +
> tools/perf/Makefile.perf | 3 +-
> tools/perf/builtin-stat.c | 6 +
> .../tests/shell/lib/perf_json_output_lint.py | 96 +++++
> tools/perf/tests/shell/stat+json_output.sh | 147 +++++++
> tools/perf/util/stat-display.c | 383 +++++++++++++-----
> tools/perf/util/stat.c | 1 +
> tools/perf/util/stat.h | 2 +
> 8 files changed, 552 insertions(+), 107 deletions(-)
> create mode 100644 tools/perf/tests/shell/lib/perf_json_output_lint.py
> create mode 100755 tools/perf/tests/shell/stat+json_output.sh
>
> --
> 2.37.1.559.g78731f0fdb-goog
>
Powered by blists - more mailing lists