Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp8482pxv; Wed, 7 Jul 2021 18:50:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynA25q0Fb5CenhZmzqRcoKq7v1c41nw6ZRfWgAwpiixqOpXTkN2Z5KR8ZcdSoSHgcIzOGb X-Received: by 2002:a05:6402:111a:: with SMTP id u26mr33577211edv.260.1625709000712; Wed, 07 Jul 2021 18:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625709000; cv=none; d=google.com; s=arc-20160816; b=YH3SnNzFfJxThzMwtdCKTEYyN91K6OkYZr3qM4uh7EZGly9EWzE4s66Mozm0GXXOzz MaGxkO/oMdTpGscFRPGaHL524PLPu0FCDPmTLsk1Q6dn4UXD7wn3Jfyqh/XxVDPD29Yu Kt8GADOjXjJfUu1Ao0SPARxZpBa4Ea1NamIvfIR0vO0ucCn3mlNQk9uISclcOdtuOgXo uSnB20qAwQRgXre/rINUGFCOf80Oiz1ncTOL4Rksx8H+SgQqrleUH3T88tzITOQqPDw3 i4V7KoB1c6TOuSPg/yBsUgcHyIguTAlXWTxvHilvpVO07VvLI9oqlku6yFUO2CU1ilMI er5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=wQqFDfPHe3CjpNCQyX/D5sBZj6zRC5SwvWmVljPb+OI=; b=DYln7KtBZAsAjaX1v1QUCkmSgYPpyc6z1ToK+AkTSVrL2WAu6eCY4Hv/XkxN5hL9no G0r24DrpVQnVAh/5JU+txxccH9EuRrpQig3hlxpkTcuG3nqnkwah82KT15gX9e+m3V4P 6xV5YN7qzJPeG16hVeKm1v+hY4JJbjxBsA5iGp8tijYPtcu52VKRmAbIefbu1d0bM8GE MsnhpPC0JDB310kKMP1Gi6PVv51O3N1MARuNdyeQ4b22Xe5nmG6OgSBPYFzzo5jqBpn6 z1dY6dhEZVnYvziMf81qXoDoWhdIa0IJFoIVdL4a4XJBLCMFNeC0V7VyrVFHaPG86apo aOXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si1004288ejd.203.2021.07.07.18.49.37; Wed, 07 Jul 2021 18:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230271AbhGHBlT (ORCPT + 99 others); Wed, 7 Jul 2021 21:41:19 -0400 Received: from mga06.intel.com ([134.134.136.31]:38904 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbhGHBlO (ORCPT ); Wed, 7 Jul 2021 21:41:14 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10038"; a="270538760" X-IronPort-AV: E=Sophos;i="5.84,222,1620716400"; d="scan'208";a="270538760" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 18:38:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,222,1620716400"; d="scan'208";a="457708849" Received: from kbl-ppc.sh.intel.com ([10.239.159.163]) by orsmga008.jf.intel.com with ESMTP; 07 Jul 2021 18:38:31 -0700 From: Jin Yao To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao Subject: [PATCH v2 4/4] perf tests: Fix 'Convert perf time to TSC' on core-only system Date: Thu, 8 Jul 2021 09:37:01 +0800 Message-Id: <20210708013701.20347-5-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210708013701.20347-1-yao.jin@linux.intel.com> References: <20210708013701.20347-1-yao.jin@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the atom CPUs are offlined, the 'cpu_atom' is not valid. We don't need the test case for 'cpu_atom'. Signed-off-by: Jin Yao --- tools/perf/tests/perf-time-to-tsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c index 85d75b9b25a1..7c56bc1f4cff 100644 --- a/tools/perf/tests/perf-time-to-tsc.c +++ b/tools/perf/tests/perf-time-to-tsc.c @@ -21,6 +21,7 @@ #include "mmap.h" #include "tests.h" #include "pmu.h" +#include "pmu-hybrid.h" #define CHECK__(x) { \ while ((x) < 0) { \ @@ -93,7 +94,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe * For hybrid "cycles:u", it creates two events. * Init the second evsel here. */ - if (perf_pmu__has_hybrid()) { + if (perf_pmu__has_hybrid() && perf_pmu__hybrid_mounted("cpu_atom")) { evsel = evsel__next(evsel); evsel->core.attr.comm = 1; evsel->core.attr.disabled = 1; -- 2.17.1