From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
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>, Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] perf x86 test: Update hybrid expectations
Date: Wed, 3 Jan 2024 12:44:53 -0500 [thread overview]
Message-ID: <555f8096-619c-46cf-bff8-0e49f03eac2a@linux.intel.com> (raw)
In-Reply-To: <20240103170159.1435753-1-irogers@google.com>
On 2024-01-03 12:01 p.m., Ian Rogers wrote:
> The legacy events cpu-cycles and instructions have sysfs event
> equivalents on x86 (see /sys/devices/cpu_core/events). As sysfs/JSON
> events are now higher in priority than legacy events this causes the
> hybrid test expectations not to be met. To fix this switch to legacy
> events that don't have sysfs versions, namely cpu-cycles becomes
> cycles and instructions becomes branches.
>
> Fixes: a24d9d9dc096 ("perf parse-events: Make legacy events lower priority than sysfs/JSON")
> Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
> Closes: https://lore.kernel.org/lkml/ZYbm5L7tw7bdpDpE@kernel.org/
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
Thanks Ian. For the series,
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Thanks,
Kan
> tools/perf/arch/x86/tests/hybrid.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tools/perf/arch/x86/tests/hybrid.c b/tools/perf/arch/x86/tests/hybrid.c
> index eb152770f148..05a5f81e8167 100644
> --- a/tools/perf/arch/x86/tests/hybrid.c
> +++ b/tools/perf/arch/x86/tests/hybrid.c
> @@ -47,7 +47,7 @@ static int test__hybrid_hw_group_event(struct evlist *evlist)
> evsel = evsel__next(evsel);
> TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
> TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
> - TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS));
> + TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_INSTRUCTIONS));
> TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
> return TEST_OK;
> }
> @@ -102,7 +102,7 @@ static int test__hybrid_group_modifier1(struct evlist *evlist)
> evsel = evsel__next(evsel);
> TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type);
> TEST_ASSERT_VAL("wrong hybrid type", test_hybrid_type(evsel, PERF_TYPE_RAW));
> - TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS));
> + TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_INSTRUCTIONS));
> TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader));
> TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user);
> TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel);
> @@ -171,27 +171,27 @@ struct evlist_test {
>
> static const struct evlist_test test__hybrid_events[] = {
> {
> - .name = "cpu_core/cpu-cycles/",
> + .name = "cpu_core/cycles/",
> .check = test__hybrid_hw_event_with_pmu,
> /* 0 */
> },
> {
> - .name = "{cpu_core/cpu-cycles/,cpu_core/instructions/}",
> + .name = "{cpu_core/cycles/,cpu_core/branches/}",
> .check = test__hybrid_hw_group_event,
> /* 1 */
> },
> {
> - .name = "{cpu-clock,cpu_core/cpu-cycles/}",
> + .name = "{cpu-clock,cpu_core/cycles/}",
> .check = test__hybrid_sw_hw_group_event,
> /* 2 */
> },
> {
> - .name = "{cpu_core/cpu-cycles/,cpu-clock}",
> + .name = "{cpu_core/cycles/,cpu-clock}",
> .check = test__hybrid_hw_sw_group_event,
> /* 3 */
> },
> {
> - .name = "{cpu_core/cpu-cycles/k,cpu_core/instructions/u}",
> + .name = "{cpu_core/cycles/k,cpu_core/branches/u}",
> .check = test__hybrid_group_modifier1,
> /* 4 */
> },
next prev parent reply other threads:[~2024-01-03 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 17:01 [PATCH v2 1/2] perf x86 test: Update hybrid expectations Ian Rogers
2024-01-03 17:01 ` [PATCH v2 2/2] perf x86 test: Add hybrid test for conflicting legacy/sysfs event Ian Rogers
2024-01-03 17:44 ` Liang, Kan [this message]
2024-01-05 12:00 ` [PATCH v2 1/2] perf x86 test: Update hybrid expectations Mark Rutland
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=555f8096-619c-46cf-bff8-0e49f03eac2a@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--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 \
/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).