linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org, acme@kernel.org
Subject: Re: Perf stat regression from d15480a3d67
Date: Thu, 22 Jun 2023 13:15:20 -0700	[thread overview]
Message-ID: <ZJSr2PbOrpFrSIaL@tassilo> (raw)
In-Reply-To: <CAM9d7cgpegLH9QpUhHQy0ckMpO6CaKaYrAeHKNm4CT01R4bhGw@mail.gmail.com>

On Thu, Jun 22, 2023 at 12:09:14PM -0700, Namhyung Kim wrote:
> Hi Andi,
> 
> Sorry about the breakage.
> 
> On Thu, Jun 22, 2023 at 2:20 AM Andi Kleen <ak@linux.intel.com> wrote:
> >
> > > Can you provide an example that is breaking?
> >
> > I only have a very long auto generated example[1], because it's not
> > easy to make a non scheduling event and it's also dependent on the system. The example
> > works on a SKX.
> >
> > >
> > > Wrt event order, cases like:
> > > ```
> > > $ sudo perf stat -e '{data_read,data_write}' -a --no-merge sleep 1
> > >
> > > Performance counter stats for 'system wide':
> > >
> > >          1,960.81 MiB  data_read [uncore_imc_free_running_1]
> > >            438.48 MiB  data_write [uncore_imc_free_running_1]
> > >          1,961.85 MiB  data_read [uncore_imc_free_running_0]
> > >            438.79 MiB  data_write [uncore_imc_free_running_0]
> > >
> > >       1.001127356 seconds time elapsed
> > > ```
> > > Reorder events so that the PMUs match (ie the -e order would 2x
> > > data_read followed by 2x data_write). This covers more cases now so
> > > that perf metric (aka topdown) events aren't broken when coming out of
> > > metrics:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/parse-events.c?h=perf-tools-next#n2139
> >
> > How is any tool supposed to handle arbitary output reordering like
> > that? Perf is not just for humans, but also for tools.
> 
> Is the problem of reordering the output or hiding something?
> Do you mean both?

For my tool it's both. In this particular case it's the hiding
that broke it

If the reordering only happens on broken groups etc. as Ian wrote that's ok for me
because I can avoid generating them. But I can't tolerate hiding.

> >
> > >
> > > Given the original commit message there seems little point to give the
> > > 0 counts, but perhaps it is something that could be done on the more
> > > tool oriented CSV and JSON output formats.
> >
> > It's not 0 counts, it's <not supported>. But even 0 counts can
> > be important.
> >
> > We should always output when something doesn't count so that
> > the user knows something is wrong. Hiding problems is always a bad idea
> > and not an improvement.
> 
> Right, I wanted to skip (or hide) events that are not reasonable
> like with redundant or invalid setups.  It should display those
> error results.

Okay so the skipping can just be removed?

> 
> Didn't you say you only have problems in uncore events?

For this test case I only hit it with the uncore, but I would have a general
problem for any event if it was hidden.

Thanks,

-Andi

  reply	other threads:[~2023-06-22 20:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  1:39 Perf stat regression from d15480a3d67 Andi Kleen
2023-06-22  6:10 ` Ian Rogers
2023-06-22  9:20   ` Andi Kleen
2023-06-22 13:41     ` Ian Rogers
2023-06-22 19:09     ` Namhyung Kim
2023-06-22 20:15       ` Andi Kleen [this message]
2023-06-23  0:08         ` Namhyung Kim
2023-06-23 17:04           ` Andi Kleen
2023-06-23 18:35           ` Andi Kleen
2023-06-23 18:53             ` Ian Rogers
2023-06-23 23:04               ` Namhyung Kim
2023-06-24 17:59                 ` Andi Kleen
2023-06-26  5:33                   ` Ian Rogers
2023-06-26 23:09                   ` Namhyung Kim
2023-06-26 23:52                     ` Andi Kleen

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=ZJSr2PbOrpFrSIaL@tassilo \
    --to=ak@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /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).