All of lore.kernel.org
 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>,
	Ravi Bangoria <ravi.bangoria@amd.com>,
	 James Clark <james.clark@arm.com>,
	Yang Jihong <yangjihong@bytedance.com>,
	 Ze Gao <zegao2021@gmail.com>, Leo Yan <leo.yan@linux.dev>,
	Song Liu <song@kernel.org>,
	 K Prateek Nayak <kprateek.nayak@amd.com>,
	Kaige Ye <ye@kaige.org>,  Yicong Yang <yangyicong@hisilicon.com>,
	linux-perf-users@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/5] Event parsing fixes
Date: Mon, 13 May 2024 21:48:40 -0700	[thread overview]
Message-ID: <CAP-5=fW_Ri1yOfq2QS1_NOV0+kNm+n+Vv03v3FjfbRet4Ztn7Q@mail.gmail.com> (raw)
In-Reply-To: <20240510053705.2462258-1-irogers@google.com>

On Thu, May 9, 2024 at 10:38 PM Ian Rogers <irogers@google.com> wrote:
>
> For the default events, parse from strings rather than use pre-cooked
> perf_event_attr. This fixes non-x86 heterogeneous CPUs where legacy
> hardware events wouldn't be opened for all PMUs. v2 was previously
> just patch 3 but it is extended in v3 to incorporate related fixes.
>
> When a sysfs/json event is used in preference to a legacy event, allow
> evsel__match to still function using a saved hardware config
> number. This fixes hard coded metrics in stat-shadow for events like
> "instructions" on Intel that have a sysfs file.
>
> Fix/improve uniquifying event names fixing the test "102: perf stat
> metrics (shadow stat) test:" that was broken by a formatting issue
> when the sysfs instructions event was used.
>
> Having evsel->pmu_name and evsel->pmu->name is confusing, get rid of
> the former. Fix/improve evsel__sys_has_perf_metrics in the process.
>
> Ian Rogers (5):
>   perf evsel: Add alternate_hw_config and use in evsel__match
>   perf stat: Uniquify event name improvements
>   perf stat: Remove evlist__add_default_attrs use strings
>   perf evsel x86: Make evsel__has_perf_metrics work for legacy events
>   perf evsel: Remove pmu_name

Hopefully the first 3 patches here can be a priority given the fixes.

Thanks,
Ian

>  tools/perf/arch/x86/util/evlist.c |  74 +-------
>  tools/perf/arch/x86/util/evsel.c  |  35 +++-
>  tools/perf/builtin-diff.c         |   6 +-
>  tools/perf/builtin-stat.c         | 291 ++++++++++++------------------
>  tools/perf/tests/parse-events.c   |   2 +-
>  tools/perf/util/evlist.c          |  46 +----
>  tools/perf/util/evlist.h          |  12 --
>  tools/perf/util/evsel.c           |  28 ++-
>  tools/perf/util/evsel.h           |  22 +--
>  tools/perf/util/metricgroup.c     |   4 +-
>  tools/perf/util/parse-events.c    |  52 ++++--
>  tools/perf/util/parse-events.h    |   6 +
>  tools/perf/util/pmu.c             |   6 +-
>  tools/perf/util/pmu.h             |   2 +-
>  tools/perf/util/stat-display.c    | 101 ++++++++---
>  tools/perf/util/stat-shadow.c     |  14 +-
>  tools/perf/util/stat.c            |   2 +-
>  17 files changed, 305 insertions(+), 398 deletions(-)
>
> --
> 2.45.0.118.g7fe29c98d7-goog
>

  parent reply	other threads:[~2024-05-14  4:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  5:37 [PATCH v3 0/5] Event parsing fixes Ian Rogers
2024-05-10  5:37 ` [PATCH v3 1/5] perf evsel: Add alternate_hw_config and use in evsel__match Ian Rogers
2024-05-10  5:37 ` [PATCH v3 2/5] perf stat: Uniquify event name improvements Ian Rogers
2024-05-10  5:37 ` [PATCH v3 3/5] perf stat: Remove evlist__add_default_attrs use strings Ian Rogers
2024-05-10  5:37 ` [PATCH v3 4/5] perf evsel x86: Make evsel__has_perf_metrics work for legacy events Ian Rogers
2024-05-10  5:37 ` [PATCH v3 5/5] perf evsel: Remove pmu_name Ian Rogers
2024-05-14  4:48 ` Ian Rogers [this message]
2024-05-21 20:48   ` [PATCH v3 0/5] Event parsing fixes 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='CAP-5=fW_Ri1yOfq2QS1_NOV0+kNm+n+Vv03v3FjfbRet4Ztn7Q@mail.gmail.com' \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=kprateek.nayak@amd.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=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=song@kernel.org \
    --cc=yangjihong@bytedance.com \
    --cc=yangyicong@hisilicon.com \
    --cc=ye@kaige.org \
    --cc=zegao2021@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.