From nobody Thu Dec 18 08:11:48 2025 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 911311F426B for ; Tue, 17 Dec 2024 11:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734436605; cv=none; b=uT3C6yYEO9UOFuXxq+HySHaW4thatAYEgxB9rSA2NPEVhK8iL06iOKgc8OEJPbUtycg40lZgzEr1j3J1scUgvppZ5PvrUpXI4j68asEFkz0OZyNHpkrWhghrof5DgxRAkgEhSb5bz9SvShu1x0Dtq5OLmXM1SNRevq5/JrsXngQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734436605; c=relaxed/simple; bh=fyI0/dhbkFxqKd8iWh2Jzy9mpwkSrgNFZ+i9alPd06w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=frMiR+vOgpnpLxR2XHv7tAVbwoC7AN9uCva7ZISBDJ0La0GbauAWMfHUdRJQtjshVcH6XvER7nXK7JFK9SRPTgylhC048lSdHKMx7nNRXNzVE9i6eYBELGCAQtmdf/j7h6RX0PoHZ15mBCtMn6gsD2rXY64showWYoynEIX/Ops= 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=WmrD2b/b; arc=none smtp.client-ip=209.85.128.52 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="WmrD2b/b" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43635796b48so20317625e9.0 for ; Tue, 17 Dec 2024 03:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734436601; x=1735041401; darn=vger.kernel.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=bFM1q7jsB7Su3lAVmgr0rlaLhCHhfoFOEst7jXnFLG4=; b=WmrD2b/ble34C9MwCDKzGxVg0vFLBUyrDuJVfLLw1rqm1qyUXqWiR4eOZbNAk1BNVb w4Jfgt14YAEDSRgePSBFuicKaAgUGvmJ9KwAjmlzoZcAyaMCeTIcWsakq8DZKghJYTTH RdTK+wh+fy0FLBLE1CNgxbjk/MuMoXFuOBFn+mGQMYKWiW1kkYesLDjNUohiIRRv42L3 tEBnBEcZhdBHqtYPB2CqdsAuXKhNiySB36/XPUBHQ89xX+TnS84awpFdq5CEcJlr6M+X jGSfOJdqpWl7+gNYy60d/+FvDsWF+ezjMtjKNRe8YzoCgnw5JWBID5d1O+20jG16Uw+B YZQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734436601; x=1735041401; 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=bFM1q7jsB7Su3lAVmgr0rlaLhCHhfoFOEst7jXnFLG4=; b=ofzQInw1PzhM/Df+NJLFb/hxeaE83VtfR0g4w8wLXx2u5CjZfXtkYjNkae5IKL+QUs 6sR/peh8Xsrot+bYpYv2BjKy8A/Gb3aJQj5YmFrMYnHePe5QCXhNA2cc42UW0uzaejbH lEcISrurBt+pdPltNblOuO8XXBrCreD6OmYn0V8gS9iMdimOyoV4jaQ8Bb20sflgt6CO 7qx2bVbiZE8oY5+coSqr1g18V2ZCoJWXs7TVrAD4GOxfqDKcgxbnU33ld+/o7DOz7WQS G9hv2QZRVuJma6A7/U6KmPM5v6GVNCSrvrfXAyZIBj9FCAFCNYPp8VBkDmPPgumdM4fv Arlg== X-Forwarded-Encrypted: i=1; AJvYcCVSDNtn+du9B7krGbhWhRE1+Vo6XQQ3k636hyCw5oI0iwIg7JsfyNiJIOWe2/+sF4h8ogejnfco9uOq5ps=@vger.kernel.org X-Gm-Message-State: AOJu0YxnE2/xcAIoot1qG76Z58kJNz26qEoFQlkR9EQ23QxoWXa6Di3a CwSXamjulNd0JLe7Ob4qAWNIxKIX02kz+Y0zrhBID3ydckqrBr/q1nbOujWkztU= X-Gm-Gg: ASbGncu8crfrZAhhlFAkRum0xeX/DducBm3faF8xwr3rVNC+wg09GA9ucy/8mvObEUu oHEiKVEaxV3/8L0+T66qTu7s6dgWKvN5hd7KhVcZHpGpYIt2ctLzznXRKzaCytiwOKRTsVSOOtN oFpiv1bOL22acbC786OrO1i/AkKGqOvbhHEP83nfNV2rOUpL0mZUSqlX0l2jlm4vHWQtKGW9iLy FYpQW4ktfXy08CizukvBP8DCqTjoZ5uxve48LcaFuw3U98tFGj9V1in X-Google-Smtp-Source: AGHT+IGHK04q5y+mpaaNrdicK1T9ozCfgAnXqS1cmz3u3H1E5qAKa1r9yR6aB/fLQM8NPU3JxtkxJw== X-Received: by 2002:a05:600c:3516:b0:436:1b77:b5aa with SMTP id 5b1f17b1804b1-4364815c7d6mr27745645e9.8.1734436601097; Tue, 17 Dec 2024 03:56:41 -0800 (PST) Received: from pop-os.. ([145.224.66.247]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436360159aasm114935825e9.6.2024.12.17.03.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 03:56:40 -0800 (PST) From: James Clark To: linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Cc: James Clark , Will Deacon , Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , John Garry , Mike Leach , Leo Yan , Graham Woodward , linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH 5/5] perf docs: arm_spe: Document new discard mode Date: Tue, 17 Dec 2024 11:56:08 +0000 Message-Id: <20241217115610.371755-6-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217115610.371755-1-james.clark@linaro.org> References: <20241217115610.371755-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Document the flag, hint what it's used for and give an example with other useful options to get minimal output. Signed-off-by: James Clark --- tools/perf/Documentation/perf-arm-spe.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/perf/Documentation/perf-arm-spe.txt b/tools/perf/Documen= tation/perf-arm-spe.txt index de2b0b479249..588eead438bc 100644 --- a/tools/perf/Documentation/perf-arm-spe.txt +++ b/tools/perf/Documentation/perf-arm-spe.txt @@ -150,6 +150,7 @@ arm_spe/load_filter=3D1,min_latency=3D10/' pct_enable=3D1 - collect physical timestamp instead of virtual ti= mestamp (PMSCR.PCT) - requires privilege store_filter=3D1 - collect stores only (PMSFCR.ST) ts_enable=3D1 - enable timestamping with value of generic timer = (PMSCR.TS) + discard=3D1 - enable SPE PMU events but don't collect sample d= ata - see 'Discard mode' (PMBLIMITR.FM =3D DISCARD) =20 +++*+++ Latency is the total latency from the point at which sampling star= ted on that instruction, rather than only the execution latency. @@ -220,6 +221,16 @@ Common errors =20 Increase sampling interval (see above) =20 +Discard mode +~~~~~~~~~~~~ + +SPE PMU events can be used without the overhead of collecting sample data = if +discard mode is supported (optional from Armv8.6). First run a system wide= SPE +session (or on the core of interest) using options to minimize output. The= n run +perf stat: + + perf record -e arm_spe/discard/ -a -N -B --no-bpf-event -o - > /dev/null= & + perf stat -e SAMPLE_FEED_LD =20 SEE ALSO -------- --=20 2.34.1