linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] CSV/JSON metric thresholds, fix printf modifiers
@ 2024-10-10  0:07 Ian Rogers
  2024-10-10  0:07 ` [PATCH v2 1/6] perf color: Add printf format checking and resolve issues Ian Rogers
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ian Rogers @ 2024-10-10  0:07 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, Weilin Wang,
	Tim Chen, Thomas Richter, Sumanth Korikkar, 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 in a CSV column or json
dictionary value.

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

v2. Don't display metric-value for json output if there is no unit.

Ian Rogers (6):
  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: Display metric threshold value in CSV output

 tools/perf/Documentation/perf-stat.txt    |   1 +
 tools/perf/arch/x86/util/iostat.c         |   2 +-
 tools/perf/builtin-sched.c                |   2 +-
 tools/perf/builtin-script.c               |   6 +-
 tools/perf/builtin-trace.c                |   2 +-
 tools/perf/tests/shell/stat+csv_output.sh |  24 ++--
 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         |   6 +-
 tools/perf/util/stat-display.c            |  80 ++++++++++----
 tools/perf/util/stat-shadow.c             | 128 ++++++++++++----------
 tools/perf/util/stat.h                    |  16 ++-
 15 files changed, 174 insertions(+), 110 deletions(-)

-- 
2.47.0.rc1.288.g06298d1525-goog


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

end of thread, other threads:[~2024-10-10  0:07 UTC | newest]

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

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