linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] JSON output for perf stat
@ 2022-05-15 17:35 Ian Rogers
  2022-05-15 17:35 ` [PATCH 1/2] perf stat: Add JSON output option Ian Rogers
  2022-05-15 17:35 ` [PATCH 2/2] perf test: Json format checking Ian Rogers
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Rogers @ 2022-05-15 17:35 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Kan Liang, Zhengjun Xing, Sandipan Das, Claire Jensen,
	Alyssa Ross, Like Xu, James Clark, Florian Fischer, linux-kernel,
	linux-perf-users, Claire Jensen
  Cc: Stephane Eranian, Ian Rogers

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.


Claire Jensen (2):
  perf stat: Add JSON output option
  perf test: Json format checking

 tools/perf/Documentation/perf-stat.txt        |  21 +
 tools/perf/builtin-stat.c                     |   2 +
 .../tests/shell/lib/perf_json_output_lint.py  |  90 +++++
 tools/perf/tests/shell/stat+json_output.sh    | 141 +++++++
 tools/perf/util/stat-display.c                | 365 +++++++++++++-----
 tools/perf/util/stat.h                        |   1 +
 6 files changed, 534 insertions(+), 86 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.36.0.550.gb090851708-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-15 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-15 17:35 [PATCH 0/2] JSON output for perf stat Ian Rogers
2022-05-15 17:35 ` [PATCH 1/2] perf stat: Add JSON output option Ian Rogers
2022-05-15 17:35 ` [PATCH 2/2] perf test: Json format checking Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).