From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7D3C40961F for ; Tue, 2 Jun 2026 14:27:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780410455; cv=none; b=HCFnQgI26EsxazKQCiT6N3d4Gww07lYzy+P0olLXsAyOMRvHafe1mPQcLm3mtonMkpuUuueOtuKZl3EA97cWrpBbiJ9Xe9sFN1uuvRD2NYnvNzC+b9xdmq3FyuXaLX7Ka2Dw0S+3hghhZlF/4A29AMBYbwBTokRRPdHCl5l1tWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780410455; c=relaxed/simple; bh=9enISHoiXpOz8s2RakEzsEgzydQ2idPEqLuLbBe/Vcg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kpMKaCVBKfLIGiE6YenaSWdCKJbsk6xWQVgKszk/+k4E4dbsbrLYXBYBfCCY2mSMUNrXT5QLWq2ZOfyxDEZebrmZHBlaghpw2C5HR+ByfXb6MX/TClLpU3MmDUh0jebXCPIeDJr5poXflmWFE0Q6wSdBERD6jxqB9/uUys/jWoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=anpQeUL4; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="anpQeUL4" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-45ef189aa1cso3678419f8f.0 for ; Tue, 02 Jun 2026 07:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780410452; x=1781015252; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LF0PDpNJdViJ4rDQR90Xrs3wAgx6it7cgbXceeXKEJ4=; b=anpQeUL4NbO22RoTXlywDuafpuenDkF6/ApG08KELM854ZQ1CZbVJ4nm6RUVHH6mDP 2zDEgfmxL2OnGmthPRIv3uJGtFGSGn22dKM7R4lRSJjQQLWwZZttWKa/hPLVMLEnPadr zV4RDJQV8VXEwqllFiSSslUimgWhk1r1RyBgVqfHQ2HSOHVgU6gbSofEkZ+WnSu0hv1e a/YGSnIb5QIMbmxV69W7N7Go0glw0igu69rQT7mG2lAgjW9E7L8MGh2rBIBW5ohXfNoe Ro7fQBJD3gsgOm1wnvixOczqiVIXI9stFvPfcHMtR6qxVUT4R+vdFrCw+pNQikxU+qMC kSJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780410452; x=1781015252; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LF0PDpNJdViJ4rDQR90Xrs3wAgx6it7cgbXceeXKEJ4=; b=ZVCNKYOxE3jutCE9WifEkhr59rvi7Uu+jBW4msj0uKAVTmCSyXOAZ5EJEFCWzOysXZ GWLAYnvQO20kRFkR5ICqcM4Zf0sq4MV9XlEHG5gXJMieBV+X1Ih7IkdcsYX23X6txQ3b VWW+PBhodKRCnfH0ztqrf7YIu7oW8V2Pj+CkzxO1A0j5Uas+g+Aggp9wy2Eeo+Vl7Xs0 Zjhduc/d4XJ98oCGSgihlcRoPUEgHdvGrDWLcy3ipS8DV77jfBUP8lYEkInVpvLzfci/ LUPF6Kg+GGvglVXYtKj90GSfcB7ydZAVzj1txGGpUoaJTFvJ1kVS6DRIDqlcsjmYcnQR aXEA== X-Forwarded-Encrypted: i=1; AFNElJ/0DbSOQgTuZ2xyr6BfJ3yG7lZhYLYN6Jj0ufvS4u5JsnUEWj9E0u4F3Yjc/zx6Cen4AqUEOiJ8TAwsZO8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3p+LbtUotjbuGIINTM/aSfrv2Qemq+bVMULH9S9ZKr9J+WEqw q/Q/uIrede6Z+/G5UcpfE1AgqHsaXVl6G2k0TZGJvwOPqtrsS2B5UbnRqbTYfgAaGJI= X-Gm-Gg: Acq92OHQapY7D2absU5nzobhfVh0Upj2zd3eULvQlHH8fvBQF2b8TEx32p66k5C+zCR foM7EAEqWo3RtjuRJeTfjHiS/XAK4NRWl9IOxZziX7JH/RpyDx0c7ki5M5BtSGJ2T9U809ONNK5 CaRqeqIixrA73/xC1o2i0b7lPaqoOQ4ZD1a7Z41+7/I0WgpuBa0UoeJY7zkTaps297l5+sDRyHw C6/VhNsye84KScvYAOMZs8a0KbGdQBehSJZU7rsaKTSWv/k2xqFxOcm7WrWmov7aQrRm9UdOFwm F+1xUjrR27DnLl74Z+azWlHbRNxcbt9O5HFmmEpHrw4VFJUp2s7/y7AyDqAbBqLujechE/gjxr7 lo0o67IMibpKbFlVgfiMQl449MnyVNb48MrXdLG9FJcg9N9DlxjHuqBJ5r4k2OhmhcL1M92paJ/ 1u9c6OIVGFNtw7DcJiG2nxKCLTmJZDW4UPSLHdXQzwSaY= X-Received: by 2002:a05:600c:c098:b0:490:50ff:7943 with SMTP id 5b1f17b1804b1-490a2923a87mr247378765e9.5.1780410452040; Tue, 02 Jun 2026 07:27:32 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490b0e18e1csm66771965e9.4.2026.06.02.07.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 07:27:31 -0700 (PDT) From: James Clark Date: Tue, 02 Jun 2026 15:26:53 +0100 Subject: [PATCH v2 11/18] perf test cs-etm: Remove duplicate branch tests Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260602-james-cs-context-tracking-fix-v2-11-85b5ce6f55c6@linaro.org> References: <20260602-james-cs-context-tracking-fix-v2-0-85b5ce6f55c6@linaro.org> In-Reply-To: <20260602-james-cs-context-tracking-fix-v2-0-85b5ce6f55c6@linaro.org> To: Suzuki K Poulose , Mike Leach , Leo Yan , Arnaldo Carvalho de Melo , Namhyung Kim , Jiri Olsa , Ian Rogers , Amir Ayupov , Jonathan Corbet , Shuah Khan , Paschalis Mpeis Cc: coresight@lists.linaro.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , linux-doc@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 We already test branch output in perf script mode, but then retest it in Perf report mode. This is more of a test of Perf itself than Coresight because Perf uses the same samples to generate both outputs. Also we're already testing instruction output in Perf report mode. Remove this test for a speedup. On the systemwide test also remove the Perf report test because systemwide mode records a lot more data so running multiple tests on it has a big runtime impact. Signed-off-by: James Clark --- tools/perf/tests/shell/test_arm_coresight.sh | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh index bbf89e944e7b..8ed2c934c87d 100755 --- a/tools/perf/tests/shell/test_arm_coresight.sh +++ b/tools/perf/tests/shell/test_arm_coresight.sh @@ -20,6 +20,12 @@ skip_if_no_cs_etm_event() { skip_if_no_cs_etm_event || exit 2 +if [ "$(id -u)" != 0 ]; then + # Requires root for -C and system wide tests + echo "[Skip] No root permission" + exit 2 +fi + perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX) file=$(mktemp /tmp/temporary_file.XXXXX) @@ -52,17 +58,6 @@ perf_script_branch_samples() { grep -E " +$1 +[0-9]+ .* +branches:(.*:)? +" > /dev/null 2>&1 } -perf_report_branch_samples() { - echo "Looking at perf.data file for reporting branch samples:" - - # Below is an example of the branch samples reporting: - # 73.04% 73.04% touch libc-2.27.so [.] _dl_addr - # 7.71% 7.71% touch libc-2.27.so [.] getenv - # 2.59% 2.59% touch ld-2.27.so [.] strcmp - perf report --stdio -i ${perfdata} 2>&1 | \ - grep -E " +[0-9]+\.[0-9]+% +[0-9]+\.[0-9]+% +$1 " > /dev/null 2>&1 -} - perf_report_instruction_samples() { echo "Looking at perf.data file for instruction samples:" @@ -123,7 +118,6 @@ arm_cs_iterate_devices() { record_touch_file $device_name $2 && perf_script_branch_samples touch && - perf_report_branch_samples touch && perf_report_instruction_samples touch err=$? @@ -154,9 +148,7 @@ arm_cs_etm_system_wide_test() { # System-wide mode should include perf samples so test for that # instead of ls - perf_script_branch_samples perf && - perf_report_branch_samples perf && - perf_report_instruction_samples perf + perf_script_branch_samples perf err=$? arm_cs_report "CoreSight system wide testing" $err @@ -179,7 +171,6 @@ arm_cs_etm_snapshot_test() { wait $PERFPID perf_script_branch_samples dd && - perf_report_branch_samples dd && perf_report_instruction_samples dd err=$? @@ -191,7 +182,6 @@ arm_cs_etm_basic_test() { perf record -o ${perfdata} "$@" -m,8M -- ls > /dev/null 2>&1 perf_script_branch_samples ls && - perf_report_branch_samples ls && perf_report_instruction_samples ls err=$? -- 2.34.1