Message ID | 20240910151640.907359-7-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 4B8CDEDE99A for <linux-arm-kernel@archiver.kernel.org>; Tue, 10 Sep 2024 15:26:25 +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=ZV/wWyP/OuoFa1Q1XSAgXw1mLQzgLi2JT0YhtXRGetA=; b=yQo5ZWPadNqkIX5TBiOpuEA54Z qKQfziq0P9+QpCGjvmWJSHZd06olSYpoM/qm1vaE0jdOBH9mGZjwDXS1Fi2BlCTT9B2q7P2KNytE3 mFVzWLMZdb1MWKBp5qa/EpxdJk/E4D2z0IVnM5SdfaDTmL0/L6yVYQZgYUfPqENutFPpeeH3a1+qw jp8oFExMMa1JTXSXINPUsbnm7pcRivtEj3k6LWXWTzpCcdP+wcNrj9y1b3FUFFOqQSqdQbjwoU56A pcfWvaCwX+p/MKxxIfdXhmfYoDihroXUUj43pahWIPVTVDQN+DaM5KIayCFugXDqs67MbBNW1et2p hKqwWgAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1so2ku-000000066Ju-0umc; Tue, 10 Sep 2024 15:26:12 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1so2dd-0000000632R-3iQ7 for linux-arm-kernel@lists.infradead.org; Tue, 10 Sep 2024 15:18:44 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-374c1e5fe79so3735375f8f.1 for <linux-arm-kernel@lists.infradead.org>; Tue, 10 Sep 2024 08:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725981520; x=1726586320; 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=ZV/wWyP/OuoFa1Q1XSAgXw1mLQzgLi2JT0YhtXRGetA=; b=HSzMctugua/UeOPgGH3UiKrA+fza1oT+XPjFTpPOALYdVJyvpl8vM+ezt3x4fL2/sB 8j/zpYOsnfI01ScF8/V1TwOsBO3mmwklpiD8cD7au5dEjXNGu8cKwjqKrczsfiGaoKrM WrKvq7Tada58cW74+VDf7MtAX6PSq2IUZhAcf9CfbUzoLC7p+v5Hov4+Pl5v1kZjWD+x pa5MfoEo1Z+Sf99tg49ZE5XCpZFPMoMPZfWZ5g4/VI/Yh0BFkpsz175bmid7MWaibS5Y Wh62nuTNudE9kScqsHPLekCw066g6t45EKQEojhTf6y6B4faOGoTmwjCHal3IW1acTt5 8r0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725981520; x=1726586320; 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=ZV/wWyP/OuoFa1Q1XSAgXw1mLQzgLi2JT0YhtXRGetA=; b=lcmACRNwkvakZweVVdnTjk5g3JhQfMn7AD+W6JHZlkPUoCU0qZMbTbklni1zk74bJ2 nxUif9eBe1Sb73rxZjArXvVrQYtoREUe3ngQI2rwNkJkGqCwYvR820ellz7ORpJjKeRl yKw2zZx4OHE8YCJ+jn+4V9/n1fKbcIIz457v3U4dNzwf5IxgSe/muvJq/hhBTMralsMs 7XnrGsnVkAwp95shEwn911GiO8y7mUcHfAmAutmCP1lrx0y99PeAePxgouE2YSMSnuGY CyJMXzbfUeRMrgWMzk0Z3Z/yFTS8gvZdfvB8kUIgdU5QGZSHn357tgn3Hkx+xM/MQYyy RHBw== X-Forwarded-Encrypted: i=1; AJvYcCUT1eOw9W1nHzE0CYypAnfWyAfJNhSc2ZLyVv1Je6dTZnpQAmqAa6OdX/HtVce/1liW9a9Ye35YpDwqCE3jShbs@lists.infradead.org X-Gm-Message-State: AOJu0YwHREJc2LmuAZigqbquto770h1XgHoXDWJiRw6lSaX9FpVx1TwN vaPmbZ7vzzIHCppJdRz3EJKjYL/BhpgNowmt7Tse445M4tg2mGhfoBX+pgqOnvk= X-Google-Smtp-Source: AGHT+IFvmRJ3kwcH44X8tEVQpW/XuglOxSPCkP6MHjK2ehbvCFJ8Z5bWzyalPeu3oqnDHG3TOgB6LQ== X-Received: by 2002:adf:e544:0:b0:368:445e:91cc with SMTP id ffacd0b85a97d-378895c9deemr10636514f8f.21.1725981519545; Tue, 10 Sep 2024 08:18:39 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895665517sm9440844f8f.36.2024.09.10.08.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 08:18:38 -0700 (PDT) From: James Clark <james.clark@linaro.org> To: irogers@google.com, linux-perf-users@vger.kernel.org, kan.liang@linux.intel.com, ak@linux.intel.com, namhyung@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>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Adrian Hunter <adrian.hunter@intel.com>, Weilin Wang <weilin.wang@intel.com>, Dominique Martinet <asmadeus@codewreck.org>, Colin Ian King <colin.i.king@gmail.com>, Athira Rajeev <atrajeev@linux.vnet.ibm.com>, Yang Jihong <yangjihong@bytedance.com>, Howard Chu <howardchu95@gmail.com>, Ze Gao <zegao2021@gmail.com>, Yanteng Si <siyanteng@loongson.cn>, Jing Zhang <renyu.zj@linux.alibaba.com>, Sun Haiyong <sunhaiyong@loongson.cn>, Yicong Yang <yangyicong@hisilicon.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 6/7] perf test: Make stat test work on DT devices Date: Tue, 10 Sep 2024 16:16:24 +0100 Message-Id: <20240910151640.907359-7-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240910151640.907359-1-james.clark@linaro.org> References: <20240910151640.907359-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-20240910_081841_956144_4865570A X-CRM114-Status: GOOD ( 14.64 ) 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 |
Event parsing fixes
|
expand
|
diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh index 3f1e67795490..525d0c44fdc6 100755 --- a/tools/perf/tests/shell/stat.sh +++ b/tools/perf/tests/shell/stat.sh @@ -117,16 +117,18 @@ test_cputype() { # Find a known PMU for cputype. pmu="" - for i in cpu cpu_atom armv8_pmuv3_0 + devs="/sys/bus/event_source/devices" + for i in $devs/cpu $devs/cpu_atom $devs/armv8_pmuv3_0 $devs/armv8_cortex_* do - if test -d "/sys/devices/$i" + i_base=$(basename "$i") + if test -d "$i" then - pmu="$i" + pmu="$i_base" break fi - if perf stat -e "$i/instructions/" true > /dev/null 2>&1 + if perf stat -e "$i_base/instructions/" true > /dev/null 2>&1 then - pmu="$i" + pmu="$i_base" break fi done