Message ID | 20240813132323.98728-5-james.clark@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA38AC52D7B for <linux-arm-kernel@archiver.kernel.org>; Tue, 13 Aug 2024 13:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zR7iuyHffj9f//oCwmpY+WujZl20YxAEXMdQ/mInORg=; b=pXJfPQXIT0nteOLv3K7CLoMwoG LIAUAv045J0LtKLaLWinnqrz8Wd6UEJhCHNmNC6Rz/x2inUD5bofA0LW6wlq7t1i+iuEZ7UitxUJT dJ23MEeDeE+o492varNT3UojEmtnn/TxD/SZ1mnrt0SA8gYvLEP2nozV3CjfqL/L9c9RJJha19Wye x6EizQ3cuME6u3CGcOGsrYrLGlGFyd7OnuEmMA0PChjPvaJyTQcqfB1bF43gZOGLGqzWqTY+lGzxD /0LIeyv7zvYrPi0d/tG2UDauhIxYDuq8AMHf1+OZvyKxE4fhN2zLeR49qQg669XahTDucDvBXZbrk oM2KhNuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdrZ2-00000003s89-3fu7; Tue, 13 Aug 2024 13:27:52 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdrWg-00000003rKG-1Ikc for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Aug 2024 13:25:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=zR7iuyHffj9f//oCwmpY+WujZl20YxAEXMdQ/mInORg=; b=MCgel/mnQE1g7+rBnFUIWUuEF8 eieSlrS4YVjQoxhsJlXHIGC2AlveqZ6WamDGOlftfIQdQ0OSeTIBqf47aXXPym7o5tu5s9wI9f2qh 7E2YSX4pWR7Ri1ye0BVzxc+0RDhbBYVP6XSRuqvWDC7TJyZKqqOgMyevBxkiewJnbOoDNWliuLzdW 9MXM0ExMYgU1ESAUiV8VPzWBzqmecqabnvWayjztkj4l+At5oLnH4TVKa6dwknOkenHfuLygS6fAC i6SmF2u4kEAXl1o4UnW7N2biocl5J094ms/wQKYQyeM0JRhtBvkagWDGUCslf7nfpL9GAxBRtR/au FG/pFy1w==; Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdrWc-00000007nQx-3Sp1 for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 13:25:25 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42808071810so41616365e9.1 for <linux-arm-kernel@lists.infradead.org>; Tue, 13 Aug 2024 06:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555520; x=1724160320; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zR7iuyHffj9f//oCwmpY+WujZl20YxAEXMdQ/mInORg=; b=jUsYTK3LZdlivBOIADfce86jM+BiUKQdJtyxGwcUTlIfltjPF743aks6VhZ9FFLa6I OPw8sxoFLEcdyR9HIuD5RqVDCxgHLBS9IgfDex8oi0qfq257dFngbxTHFIFjPwcIzCn4 kw0A6IbsxvFgIf1s0ZAswO4JXUEk+GBOP+u9cV83POtj08Re6788WF1x5X+KWGv4a2II F9OmltEIVrg5wBsCV9+DIKoqEAZIuP1nMzl45QSqitbionlDTsuVnk026Kw1eTjSB5cj 6pLsi3BJ5j7uH9KVx0exYWWdn1ooyAY5pDlZQpZcXbJ7TUDwYT7KJsctEibqlUrwgNxQ 3ZkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555520; x=1724160320; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zR7iuyHffj9f//oCwmpY+WujZl20YxAEXMdQ/mInORg=; b=Dg9m91A5KAD2Z39cNWdr+ToLzT60phFwHBJ46R6zzM5L9gQN4sXEYY8RgAwKrNpv/q 4KFvlh4NXkt7SVdumbYHMLeTjalxBKrAMgUH4i5o1ibSnEUG4Xq7YpzIbQw22GxB/RRR 2GkuR6tEK+SO8E8q9vfsudiHaIfv2HS2DMTcqSO99jDqi+CxkdogIzGjQ+sSLZkf1qYB cYouFjVBG1XEmHwg4zOs7Jg1WtNx5hp2HD3al6YWcnZ8CYSnsmfasGxO3coOS8xOD8Ju DvK9ovTERso6e6Om89RM+ptJf2ayaefn383wdKHcg5fGxKFqS/K/VAWuIPtuAHCuOhfu W0yw== X-Forwarded-Encrypted: i=1; AJvYcCU494WMOzlmEsh86WM+JMucFi036HlACSXhG+QrEyCj74+yGiHUzYtbqSww1UKd145yojjabRIhj569ZAUHv70MyGmksrK+a6TcJMTJGKjilkJz7h4= X-Gm-Message-State: AOJu0YxzolzrjqYu00Xof6o18MSVrEOEaGQGMytEia93vdb5BPpBS1ZA MiJJfApM1D6sHCxk+LGqLlcGRw3LbZO8Ko0vXu5VW9ykxukQc6yLJIjP2ernJMI= X-Google-Smtp-Source: AGHT+IE4O1HeOB7Ir8sD2A/JqXloTOsBz328BQAjDg9uiSlJQr+ktC91pK7XIkyLaypNjbj27p76ag== X-Received: by 2002:a05:600c:548b:b0:427:ff3b:7a20 with SMTP id 5b1f17b1804b1-429d486fea7mr30226825e9.27.1723555520303; Tue, 13 Aug 2024 06:25:20 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:20 -0700 (PDT) From: James Clark <james.clark@linaro.org> To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark <james.clark@linaro.org>, John Garry <john.g.garry@oracle.com>, Will Deacon <will@kernel.org>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linux.dev>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Adrian Hunter <adrian.hunter@intel.com>, "Liang, Kan" <kan.liang@linux.intel.com>, Yang Jihong <yangjihong1@huawei.com>, Ze Gao <zegao2021@gmail.com>, Dominique Martinet <asmadeus@codewreck.org>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/7] perf evsel: Remove duplicated __evsel__hw_name() code Date: Tue, 13 Aug 2024 14:23:12 +0100 Message-Id: <20240813132323.98728-5-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_142523_212788_AA15ED43 X-CRM114-Status: GOOD ( 13.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
perf stat: Make default perf stat command work on Arm big.LITTLE
|
expand
|
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 19f4d0e71733..ba960a39f104 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -592,12 +592,7 @@ int evsel__hw_name_ext_type_id(struct evsel *evsel, char *bf, size_t size) { u64 event = evsel->core.attr.config & PERF_HW_EVENT_MASK; u64 pmu = evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT; - const char *event_name; - - if (event < PERF_COUNT_HW_MAX && evsel__hw_names[event]) - event_name = evsel__hw_names[event]; - else - event_name = "unknown-hardware"; + const char *event_name = __evsel__hw_name(event); /* The PMU type is not required for the non-hybrid platform. */ if (!pmu)
__evsel__hw_name() does the same thing so use it instead. Signed-off-by: James Clark <james.clark@linaro.org> --- tools/perf/util/evsel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)