perf stat: Decouple and modularize display formatting
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest14 patches 7 repliesIn review
- v314 patches 0 repliesSuperseded
- v2 RFC14 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 14 patches | 0 replies | Superseded |
Changes in v4 from the cover letter
- Squash all multi-metric column padding, zero-skip logic, and formatting fixes directly into their introducing commits for a perfectly bisectable, pristine Git history.
- Avoid newlines before signed-off-by, assisted-by, and acked-by tags, organizing all contributor tags into a single, contiguous block for strict checkpatch and LKML compliance.
- Introduce strict, grid-based column padding to perfectly align multi-metric events (e.g. TopdownL1) across both standard and metric-only CSV rows, guaranteeing perfect 6-comma and 7-comma parsing compliance by external DataFrame engines.
- Refactor the PMU and hybrid metric event printer to propagate identical zero-counter skipping semantics in alignment with the legacy abs_printout path.
- Re-run all STD, JSON, and CSV linter test suites to achieve 100% passing status.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | perf stat: Introduce core generic print traversal engine and header stubstools/ tools/ tools/ +6 more | +744 | 1 reply | |
| 2/14 | perf stat: Implement standard console (STD) formatting callbackstools/ | +848 | 1 reply | |
| 3/14 | perf stat: Extend STD output linter to test basic New API checkstools/ | +4 | 0 replies | |
| 4/14 | perf stat: Extend STD output linter to test core aggregation checkstools/ | +11 | 0 replies | |
| 5/14 | perf stat: Extend STD output linter to test advanced PMU checkstools/ | +2 | 0 replies | |
| 6/14 | perf stat: Extend STD output linter to test metric-only checkstools/ | +1 | 1 reply | |
| 7/14 | perf stat: Implement CSV formatting callbackstools/ | +671 | 1 reply | |
| 8/14 | perf stat: Extend CSV output linter to test core aggregation checkstools/ | +16 | 0 replies | |
| 9/14 | perf stat: Extend CSV output linter to test advanced PMU and metric-only checkstools/ | +3 | 0 replies | |
| 10/14 | perf stat: Implement streaming JSON formatting callbackstools/ | +333 | 1 reply | |
| 11/14 | perf stat: Extend JSON output linter to test core aggregation checkstools/ | +45 | 0 replies | |
| 12/14 | perf stat: Extend JSON output linter to test advanced PMU and metric-only checkstools/ | +3 | 0 replies | |
| 13/14 | perf stat: Add --new support to PMU metrics Python validatortools/ | +9 | 0 replies | |
| 14/14 | perf stat: Extend PMU metrics value linter to validate --new outputstools/ | +19 | 0 replies |
Reviews trailers per patch
All 14 patches have a Reviewed-by or Acked-by.
| Patch | Chun-Tse Shao | Arnaldo Carvalho de Melo |
|---|---|---|
| 1/14 | A-b | |
| 2/14 | A-b | |
| 3/14 | A-b | A-b |
| 4/14 | A-b | |
| 5/14 | A-b | |
| 6/14 | A-b | |
| 7/14 | A-b | |
| 8/14 | A-b | |
| 9/14 | A-b | |
| 10/14 | A-b | |
| 11/14 | A-b | |
| 12/14 | A-b | |
| 13/14 | A-b | |
| 14/14 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 00/14] perf stat: Decouple and modularize display formatting
This patch set decouples and modularizes perf stat metric and event counter display processing into a unified traversal engine supporting pluggable, format-specific callbacks for standard (STD), CSV, and JSON outputs via the new --new flag.
Changes in v4:
- Squash all multi-metric column padding, zero-skip logic, and formatting fixes directly into their introducing commits for a perfectly bisectable, pristine Git history.
- Avoid newlines before signed-off-by, assisted-by, and acked-by tags, organizing all contributor tags into a single, contiguous block for strict checkpatch and LKML compliance.
- Introduce strict, grid-based column padding to perfectly align multi-metric events (e.g. TopdownL1) across both standard and metric-only CSV rows, guaranteeing perfect 6-comma and 7-comma parsing compliance by external DataFrame engines.
- Refactor the PMU and hybrid metric event printer to propagate identical zero-counter skipping semantics in alignment with the legacy abs_printout path.
- Re-run all STD, JSON, and CSV linter test suites to achieve 100% passing status.
Ian Rogers (14):
perf stat: Introduce core generic print traversal engine and header
stubs
perf stat: Implement standard console (STD) formatting callbacks perf stat: Extend STD output linter to test basic New API checks perf stat: Extend STD output linter to test core aggregation checks perf stat: Extend STD output linter to test advanced PMU checks perf stat: Extend STD output linter to test metric-only checks perf stat: Implement CSV formatting callbacks
perf stat: Extend CSV output linter to test core aggregation checks perf stat: Extend CSV output linter to test advanced PMU and
metric-only checks
perf stat: Implement streaming JSON formatting callbacks perf stat: Extend JSON output linter to test core aggregation checks perf stat: Extend JSON output linter to test advanced PMU and
metric-only checks
perf stat: Add --new support to PMU metrics Python validator perf stat: Extend PMU metrics value linter to validate --new outputs
tools/perf/builtin-stat.c | 96 +- .../tests/shell/lib/perf_metric_validation.py | 12 +- tools/perf/tests/shell/stat+csv_output.sh | 19 + tools/perf/tests/shell/stat+json_output.sh | 74 +- tools/perf/tests/shell/stat+std_output.sh | 18 + tools/perf/tests/shell/stat_metrics_values.sh | 22 +- tools/perf/util/Build | 4 + tools/perf/util/stat-display.c | 12 +- tools/perf/util/stat-print-csv.c | 677 ++++++++++++++ tools/perf/util/stat-print-json.c | 339 +++++++ tools/perf/util/stat-print-std.c | 854 ++++++++++++++++++ tools/perf/util/stat-print.c | 500 ++++++++++ tools/perf/util/stat-print.h | 137 +++ tools/perf/util/stat.h | 6 + 14 files changed, 2688 insertions(+), 82 deletions(-) create mode 100644 tools/perf/util/stat-print-csv.c create mode 100644 tools/perf/util/stat-print-json.c create mode 100644 tools/perf/util/stat-print-std.c create mode 100644 tools/perf/util/stat-print.c create mode 100644 tools/perf/util/stat-print.h
Signature · 1 line
2.55.0.141.g00534a21ce-goog