From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796126200; b=lj7nDr0+KzVONTTsANRUQl2ThQq9tt2vmyTeXgFB0T9fxhvwlbPnPi53cGBUWAVGkul2 BM0A2wkPaqbOgFBwh1ilHiZ9kHtB9RYwpHxEIyXbuFc/ZU3zYvlt++OenyBaPuDOOATK0 9WAeL9IzLVWFUvsnvs0Xs5GQOnfKDgW9qV+oJXMTZ2ZSSmCWQBHlMJKCaeggAZbXDSFg5 jusr6gC5tfdWfufDV1f6B29kPKabosrnErAh7ndyq22jKjYcy4bOKhy+RXELmZ8c3SU6/ OOIQvHG+C8MA9WisTibeEw+8ZeIfvVy07Mk1aaaFlW7IjitzcMCBNzX3smkfJ3cqFbA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126200; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=3Bc7yHk/SZY+dZp0I9gVoi99iyPmfGw9EyQKeEuk8X4=; b=xMIqXqYSV0Ug44x8JXSqhygAJw1fCilJISxAgSVyTGANy+ROtkvCMmhMvPjB3JbxTHQf 2a4qnB5eIUCp6Xbqt8U+Nm6WZNHFiI95j9Ca9QusXO0vxuTCjrue3JxuY6EO3JkuuUQPt rK5Xe63/iTiRYpW6EENuyt9cqd4GA3U0y8kmwJdPRj2QM9lp6XHPTRN0t43htt2av/WZC Ip7BhmWGLpwWnJv9AcsOoiJfLAS3bfhECEY0rSmtgZndjErF5rIxWxQ0jGdGi6K0J/Urq COLX6EnpbcTzbor8Dcfn6MLOdxkS1gLt4eKVFLdVYBl1HheWdDrCo8M/Z58aAhgIpQw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kWCAuEbs; arc=none smtp.remote-ip=209.85.128.43 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 553BF606A320 for ; Tue, 1 Dec 2026 11:56:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 553BF606A320 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, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kWCAuEbs Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4bb6adaf0f1so98969525e9.0 for ; Tue, 01 Dec 2026 03:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796126194; x=1796730994; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=3Bc7yHk/SZY+dZp0I9gVoi99iyPmfGw9EyQKeEuk8X4=; b=kWCAuEbsJ76eVIwpnTK7uJVENV7clOkd+zcU+pXUgqvvsJAV4dzOwPtMol2LYIVT33 6RbjuHMnWB8UCGzzRzZpRr6Ot6W3P7dHzXWl7l0SVA1L67ne0hYmfG6zifK2Sx3x4KTa /dBTdbQEX7Me4qn2t9Vym+8p0cQ9LPNtrnsXbCbANJeo4oPnf+CMhWAnmn9fUfVX7iVs yVWorfMcP2gOf/yxAyuzkJBhN8MLF6EqKRuDABIuy5rHihGYS6DnOocbnSiBRcrKVdl7 r5mMwjomSJrC9AQO9U0tx/RzpH9V/mKVJDlhXNwsjP5CKOAwNyWhRc+Jk+wzzbaYMEAv rrBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796126194; x=1796730994; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3Bc7yHk/SZY+dZp0I9gVoi99iyPmfGw9EyQKeEuk8X4=; b=nf+bcg08aV/8ooBsEGOFxHBCNJOvUSniaE5Pg3q9Y007OYGr8alDCw0dGMsPAT4Ey/ nBOH49YbGxFO4XEnUn+7pYTQGl/ERjo3zOEivo3pEsb+mP47IyfWmCqiDPgAhn9mZLMo +k8kHHAPDABGxUTjdJGqkT/ypsb/JWjKgOF3kTHf+0pGX+ms8s4D8psueaFgBRcE6FuU rvqrS0EOi1E/WDfrI5auuOcyFi1WDYoJp9iaNkn/GcmsO7TVhEd72TeIwPSwowvN3Efo d3nvIMVLGB4//HC/Jp6BIvz/bUPMlRDigr7aEh4MuDbnO6B6IXD1okFgObk/HOjXDlA+ B6ug== X-Forwarded-Encrypted: i=1; AL+hErGBGH7ZOq09vUfp+PzoD3Sksd0j7vl4DFlAhY8MyWsmd3O2lpEl7KAB1OUJ5gP6RxevEeaX4+3peoYk7MY=@vger.kernel.org X-Gm-Message-State: APuU4Z/FOC1wIoXxGbIE4n7bwmxCc3gVpmC23RFiVmv+jy4m1DP+VzCC 2QqSpbmkVAgoqnuzAhWhQoeEXqvVPPgUZfj6aebXsn7+rpDGte9HIYLmjFX/dTxWWtw= X-Gm-Gg: AZFdTZdzCu3yJAxAncKRNDPoRMP1C6rmI/ZvZsYoi0vHwBgUeTSE4JdkfezME+lS7EG vrKJYOEnDP2qlDh9GG/9JG+DJaltEgWHRjmhz3sEGtTnH/Z0qVrzH/9JndLmorPih2ZQeM030ZC IGYzJCpFkh9cCK7FKYK3MQ0MTrRehCX/D9rNaeDJ7OKal2LrtVYrUijsn3XvmMzvylYtov09OxA 7/UsmvRFoyVM7jshpQ58fy+gi0Hi1Ezm562sGFv688mvPbZ8pBQaDb2Z1CccrNHiAatbqh37Uzz 2IB0+vbmDWojl0D79xNjOHauTIW2WixgSoHo4/7MJbVwOat+ymmHa6eUaxoKCHF86axHGz6shmX r7YjvWmqNkc3zxJM6WixQrdh+ekrFrksa/g/1Fhzxp+/DtPENRXxr20KUPIgKethOGHZRLtagwE VphqMQbgmktPhMKHzTKaFX8/jpjyKeKnW5M/3Knr9fTuatvPKVS6M0LLGMSHN0DPiMv3jVAF1rJ I4bcWaAVUL6qfifo0cXf4tFkwC8UfRxK9G7j6sArJt1xTEZRjVFwNDcDryKRdRA3KH1euO86IwL 5XUK1ePh6WdL4JWKOE4CWn/aaPi56hbI X-Received: by 2002:a05:600c:5303:b0:4a2:1a:a11d with SMTP id 5b1f17b1804b1-4bb88785d24mr715711485e9.0.1796126193691; Tue, 01 Dec 2026 03:56:33 -0800 (PST) Received: from [192.168.1.3] ([37.18.141.193]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6ae2dd55sm68772830f8f.30.2026.12.01.03.56.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Dec 2026 03:56:33 -0800 (PST) Message-ID: <640ec2fc-12a8-4ea2-9332-4c8285204db1@linaro.org> Date: Tue, 1 Dec 2026 11:56:31 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] perf arm-spe: Honor --time ranges when synthesizing samples To: Jan Bernloehr Cc: Leo Yan , Will Deacon , Mike Leach , John Garry , Namhyung Kim , Arnaldo Carvalho de Melo , Ian Rogers , Adrian Hunter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Matt Ochs , linux-perf-users@vger.kernel.org References: <20261129092936.44711-1-jbernloehr@nvidia.com> Content-Language: en-US From: James Clark In-Reply-To: <20261129092936.44711-1-jbernloehr@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 29/11/2026 09:29, Jan Bernloehr wrote: > On 27/11/2026 13:07, James Clark wrote: >> Do you care that timestamps don't always increase? Seems like it would >> be acceptable to stop after the first timestamp that you see outside of >> the range, even if there are some edge cases where there may be an >> earlier one later. >> >> Also can you elaborate why they don't always increase? I would have >> thought that they would always generally increase in SPE data, if not >> for some allowance for instruction re-ordering or something like that. >> But that would be tiny and not really relevant for this feature. > > Hi James, > > Thanks for the review. You're right, real timestamps do increase, and > the commit message is wrong there. > > What I actually hit: on some CPUs the first SPE record in the trace > carries a stale timestamp from before the session started (0, or days > old). tsc_to_perf_time() wraps it, so the sample lands about 2^61 ns A zero timestamp could be V2 erratum 2813408, but "days old" would be something new wouldn't it? It says that timestamps could only be "zero or off by one tick in some cases". > in the future. With the early stop, that one record ended the CPU's > whole queue, which cut a fifth of the in-range samples on one trace. > > For v2 I'd bring the early stop back, skip records timestamped before > time_cycles, and fix the commit message. Does that sound OK? > > Thanks, > Jan I think we should dig into what the root cause is before coming up with anything. Can you share a perf.data file that has the issue? Maybe one file with the 0 timestamp and one with the days old timestamp. 0 would be easy to workaround because it can easily ignored or treated as invalid, but the other issue needs more investigation.