Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5315110pxv; Wed, 7 Jul 2021 00:25:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFecl8lHg+nPoZ1HwWaGxrjk3t0HbkrmxjGnAXSnWfrAjHAwgKMg49wvKY06tsVADDcon5 X-Received: by 2002:a17:906:a3da:: with SMTP id ca26mr12737738ejb.46.1625642752864; Wed, 07 Jul 2021 00:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625642752; cv=none; d=google.com; s=arc-20160816; b=I9x/ojyM7dMaQ4bVO3tdK8SvarDHnK5ujkvRKGLSILZhYfG0/K705ywObbCdLLzIZ6 uUt95m2dOiV9hiq0DoTr8nvKTFvWS2Y1blO1AlE+RifNfE/WOY/g19apnuQmZ9o77AVj rd0VkjGMH3cZkm8HIMZZu5y1xVpFMu+5gwbvsYfedGDj/vs1UoXdAYNGlYXNa8y/4lYB uin+nbtako92Kcq6T6cQRk25RDkgC5iTlabtAUD8CRWLJYsJDewHx7JiEZCdjPorJlk4 uNn57QtatOE2h8SCIgu8SUbJQT7BNnLEkeSmcUsQ9D4kOP2Z0X3c0CEptCC5tQtrOiZd ZXJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=IBRGG8C+Q8G/0Z07CJ3E+rdUQsJY8JnXmFLFCd8QgGk=; b=RlMZfv4fg8Xs7I8AUAnLcPCylvE3+a2xNsfTfUkYJJXFwrbEfNVSfTZXfl8ReZpjbF FeU1TL4y7IkXvkDY85oIUAFrT5VTwYkjWjRLpUMdkS3fYDFpBSMQUXe5V4r+HY6zOe3L HOjgxcsFIts4u5OHuooPCJ223ZrAbb9/7jZwLrv66XghbSr93vBZcDK1SguSMmdiAgRH 9+ZsscuoADmtOSffxS0GGrBCezEW0j/CGHNxKiOy0bcaDRN/dQ9/PGWoh6EQau8vGCzM GBQy1cmn7TmoMZoPyBFuO6S/QAPcXTGHDgHTEhfdZSzjScYaC3IBdzM3p45I4Wxj3gki ZFFg== 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 m12si6627968edd.72.2021.07.07.00.25.29; Wed, 07 Jul 2021 00:25:52 -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 S230356AbhGGH1K (ORCPT + 99 others); Wed, 7 Jul 2021 03:27:10 -0400 Received: from mga05.intel.com ([192.55.52.43]:59577 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbhGGH1K (ORCPT ); Wed, 7 Jul 2021 03:27:10 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="294895837" X-IronPort-AV: E=Sophos;i="5.83,331,1616482800"; d="scan'208";a="294895837" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 00:24:27 -0700 X-IronPort-AV: E=Sophos;i="5.83,331,1616482800"; d="scan'208";a="497650274" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.238.4.147]) ([10.238.4.147]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 00:24:25 -0700 Subject: Re: [PATCH] perf list: Skip the invalid hybrid pmu To: Jiri Olsa Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <20210610051646.4003-1-yao.jin@linux.intel.com> From: "Jin, Yao" Message-ID: Date: Wed, 7 Jul 2021 15:24:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On 7/7/2021 3:58 AM, Jiri Olsa wrote: >> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c >> index 88c8ecdc60b0..281670e9c4bd 100644 >> --- a/tools/perf/util/pmu.c >> +++ b/tools/perf/util/pmu.c >> @@ -1604,6 +1604,9 @@ void print_pmu_events(const char *event_glob, bool name_only, bool quiet_flag, >> pmu = NULL; >> j = 0; >> while ((pmu = perf_pmu__scan(pmu)) != NULL) { >> + if (perf_pmu__is_invalid_hybrid(pmu->name)) >> + continue; > hum why not detect it in pmu_lookup early on > and not add that pmu at all? > > thanks, > jirka > Yes, it's a good idea that detects it in pmu_lookup, thanks! Thanks Jin Yao