Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7265470rdb; Wed, 3 Jan 2024 09:45:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDS/vb7QonC7vOZXLmBNI+6bC6q6CRplnx+U5ODukInjQIx+lw+UuPiBjjivqfAFN7YDff X-Received: by 2002:a2e:9d96:0:b0:2cc:fd69:8092 with SMTP id c22-20020a2e9d96000000b002ccfd698092mr2213042ljj.34.1704303913930; Wed, 03 Jan 2024 09:45:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704303913; cv=none; d=google.com; s=arc-20160816; b=NhuEiz+230GIGE4s3YjtG0X/QTawsep5kxtZPXuvBhyabJV5hpuHilbQ29w70oUXIy OIMhlXGN7nEfHTi1K0UFFzzgMvQrRGO0BXRWURdnyNZurN2VOyW1KN0jefkUx+Tpf8Bo eR2GuDex6dyYenL0P0YAMSNyIekO5l8VeE7sZ+rWVLb80JlhKmDP4JjjrAWijjhHsgCc Em5eGtMLYu+hVfOZR37/xmh7QCxdsjmZpKA9rzwYL1HNwXxqrY+A8ca5QMRy//srL4Kl bAoZTgqDXrntyI9fIr9/ljAyeMERG2kfmTEo/mgkf1QGr5JA5j6vCYj1f+LA2blsI/SU 9eKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=yDeqArdfkyQ2jP8Mqd18rAg221IJ2FIxC8t/2pNnLu4=; fh=UgSrqnglySr/ff3KnGkB7YPmzTqeTj1d7siLaSUqU5w=; b=cDdVP/Y0ZbzWJ23voDfIfknMtRYzsO9bxZWHBnP59gSrYNUfQqAH5AvOmImSSClr1I OuW89SvpK5/jgBw/chVhWMfKRjfrH4W32N/K9M2x65+02fF+gdJk7F+rOkxB1Hm8on5n +tD1eMTQAG4k5FhVJeOVSZsGzzV1CZhoF6qWZH3nRILyHC4e/v7h5eueKrYCbb80OYK9 HJ83hKFCjmF9FgG83ydI41t7zs5vENBd0QgAugYOCPJxXMZqDJJr7aW9S28v6Mx/h9/I GToFj7/F7W8THC5UmiwLx806QEmoL0nwOYk9N2dnczwtqJMk7S47wEQj1yFmRVnoB5vI JdSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kcEU1fhC; spf=pass (google.com: domain of linux-kernel+bounces-15813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15813-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t29-20020a50ab5d000000b0055317f73474si12271475edc.324.2024.01.03.09.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:45:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kcEU1fhC; spf=pass (google.com: domain of linux-kernel+bounces-15813-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15813-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id A2E8F1F21672 for ; Wed, 3 Jan 2024 17:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77B251C2BB; Wed, 3 Jan 2024 17:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kcEU1fhC" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B727A1C687; Wed, 3 Jan 2024 17:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704303897; x=1735839897; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=FsxTGWvVPI/NoBF8Xammjod/CJ+T7B04tNBazndfAto=; b=kcEU1fhC/geX/kjl1fIHQ05wumPK2OM0TCNkuRnMkawWyJOQhMPEa9hi clDL5A2yKF+OWtLFyrCEwFyU11GBmi1mS4eXYniscrjiG/MlBMndjOc8J A6Je16CTh/IfjoNX7YtzxkbGQ4xEuown46qAVq7DWWeOMOdJgW6JxYCbw WrQZKOej8icQnV0qFraPG1LdzIuqQ7CbI26C8u+nCbqQgUCrKdYE55/tR dHzFLEk2JwSsRipMQyVvbvehNhi5xoREJo8wyOHPKRB2okkwEu2JZ/PJE uMpldA66Zq2/VCN+7zFvS/hLqQHHy5Cy+bWvxoyg571DWyRzAPbD0chah A==; X-IronPort-AV: E=McAfee;i="6600,9927,10942"; a="394187368" X-IronPort-AV: E=Sophos;i="6.04,328,1695711600"; d="scan'208";a="394187368" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2024 09:44:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10942"; a="780045017" X-IronPort-AV: E=Sophos;i="6.04,328,1695711600"; d="scan'208";a="780045017" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2024 09:44:56 -0800 Received: from [10.213.174.222] (kliang2-mobl1.ccr.corp.intel.com [10.213.174.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 14138580DC7; Wed, 3 Jan 2024 09:44:54 -0800 (PST) Message-ID: <555f8096-619c-46cf-bff8-0e49f03eac2a@linux.intel.com> Date: Wed, 3 Jan 2024 12:44:53 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] perf x86 test: Update hybrid expectations Content-Language: en-US To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240103170159.1435753-1-irogers@google.com> From: "Liang, Kan" In-Reply-To: <20240103170159.1435753-1-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 > Closes: https://lore.kernel.org/lkml/ZYbm5L7tw7bdpDpE@kernel.org/ > Signed-off-by: Ian Rogers > --- Thanks Ian. For the series, Reviewed-by: Kan Liang 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 */ > },