linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/7] CSV/JSON metric thresholds, fix printf modifiers
@ 2024-10-17 17:53 Ian Rogers
  2024-10-17 17:53 ` [PATCH v5 1/7] perf color: Add printf format checking and resolve issues Ian Rogers
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Ian Rogers @ 2024-10-17 17:53 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, John Garry, Will Deacon,
	James Clark, Mike Leach, Leo Yan, Yicong Yang, Tim Chen,
	Thomas Richter, Sumanth Korikkar, Weilin Wang, linux-perf-users,
	linux-kernel

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(-)

-- 
2.47.0.105.g07ac214952-goog


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

end of thread, other threads:[~2024-10-18 16:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 17:53 [PATCH v5 0/7] CSV/JSON metric thresholds, fix printf modifiers Ian Rogers
2024-10-17 17:53 ` [PATCH v5 1/7] perf color: Add printf format checking and resolve issues Ian Rogers
2024-10-17 17:53 ` [PATCH v5 2/7] perf stat: Fix/add parameter names for print_metric Ian Rogers
2024-10-17 17:53 ` [PATCH v5 3/7] perf stat: Display "none" for NaN with metric only json Ian Rogers
2024-10-17 17:53 ` [PATCH v5 4/7] perf stat: Drop metric-unit if unit is NULL Ian Rogers
2024-10-17 17:53 ` [PATCH v5 5/7] perf stat: Change color to threshold in print_metric Ian Rogers
2024-10-17 17:53 ` [PATCH v5 6/7] perf stat: Add metric-threshold to json output Ian Rogers
2024-10-17 17:53 ` [PATCH v5 7/7] perf stat: Disable metric thresholds for CSV and JSON metric-only mode Ian Rogers
2024-10-17 18:20 ` [PATCH v5 0/7] CSV/JSON metric thresholds, fix printf modifiers Namhyung Kim
2024-10-17 19:15   ` Ian Rogers
2024-10-18 16:35     ` Namhyung Kim
2024-10-18 15:20 ` Namhyung Kim

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).