Skip to content

CSV/JSON metric thresholds, fix printf modifiers

Ian Rogers linux-perf-users lkml 6 versions – Applied

Status from this message: Applied to perf-tools-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest7 patches 4 repliesApplied
  2. v47 patches 0 repliesSuperseded
  3. v38 patches 5 repliesApplied
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v2 posting 2/28 patches1 replySuperseded
v2 posting 1/26 patches0 repliesSuperseded
v18 patches7 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/7perf color: Add printf format checking and resolve issuestools/perf/builtin-sched.c tools/perf/builtin-trace.c tools/perf/util/arm-spe.c +5 more+15 -140 replies
2/7perf stat: Fix/add parameter names for print_metrictools/perf/util/stat-shadow.c tools/perf/util/stat.h+36 -250 replies
3/7perf stat: Display "none" for NaN with metric only jsontools/perf/util/stat-display.c+7 -40 replies
4/7perf stat: Drop metric-unit if unit is NULLtools/perf/util/stat-display.c+2 -20 replies
5/7perf stat: Change color to threshold in print_metrictools/perf/arch/x86/util/iostat.c tools/perf/builtin-script.c tools/perf/util/stat-display.c +2 more+97 -680 replies
6/7perf stat: Add metric-threshold to json outputtools/perf/tests/shell/lib/perf_json_output_lint.py tools/perf/util/stat-display.c+24 -30 replies
7/7perf stat: Disable metric thresholds for CSV and JSON metric-only modetools/perf/builtin-stat.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/7] CSV/JSON metric thresholds, fix printf modifiers

Metric thresholds are being computed for CSV and JSON output but not displayed. Rename the color that encodes the threshold as enum values and use to generate string constants for a json dictionary value. Disable metric thresholds with CSV output.

Add printf attribute to functions in color.h that could support it. Fix bad printf format strings that this detected.

v5. Switch some u64 printf flags to PRIx64 rather than llx (kernel
convention) to resolve 32-bit build issues.
v4. Drop CSV metric thresholds due to formatting variation on
hypervisors (broken counters) and not as detected by tests/shell/stat+csv_output.sh.
v3. Rebase.
v2. Don't display metric-value for json output if there is no unit.

Ian Rogers (7):
perf color: Add printf format checking and resolve issues perf stat: Fix/add parameter names for print_metric
perf stat: Display "none" for NaN with metric only json perf stat: Drop metric-unit if unit is NULL
perf stat: Change color to threshold in print_metric
perf stat: Add metric-threshold to json output
perf stat: Disable metric thresholds for CSV and JSON metric-only mode

 tools/perf/arch/x86/util/iostat.c             |   2 +-
 tools/perf/builtin-sched.c                    |   2 +-
 tools/perf/builtin-script.c                   |   6 +-
 tools/perf/builtin-stat.c                     |   8 ++
 tools/perf/builtin-trace.c                    |   2 +-
 .../tests/shell/lib/perf_json_output_lint.py  |   5 +-
 tools/perf/util/arm-spe.c                     |   2 +-
 tools/perf/util/color.h                       |   9 +-
 tools/perf/util/intel-bts.c                   |   2 +-
 tools/perf/util/intel-pt.c                    |   2 +-
 tools/perf/util/s390-cpumsf.c                 |   2 +-
 tools/perf/util/s390-sample-raw.c             |   8 +-
 tools/perf/util/stat-display.c                |  73 +++++++---
 tools/perf/util/stat-shadow.c                 | 128 ++++++++++--------
 tools/perf/util/stat.h                        |  16 ++-
 15 files changed, 170 insertions(+), 97 deletions(-)
Signature · 1 line
2.47.0.105.g07ac214952-goog