From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 12F42CA0EED for ; Fri, 30 Aug 2024 08:31:54 +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: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=e8bFM4m8jLEQPCLvvCmN9XubuaZ9hTngOviE1bkHqrs=; b=3cbaLs6IfWY8ZEc0QuySaBhfB+ fdHINWQVKCG03+VWLDRa25D6spOM0Z950e8nOOnv8t+99ln2eawSLVKOiJs+ehn1+96R/iEhyfSU/ qiEMhI6m9n1OdHoavy5CpWby4IsZ+onw/EK/4q8TcqUdAnPu12ybxV9YdOQ9IXA79BuTSa3gIXrh6 lD++CXmIZWYA3/aVaXWbf8nXcobE5aDx0WwUbhHhKZDmTaVTz9QLk8tfxrvye1c8xStFAoxJGQPCo CIY3dXPixMEc/RqavlcCAQekL0I1Sn5crPEKSSDemvDhBpFgIAQWIiZPPJq9npM8oCU6rDyAhkSs5 aI4T1qnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjx2j-00000005MxU-1LLt; Fri, 30 Aug 2024 08:31:41 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjx0z-00000005MLY-3tZX for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 08:29:56 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-428e1915e18so12882575e9.1 for ; Fri, 30 Aug 2024 01:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725006592; x=1725611392; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=e8bFM4m8jLEQPCLvvCmN9XubuaZ9hTngOviE1bkHqrs=; b=Ygi1YYPBrAbwOmat3uvfNTPxSk+vZaVwlf0BNsqPATyHLrYsFt+LiDfgci0YHSZ3Mx fxQqA04qR62v+TnW6DGzBgAVjzT61Xw7VUppOR6wlwbWVhG8qpPeADwfMWBmu9KKWMVY 28uQW6MRTPBCfwf/TMZvIsnI5d/GxMJBFmUCh0SpQROZZs6sqa72YFoyRn5CZbkqM20C T4TnBXV31Y4PDxjqDbrjjLRHS0HWpwKlI5KRLqzp7XO7K5VSvAHelt2Gegs2yyz6IFpl Xd8wZJ36eQMmW1JK3kcYCrc0VnLC4Kl1tSesUSc8+p11nSz+otaAXQyi/KLq82ENPHPQ w/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725006592; x=1725611392; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e8bFM4m8jLEQPCLvvCmN9XubuaZ9hTngOviE1bkHqrs=; b=XSAlcePgdnvxBQBoKidvoMAy+goBfOjGSaQ98MqPGluZ7nwA8m0H48Dmb/jW6DvxOY mMDzAPXfnYCVwpfXYvBY/HUMtl1OwxJe69aSZQx33MbyvcXAg+motwMCfn8Y6zo9LYe4 7REIJDP9ZtB5Q1OEU+Y4gquc0NqNKacsJIZKEnkzKDW1sS+WqQA5Cs9IVgOL9/pmzBCn Vv4Zd2B46vBcEYynYUM72zybdqhIMbpz7e+sGkAJer4L6GMRsd/HjGA1wKfA9N+nRcJq 5pYbqQ/UECxSiGNkO08XCq0e13/dlyxCHDSCyy/ANvA3YKCyhID+NAIqpjG83X2HvNuS gnJg== X-Forwarded-Encrypted: i=1; AJvYcCUmTvHnq/fN3VgwyQCGx416t86k4eqcWergbYLbwKtWliEQz9hdRBc2EUNfXfzcdqGKJyKwnOxxJq9XjGUsEI/o@lists.infradead.org X-Gm-Message-State: AOJu0Yz2hSc0ps+pZql6WrSt+d/WpeeT4hFeg0k4yAbCWVqhGCdfz/f9 XED2B3+BZRXPnjJK0hjAQO8R0nDv8fecsNBwBUe9+rKUGSAvscl4O/vFzWUALDw= X-Google-Smtp-Source: AGHT+IEobN+bHBPjf1e2A/qY63oP+9QONb1iyLzUpttiXiN+oD3C491CC8vj44GHn2p7po01axW+Iw== X-Received: by 2002:a05:600c:6d8c:b0:426:5dd0:a1ea with SMTP id 5b1f17b1804b1-42bb27a1015mr43610085e9.28.1725006591184; Fri, 30 Aug 2024 01:29:51 -0700 (PDT) Received: from [192.168.1.3] ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf7fa745sm53174145e9.31.2024.08.30.01.29.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Aug 2024 01:29:50 -0700 (PDT) Message-ID: <52de8df9-4554-4bc0-9735-fdbd197dbb7c@linaro.org> Date: Fri, 30 Aug 2024 09:29:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 7/7] perf test: Add a test for default perf stat command To: Namhyung Kim Cc: irogers@google.com, linux-perf-users@vger.kernel.org, kan.liang@linux.intel.com, ak@linux.intel.com, John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Weilin Wang , Dominique Martinet , Athira Rajeev , Colin Ian King , Yang Jihong , Ze Gao , Sun Haiyong , Jing Zhang , Yicong Yang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240828140736.156703-1-james.clark@linaro.org> <20240828140736.156703-8-james.clark@linaro.org> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_012954_054557_93C4C839 X-CRM114-Status: GOOD ( 20.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 30/08/2024 7:32 am, Namhyung Kim wrote: > Hello, > > On Wed, Aug 28, 2024 at 03:07:21PM +0100, James Clark wrote: >> Test that one cycles event is opened for each core PMU when "perf stat" >> is run without arguments. >> >> The event line can either be output as "pmu/cycles/" or just "cycles" if >> there is only one PMU. Include 2 spaces for padding in the one PMU case >> to avoid matching when the word cycles is included in metric >> descriptions. >> >> Signed-off-by: James Clark >> --- >> tools/perf/tests/shell/stat.sh | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh >> index 525d0c44fdc6..24ace1de71cc 100755 >> --- a/tools/perf/tests/shell/stat.sh >> +++ b/tools/perf/tests/shell/stat.sh >> @@ -148,6 +148,26 @@ test_cputype() { >> echo "cputype test [Success]" >> } >> >> +test_hybrid() { >> + # Test the default stat command on hybrid devices opens one cycles event for >> + # each CPU type. >> + echo "hybrid test" >> + >> + # Count the number of core PMUs >> + pmus=$(ls /sys/bus/event_source/devices/*/cpus 2>/dev/null | wc -l) > > Is it working on non-hybrid systems? I don't think they have cpus file > in the core PMU. > > Thanks, > Namhyung > Good point I only tested on Arm non-hybrid. I can change it to assume 1 PMU for no cpus files?