linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,  Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 Kan Liang <kan.liang@linux.intel.com>,
	John Garry <john.g.garry@oracle.com>,
	 Will Deacon <will@kernel.org>,
	James Clark <james.clark@linaro.org>,
	 Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linux.dev>,
	 Yicong Yang <yangyicong@hisilicon.com>,
	Weilin Wang <weilin.wang@intel.com>,
	 Tim Chen <tim.c.chen@linux.intel.com>,
	Thomas Richter <tmricht@linux.ibm.com>,
	 Sumanth Korikkar <sumanthk@linux.ibm.com>,
	linux-perf-users@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/6] CSV/JSON metric thresholds, fix printf modifiers
Date: Wed,  9 Oct 2024 17:07:13 -0700	[thread overview]
Message-ID: <20241010000719.1172854-1-irogers@google.com> (raw)

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


             reply	other threads:[~2024-10-10  0:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10  0:07 Ian Rogers [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241010000719.1172854-1-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=james.clark@linaro.org \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sumanthk@linux.ibm.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=tmricht@linux.ibm.com \
    --cc=weilin.wang@intel.com \
    --cc=will@kernel.org \
    --cc=yangyicong@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).