Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7243943rdb; Wed, 3 Jan 2024 09:04:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9Y9TaoOq0tW0OP6CfYQKyhlVPx3URX7YOPGvkxpwIEGOqScTgdyvNOvLp7AhT8I3ynbND X-Received: by 2002:a17:90a:4603:b0:28c:76b:7cf7 with SMTP id w3-20020a17090a460300b0028c076b7cf7mr6203952pjg.21.1704301486217; Wed, 03 Jan 2024 09:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704301486; cv=none; d=google.com; s=arc-20160816; b=YcFBax2b/F7SJ8SvdZGMTq+bNrTwYFIy39CPB3tqpzxtxBp0GrYkEGvig1hAtG5TNC mo9OBI5F66J8nyuDFPNSMqDrYJsVUKH2dkI7lkkU31+mUZPxvsbgf9bqleusdowko6nx ZmrQOgjyrA1xCSv00jcUPgJDLSffFyLuHPnkmJRFVZg6wthcTuM2YvEx2AarlUE1CTcY w32nht6gK0qjCjZ156aDPG/2/mTebue+3LqTBCcPwpmcIvQoQ20QhYBSbK8jbEWy0Y1Q n11an+NBUdGoJLgUxRVtUubJ3WOGXgOM85XtUtpsHJ+JkhZr6TAnsw9KCDUs+9d8jQYz UNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=DZnRxlTdDAoebH3N02PoiIrttaLFmicjC7EGKLpzd7g=; fh=Lo8mTUUB8qyJ9J1IWo40GwEDrIVYXXStAdc95e+YKyQ=; b=dtQdy9wYr8PNUnw7z1atFRA/VNn3hx84GPnH0EUDcxBk2qQyFDqXk1S7ipmPYpemi9 QXBEtbCvM90MkBKsnDkke6soR1OEUDDRyV9Z9gbGGp8fCTWNSxSjh/ObGbN2bvkxieL8 ThgDCuOeEVh2vCMIlS/SvxpseeQbgdH9dJnllyEqh6zuLfLyZIUZH1qbFqdulvuWCa6g zEtduAzXrzm48voNqwij2w5QJ8PXNogLyl0zZdNDU8A6BlLfKxrBQ1pwJ9apygfTXqiE /A+vqiUf294MkR9XoocxIFuFi6Qg3NDRa5JelWl0ZL/b7SjCoJf6elvv3LZ5is7vowSg /WBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=AMrS1hVs; spf=pass (google.com: domain of linux-kernel+bounces-15784-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id nn15-20020a17090b38cf00b0028c19640a5bsi1471323pjb.49.2024.01.03.09.04.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:04:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15784-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=AMrS1hVs; spf=pass (google.com: domain of linux-kernel+bounces-15784-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 22CEFB242A6 for ; Wed, 3 Jan 2024 17:02:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61C971C290; Wed, 3 Jan 2024 17:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AMrS1hVs" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43D091BDFD for ; Wed, 3 Jan 2024 17:02:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-5f325796097so37397467b3.1 for ; Wed, 03 Jan 2024 09:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704301345; x=1704906145; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=DZnRxlTdDAoebH3N02PoiIrttaLFmicjC7EGKLpzd7g=; b=AMrS1hVsypUT4Ur9rJ4iDeSscL+0S7gzu60dJKIDWV1Pe6GWaCsVj6RY/ubhKUBIBl SwdLCHJfbG9KVKMKAwbgcU/Q8T1LEa91xWtBp/3gzUNYHeKXCfDgjdOrffaH5QZwEyRd +nX/YqFNo1qOOtB41gvl2kIUUAoAkRhFEwSXmlXHyLo4Lo5E54T3e6U/Al86SkPRGXCh D/io7/+Gr6IXAI7XO7us7Ef/wi330nzx8ZuEeXSZGqMnHsYZ+6asrdZlagDFPXlMLaw/ 121Vm5b5adCcIrUbupXHBxQ7Bray5BTI7auO2gvwu9zCs3GFvePsUqiUNdrQNQOkcUSo Dc6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704301345; x=1704906145; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DZnRxlTdDAoebH3N02PoiIrttaLFmicjC7EGKLpzd7g=; b=vwe2wjfBfp7PBtF4HmUERxvuALIgIXVlAgSbQeeBDm6rHvKGRFoN1VN/mB59oIT50M ToF1eFKj+OoHsr60q3rg/R+Hb3lRYf2NvX65gacgGLb8dR2dmOJF8BTYCqctMdlWlfGd MvNwQtKJiAPO6wZouuIdd/3zB+R65whCtjapNgfaWC9PZ8SAC309VCbOq6HL9e8I6e9l VcdQZkrmCvJgFMBM+urJXrvsj4KDMEjcL1cNcn4L1THD4yATLXjhgfvnzh+LHQMUD1TF rhzHreHt56UxFtL/ypO5QbocPhFW9G/O6TKTdKmTB3W3rl985/MzsZBVuJ8v8yH1N3jM 2VNg== X-Gm-Message-State: AOJu0YyiaKRI9yq+laGSMFJoDzBXpzmBoqcWETtGfjUllaKvrZJS5kYI eYhAFXBEwBEyTP9czMWoAkyKY34wQ06bogpM8vs= X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:f607:7105:a86e:433f]) (user=irogers job=sendgmr) by 2002:a05:690c:4443:b0:5d3:a348:b0c0 with SMTP id gq3-20020a05690c444300b005d3a348b0c0mr10000295ywb.5.1704301345330; Wed, 03 Jan 2024 09:02:25 -0800 (PST) Date: Wed, 3 Jan 2024 09:01:58 -0800 Message-Id: <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 X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Subject: [PATCH v2 1/2] perf x86 test: Update hybrid expectations From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kan Liang , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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(-) 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