From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 EA74C438FF5 for ; Tue, 9 Jun 2026 14:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781016050; cv=none; b=mmIsZREESn2HKk97q0SMLSbvaQYCVxp8wrYBsJuE69mVbSXS/oTsRwfnR0P/3W9HfCocTT9YJpIAo9KJv1CveUWYxbN0BgQVc0MO9f6eKSOl/zo/fF5Agx+/35uXl4R0YSvvPqKLLbi/WLY8SK06WNPcKCNEtxkcvz1uzMGQ9DU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781016050; c=relaxed/simple; bh=wObRJmm3gTlf7wqz3XGbcKcAk4UU+DK+eJvukw9px/Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nyYA70epnxEYom4BEYbws94wqj7EQu74aqYGPjIKlOmxL9V80NSqFoJa9+/hR2OeSlRGi//1CFWk39NdiYaiSX4VMNIPPrjOqwSHkixdoZV9J6z/NsMiwOMTuHONYtAO4JhtIWA4tQKjzbQWgNE1zIvd/Qpt8p9rgMgzUKTBSIY= 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=F04zP6Oq; arc=none smtp.client-ip=209.85.128.43 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="F04zP6Oq" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-490b4e1ade7so60875425e9.0 for ; Tue, 09 Jun 2026 07:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1781016047; x=1781620847; 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=VdUeDLTBd8NbSbxSGmF6PVOlpVLflZ1t9lCb20G1ZuE=; b=F04zP6OqT2e5wpfuCvsodg+W7RQc73XZPImtr5g9uCrGpBRNvhq7r7ajRrkr6aQLt8 oyMsLCZLPcK3SbnYwsvj6gYXT/YaHmv2H91tGr/Lcry+5/lleAW0W4sSz8jUUHrkRl5g OIfxIRn14UV162xelR9odKtWj3vnFkA9Qnu5ZaLLghtJT0/SdHAMxbYFq/jTn5wqP9pf EbQgPTlzEUEqJSR0sNhjuWT7AgEiTIHPSE1YQmrKDSeOWivS+GJaIP01Auok2qHiMHvb 2WnknxQOAlH4+tA2Pwr/IvYNFPsADuzXWiMyxiq+qWpArSvbeRivH+2QmEoNnYjSpoxv c5qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781016047; x=1781620847; 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=VdUeDLTBd8NbSbxSGmF6PVOlpVLflZ1t9lCb20G1ZuE=; b=CgwVU1lNCA3bUpAEM1moQARC7eEobyr7GRkUYwTy48yM0u5FdUzOZBytxM3DcNDy+k SCjcUlHx5w6oXO8STgqMdEyUmufYFKOrrNfpPbE3wbY7TtVewl03JgvYCV46QudRWgvD oMgpjHzsr2M2zqzsa0ORTZ/Yb17uaK4jN1TSigCTd1Ct59wgfnVxGad+CqjKeD7objUj 67T0kNhXilYP2f+t7d8AsuwdAFCwRADV4zcgln5Reb+/05CGR43rlpDhGMlkWyk7NfeD zahgKjbb3Sc+hUYOLkvL/n+M5uL6WSQBNeygxqI31Hwjo/apy5834rufF89WBqbb6Kt7 mmew== X-Forwarded-Encrypted: i=1; AFNElJ8n5rXfKQu1KSXczr9DGfdgex8LtcC52lW55U+Vb5zS2tZBxLIYEPVksetZ81arvl0yo0A1JTPIm7EmOBE=@vger.kernel.org X-Gm-Message-State: AOJu0YyiTZp7lRPDaOoFv2HYwrGqosG5UvfX46VLeJyfQoVlTVOoUkJ+ e9WxTIhb2XZaW8kKIw6Z/0/h7PoYRikYoBIPMPdMTixWMhp++6kgiM5tUAwxl7TXyBUAwOpn4BY 8k4oJs9Q= X-Gm-Gg: Acq92OEFCfq2qRrZLWgzoIOxMfWip2P/TpyLPU/3KTIB6sGQ83XM4+Yvj1ARCWccyMh XVLixbysvL1PbPH8wnGr5nl90UtkDts5n+wIMl625qRWL96e9BISc0HMM0XpmmIZDLazozNYx5b SKApYNskPtSwlzq8uCEO5kKPJVGmbNCm3awpjPXsjf5p0sKZerC7hUXEiFKWSUTavdPKMDIdFMk //lAWs/IPXzLVuzibXWUSQuexCn7L6nd7t2QPMFHthOEwXMyMEPL45NgN7Oj3rB++Jom4hE76ka c7WnWQYkhwl1Phwaco/ga+sECciBo0ZKwupzGhufXWMU0rO25NX6HQb/K9F5M94eNq7CCy38Knu akGVVGzR94MMr9boTz99vAOfVD5PFuczMdf/i8YqbxevCd1CDVUjRVLbBeX9OCvXHUzf56qTv9A CN0d6NIAtCXPz6aY+X/e+C99AmhlhixmRaEA25iuhwTNo= X-Received: by 2002:a05:600c:529b:b0:48f:e230:1d12 with SMTP id 5b1f17b1804b1-490c2625f9bmr306873925e9.31.1781016047377; Tue, 09 Jun 2026 07:40:47 -0700 (PDT) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc3c1149sm428411935e9.4.2026.06.09.07.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 07:40:46 -0700 (PDT) From: James Clark Date: Tue, 09 Jun 2026 15:40:22 +0100 Subject: [PATCH v5 17/19] perf test cs-etm: Add all branch instructions to test 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: <20260609-james-cs-context-tracking-fix-v5-17-d53a7d096a19@linaro.org> References: <20260609-james-cs-context-tracking-fix-v5-0-d53a7d096a19@linaro.org> In-Reply-To: <20260609-james-cs-context-tracking-fix-v5-0-d53a7d096a19@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 If we reduce the number of samples searched to speed up the test, then there will be less chance of hitting one of these branches. Extend the regex to cover all branches so the test will always pass. Reviewed-by: Leo Yan Signed-off-by: James Clark --- tools/perf/tests/shell/test_arm_coresight_disasm.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/perf/tests/shell/test_arm_coresight_disasm.sh b/tools/perf/tests/shell/test_arm_coresight_disasm.sh index 87797d239f76..f78dfb6bf73e 100755 --- a/tools/perf/tests/shell/test_arm_coresight_disasm.sh +++ b/tools/perf/tests/shell/test_arm_coresight_disasm.sh @@ -38,8 +38,7 @@ cleanup_files() trap cleanup_files EXIT TERM INT # Ranges start and end on branches, so check for some likely branch instructions -sep="\s\|\s" -branch_search="\sbl${sep}b${sep}b.ne${sep}b.eq${sep}cbz\s" +branch_search='[[:space:]](bl|b(\.(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al))?|br|blr|ret|cbz|cbnz|tbz|tbnz|svc|eret)([[:space:]]|$)' ## Test kernel ## if [ "$(id -u)" == 0 ] && [ -e /proc/kcore ]; then @@ -47,7 +46,7 @@ if [ "$(id -u)" == 0 ] && [ -e /proc/kcore ]; then perf record -o ${perfdata} -e cs_etm//k --kcore -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} -s python:${script_path} -- \ -d --stop-sample=30 -k ${perfdata}/kcore_dir/kcore 2> /dev/null > ${file} - grep -q -e ${branch_search} ${file} + grep -q -E ${branch_search} ${file} echo "Found kernel branches" else # Root and kcore are required for correct kernel decode due to runtime code patching @@ -59,7 +58,7 @@ echo "Testing userspace disassembly" perf record -o ${perfdata} -e cs_etm//u -- touch $file > /dev/null 2>&1 perf script -i ${perfdata} -s python:${script_path} -- \ -d --stop-sample=30 2> /dev/null > ${file} -grep -q -e ${branch_search} ${file} +grep -q -E ${branch_search} ${file} echo "Found userspace branches" glb_err=0 -- 2.34.1