linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	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>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Thomas Richter <tmricht@linux.ibm.com>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>,
	Weilin Wang <weilin.wang@intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 0/7] CSV/JSON metric thresholds, fix printf modifiers
Date: Fri, 18 Oct 2024 09:35:19 -0700	[thread overview]
Message-ID: <ZxKOR_Mr0xQFy_FN@google.com> (raw)
In-Reply-To: <CAP-5=fVicsN1_k5nycOzHnRxdmwdEk9Y==OSAaxdDL5wnX7_jg@mail.gmail.com>

On Thu, Oct 17, 2024 at 12:15:26PM -0700, Ian Rogers wrote:
> On Thu, Oct 17, 2024 at 11:20 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Hi Ian,
> >
> > On Thu, Oct 17, 2024 at 10:53:49AM -0700, Ian Rogers wrote:
> > > 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.
> >
> > Thanks for the quick fix, I'll take this.
> >
> > >
> > > 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.
> >
> > I'm ok with dropping CSV support for now, but could you explain
> > a bit more detail about the problem?  Is it possible to see the
> > same problem on host if it has a unsupported event?
> 
> It would be. The issue is the stat-display code being a rat's nest and
> adding a column to CSV should be straightforward but causes --thread
> to behave in odd ways with an uncounted/unsupported event. Where the
> column counts differ from supported to not supported causing the CSV
> stat output check to fail. Fixing one issue leads to other issues and
> my usual desire to rewrite stat-display which can wait for another
> occasion. Here I'm trying to address that we may compute the metric
> threshold, use extra events, but then never even show the output.

I'm curious how it loos like.  Can you show me an example in both cases?

Thanks,
Namhyung


  reply	other threads:[~2024-10-18 16:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-10-18 15:20 ` Namhyung Kim

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=ZxKOR_Mr0xQFy_FN@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.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=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).