Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp91501rdb; Fri, 5 Jan 2024 04:00:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ4vktdSna+DJYGnrnJWgFwlCBk2Y6pOxJ22Oha6NJ3AZNe0DnXjXHyH5b/xO+Zm9a9JQw X-Received: by 2002:a05:6a21:78a8:b0:197:34c4:a650 with SMTP id bf40-20020a056a2178a800b0019734c4a650mr2125195pzc.13.1704456014886; Fri, 05 Jan 2024 04:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704456014; cv=none; d=google.com; s=arc-20160816; b=w2Kx9+QLRDcw0eSO7IB+DR+0RQx051oDzbsq8NX+9xiwt/LW+dOVLzRVOsGl1rMdUh 3444M14097S70GYt7qBQ0+WLXNi6lbZ/HXYZQIS5rv7Hl74JIDOgV9Q7bapS0d6C9Qlh K6s8kJC9r+7uGtBiqD3DkN40iFwpX5P9xKk5UluwirMma7Tkccw2Ph7eYTYrlIipI+f1 /Iw2GuuH5fFiF8RoVmrWm/fPiEzxRE5aVcstsz2q4J4nbkhXPDPb+wZjFFnPz/+lPlAJ I5eIHZaKjgdgYUM/z2LaIKtcyPYf1kFY4OaZKoqLMr0/va/GklD0ukTXqP0ntjmIgHXc KCBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=HhbS9URPXB7qh5FM9WZTGASAwguOdUa91Pn3JdbtDew=; fh=vfVI4EQ0mfz2cn4hhiZAxN0JE0UFBZv4H6PhbQ2c4+0=; b=MZWYqy0jliE4wj5etmAkpm4oHblVVP19Zvg6pBtKcSiO4lzx/+jQx+dg82BKF3B3+p idiu8X+BK8UekRMxq+XDiqiXjBjYrI9W9hxpFwLhxPgVYHLKdvWjKN4QblGROs3MKWGX hl15r9YY4rF0fOcJM1iMCf8dgRw3HdM6BTVkbJrj062vbFAJfaheipm2CtMP64rIyQJR fBnmEF04VS+ATCAhvn2vwBvItFvqpuw7rukR86fRFGaLPtWUAYRGavBo9PzUhW5slHlJ 3AFGISWpaLCDstcAgtuanAoordks9THzzRstb2+gilSd6eClckXZAbQajxq75ZWeIF3S msSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-17820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h15-20020a17090aa88f00b0028d0d181f2fsi606314pjq.38.2024.01.05.04.00.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 04:00:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-17820-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C474B2852E4 for ; Fri, 5 Jan 2024 12:00:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB0612CCBA; Fri, 5 Jan 2024 12:00:07 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0E812CCB2; Fri, 5 Jan 2024 12:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7F053C15; Fri, 5 Jan 2024 04:00:51 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.86.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7BCE43F64C; Fri, 5 Jan 2024 04:00:03 -0800 (PST) Date: Fri, 5 Jan 2024 12:00:00 +0000 From: Mark Rutland To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] perf x86 test: Update hybrid expectations Message-ID: References: <20240103170159.1435753-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240103170159.1435753-1-irogers@google.com> On Wed, Jan 03, 2024 at 09:01:58AM -0800, 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 > Closes: https://lore.kernel.org/lkml/ZYbm5L7tw7bdpDpE@kernel.org/ > Signed-off-by: Ian Rogers > --- > tools/perf/arch/x86/tests/hybrid.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) For both patches: Acked-by: Mark Rutland Mark. > > 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 */ > }, > -- > 2.43.0.472.g3155946c3a-goog >