Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp235640lqo; Thu, 9 May 2024 19:48:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFYchgazzl6rpsfwTlN97E7HTPw1MlSHIC1L/JRxL6ppSKbu75vD0yxvI0EZIi6YomHJqDPheOzjSZNvOcRSNSdbfy1ILQOICz75vCcw== X-Google-Smtp-Source: AGHT+IGRwiqP/TxPCzcZLjDjXHuIMe5aX49GmhbOEC7kCRnJrimMC3SnkdqEjxnuyBVdXVacx8ti X-Received: by 2002:a05:6e02:2184:b0:36c:73cc:710f with SMTP id e9e14a558f8ab-36cc1456286mr17525545ab.3.1715309308574; Thu, 09 May 2024 19:48:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715309308; cv=pass; d=google.com; s=arc-20160816; b=zrHlq1AikvDg71L9Yuetxs3hTKqMsixRJo2KBxKwvUlBrcYVfbww79aRW2G7HTb/37 Dh1HsBg99vDHXT/19yaX/lX4sReWuYzO3UKW5HUUH2J82pznEtwMfS1FHRVaa2yTW61K GdF+RWcJ2kI88lo+oa5OSRf3dXPn95a+Mf/JB9FMNSBHhQa0nQfpdM6YErELJBtSBd9b Is9BIjJ5Eb3/jqYC27e4u0cpBtdp8pK/nRI+ATL/haK6xVG137NlO8FYUQKe7o6gLfeh hJF0WfkYOBtyYe3AbaY+oEXT7lVv1x1ZKEvuf1yHIaj0UOWLRQgFhPYgxGjMY61CzCaM Ypog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=AEiHAmQiY97cuVIPCT0fj8aZhwXb/qDICNGt/yHEYOE=; fh=19wKBpXXPdFwNE6P3L3YSoEFLRVhCF5WqDG+by0JvXo=; b=ZmIdSCXOzNl6Js1/JcSpdZeC0ZO4KziZjyTkt2fWZyjqWBFobGgT5HA2vSLa3YF3+P k+XcU8mJNiwiu0zosDA7F0mislDdKEaZtC3Q3fN4tIMJHoO+K7oL6FDj0MBjqrjHYyoj cYhWGH1VcADK2lWNO7icpi9dCuseo+2CdCCxyAyUoRGAYTrZOnTjkbBh+61D8yr4BQB9 GvGVbmN5lQnpsar1/WDBVH7hzmYST/cNx7Xde9QFz21yxus6+OYCiPzCHYITK5pACQ+d XmGVt4yir3KubQ59o2av9GJr2JGYc98oFXPKbQbDuYAPGxsa4G3u12rSjmvegKwcwIEb 23ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-175223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412958dd2si2532925a12.670.2024.05.09.19.48.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 19:48:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-175223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175223-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DD778B21D1B for ; Fri, 10 May 2024 02:48:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A26C1148847; Fri, 10 May 2024 02:47:50 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43B8D1494DE; Fri, 10 May 2024 02:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715309270; cv=none; b=lRuJiMbT2qPhiod6V4399JZTjXSuVCvJU+knvrwthlLmnJ6HzFngiUGowDd72OKam0NJfknxHGHBdsUzPfrBNYNcLfSelwtv1OWz41JvQRCjof15y9stHRZsriwEACWmIOZv/9dXpXpjZAkBxfZeeAJA7etDNRY3bZCokulgPjQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715309270; c=relaxed/simple; bh=8jGhS89nWXCilLoGQg+wuKKsd2UcXNDCHKExELmDRFs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SkLRBIfJJzzVvYROS65ZMNxCnIY68gyYDk9AzMkXMzyFsZgG4dASPSPc0J4NpzNVgTIl46wbcqTI7ja3ynawp4ugLIOwd6vYBWEKNKxQTriA4yPFXaofYzmx3cAwh09vCLwabGw5Ww10kQblPpfY5QnzOX+dNBzOPwzAwNlFtuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 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 B227212FC; Thu, 9 May 2024 19:48:12 -0700 (PDT) Received: from entos-yitian-01.shanghai.arm.com (entos-yitian-01.shanghai.arm.com [10.169.206.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8E0A23F762; Thu, 9 May 2024 19:47:43 -0700 (PDT) From: Jia He To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Jia He Subject: [PATCH 1/2] perf pmu: Allow finishing loading json events when !events_table Date: Fri, 10 May 2024 02:47:28 +0000 Message-Id: <20240510024729.1075732-2-justin.he@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510024729.1075732-1-justin.he@arm.com> References: <20240510024729.1075732-1-justin.he@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Otherwise, cpu_aliases_added is never set to true on an Arm v8a Neoverse N2 server. Signed-off-by: Jia He --- tools/perf/util/pmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index f39cbbc1a7ec..a1eef7b2e389 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -915,13 +915,11 @@ void pmu_add_cpu_aliases_table(struct perf_pmu *pmu, const struct pmu_events_tab static void pmu_add_cpu_aliases(struct perf_pmu *pmu) { - if (!pmu->events_table) - return; - if (pmu->cpu_aliases_added) return; - pmu_add_cpu_aliases_table(pmu, pmu->events_table); + if (pmu->events_table) + pmu_add_cpu_aliases_table(pmu, pmu->events_table); pmu->cpu_aliases_added = true; } -- 2.34.1