perf stat: Improve perf stat output (v2)
Status from this message: Thanks, applied the series.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | perf stat: Fix cgroup display in JSON outputtools/ | +1 | 2 replies | |
| 2/15 | perf stat: Move summary prefix printing logic in CSV outputtools/ | +7 | 1 reply | |
| 3/15 | perf stat: Do not align time prefix in CSV outputtools/ | +6 | 1 reply | |
| 4/15 | perf stat: Use scnprintf() in prepare_interval()tools/ | +10 | 1 reply | |
| 5/15 | perf stat: Remove prefix argument in print_metric_headers()tools/ | +10 | 6 replies | |
| 6/15 | perf stat: Remove metric_only argument in print_counter_aggrdata()tools/ | +6 | 1 reply | |
| 7/15 | perf stat: Pass const char *prefix to display routinestools/ tools/ | +10 | 1 reply | |
| 8/15 | perf stat: Use struct outstate in evlist__print_counters()tools/ | +14 | 1 reply | |
| 9/15 | perf stat: Pass struct outstate to print_metric_begin()tools/ | +28 | 1 reply | |
| 10/15 | perf stat: Pass struct outstate to printout()tools/ | +18 | 1 reply | |
| 11/15 | perf stat: Do not pass runtime_stat to printout()tools/ | +4 | 1 reply | |
| 12/15 | perf stat: Pass through struct outstatetools/ tools/ tools/ +1 more | +50 | 1 reply | |
| 13/15 | perf stat: Fix JSON output in metric-only modetools/ | +24 | 1 reply | |
| 14/15 | perf stat: Rename "aggregate-number" to "cpu-count" in JSONtools/ | +4 | 5 replies | |
| 15/15 | perf stat: Tidy up JSON metric-only output when no metricstools/ | +17 | 1 reply |
Reviews trailers per patch
14 of 15 patches have a Reviewed-by or Acked-by.
| Patch | Ian Rogers |
|---|---|
| 1/15 | A-b |
| 2/15 | A-b |
| 3/15 | A-b |
| 4/15 | A-b |
| 5/15 | A-b |
| 6/15 | A-b |
| 7/15 | A-b |
| 8/15 | A-b |
| 9/15 | A-b |
| 10/15 | A-b |
| 11/15 | A-b |
| 12/15 | A-b |
| 13/15 | A-b |
| 14/15 | |
| 15/15 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHSET 00/15] perf stat: Improve perf stat output (v2)
Hello,
This is a continuation of my perf stat cleanup work focusing on the metric-only mode with JSON output now. It's based on the previous patchset which is already merged to acme/perf/core.
The JSON output + metric-only with aggregation has been broken for a while. The last update fixed the crash but it still produced invalid JSON objects. Also having a separate header and objects with their own "metric-value" key is not convenient to process.
# perf stat -aj --metric-only --per-socket sleep 1
{"unit" : "GHz"}{"unit" : "insn per cycle"}{"unit" : "branch-misses of all branches"}
{"socket" : "S0", "aggregate-number" : 8, {"metric-value" : "0.809"}{"metric-value" : "2.10"}{"metric-value" : "0.37"}So I removed the header and move the metric keys to the object. Then it doesn't need separate objects anymore. The new output looks like:
# perf stat -aj --metric-only --per-socket sleep 1
{"socket" : "S0", "cpu-count" : 8, "GHz" : "0.817", "insn per cycle" : "2.15", "branch-misses of all branches" : "0.38"}You can get it from 'perf/stat-display-v2' branch in
git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
Thanks,
Namhyung
Namhyung Kim (15):
perf stat: Fix cgroup display in JSON output
perf stat: Move summary prefix printing logic in CSV output perf stat: Do not align time prefix in CSV output
perf stat: Use scnprintf() in prepare_interval()
perf stat: Remove prefix argument in print_metric_headers() perf stat: Remove metric_only argument in print_counter_aggrdata() perf stat: Pass const char *prefix to display routines perf stat: Use struct outstate in evlist__print_counters() perf stat: Pass struct outstate to print_metric_begin() perf stat: Pass struct outstate to printout()
perf stat: Do not pass runtime_stat to printout()
perf stat: Pass through struct outstate
perf stat: Fix JSON output in metric-only mode
perf stat: Rename "aggregate-number" to "cpu-count" in JSON perf stat: Tidy up JSON metric-only output when no metrics
tools/perf/arch/x86/util/iostat.c | 4 +- tools/perf/util/iostat.c | 3 +- tools/perf/util/iostat.h | 4 +- tools/perf/util/stat-display.c | 257 +++++++++++++++--------------- 4 files changed, 133 insertions(+), 135 deletions(-)
base-commit: 63a3bf5e8d9e79ce456c8f73d4395a5a51d841b1
Signature · 1 line
2.38.1.584.g0f3c55d4c2-goog