From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Kan Liang <kan.liang@linux.intel.com>,
Zhengjun Xing <zhengjun.xing@linux.intel.com>,
Sandipan Das <sandipan.das@amd.com>,
Claire Jensen <cjense@google.com>, Alyssa Ross <hi@alyssa.is>,
Like Xu <likexu@tencent.com>, James Clark <james.clark@arm.com>,
Florian Fischer <florian.fischer@muhq.space>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Claire Jensen <clairej735@gmail.com>
Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com>
Subject: [PATCH 0/2] JSON output for perf stat
Date: Sun, 15 May 2022 10:35:56 -0700 [thread overview]
Message-ID: <20220515173558.2289702-1-irogers@google.com> (raw)
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
next reply other threads:[~2022-05-15 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-15 17:35 Ian Rogers [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220515173558.2289702-1-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=cjense@google.com \
--cc=clairej735@gmail.com \
--cc=eranian@google.com \
--cc=florian.fischer@muhq.space \
--cc=hi@alyssa.is \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=likexu@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=sandipan.das@amd.com \
--cc=zhengjun.xing@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).