Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796126195; b=5gZIy5Q9Y/4bmC11EY4stbtsiT7QuVK0gq8Fc6YuvxURwzesnJtfdL7dqgluOWa+iupM theJd6h2H6aikoVgJ6udKWYQhoCkDyGa9cRwlJA+GwgDU7u1E6bCf0tgeTS09VppvduBq Eqt8MfBoVB2xorlLW8xRbYOYz3KxwSPaM+LbGfsyTeYAbD3WD5ZvSay7XzDPdqJGjJ402 Q2dXnhhkkp/PjDJSM0idk51eBhVG9eS67QCphKdzovxk01AWJMwApqGhCTg5d6jgYKWxJ N2hQmYmoPlK732F/5df6Cp7+mamUzmo0SicyNq16N+u0h8KdKahlJQOKq3nBusIpCsQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126195; 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=5A4F3YJ53Q0QkDeZGUZGnmNV9hJL64EgUcacp+4IwIyT6CX6U5NvhXiF7seCXaGf++Rb gBeWr5KDC7h9CPqlkr0fEPqDrsd3dK8PKA/fCAj/Pj9dmlBHsPWTGU7t2fDveZEoW/4/G f8yZW9tUY6zP64sUr3oN9K1LUwZ0dp/Akke5/JV3HcCjPI0i5Qpgt+YDWdTjrJcjabzcn dyztT846gOJZNRjdUFcj/TxaS67M8bEFUvnhCBvI9CdbbnVY56M6RSiLgTq1aMbCBd3il licwWBrIOXDV8NeCVZAFsmejATmw9256/fO7tZOi/lWzPp1Glxf/8owx2idasQlZoMA== 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.44 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 53D00606A31A for ; Tue, 1 Dec 2026 11:56:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 53D00606A31A 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-f44.google.com with SMTP id 5b1f17b1804b1-4bb5b8ef642so96558875e9.1 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=MRK5acLvn4FntGCh4zVMxVJPELNOScKasGgtSo71hQsYWoLEhSbS1yTD3q5SGLXavl +HVXbnqlLl/YtfyE78e/aL8GkIDr2IYWK6oKcx2zzMo6ntgOLwpH+bhqKiWi+AuQfGEd G/WHJs0XNr9Zj+P8rl9mGgv3FO7QgqHFxf5jAjVewBCQ/F5pgXYqoB+499ewP6ztDyxK 2QBUYauu4F8FnehHvIbh+BoXMKlXRRN0tfjO7tzXSPofr7IBokP2aIaxsYuZf7RNoE15 L7pRPLCuiLfOGEZapz1XpOGncYSK4SQ9THVgR6UPJ6RK6hX4ASba/1DZ8DMe3bBDpIgA Ubrg== X-Forwarded-Encrypted: i=1; AL+hErH3e1QxvNiPCfbt3YVBT9auzxDKJVuBXEaYgdFuunHEZFB9OYHRtQTOUrT8oBnr/+JXKmHi0s63BG5PflIcKgi8@vger.kernel.org X-Gm-Message-State: APuU4Z/vn6vuQxclAQD8COzuvYfx61vPlUjuJjCZVL/KEvAh9ozgQaPE 3VMOHc6x6UwWN/nzNomy92S35NjQvqY9nsR5wprsDJMYHLD5jC5aNK9mC/LBnbNbaZg= X-Gm-Gg: AZFdTZfiYxAYh5PoGzb1lQT6Zwmyxv9bv+m+rYNIZQKBhNUqBltWGd8nDs0DpEMJo90 n1vJWyI0T9NtH3w9/lTrX8kmllH9oo/gQn3b7rn5zxDFa+SY/DJOt1SztAtbzFccMrlkyXsngUD jCe8BgZ8VXXs39F63WDT5TDilpidCcNAfh/VbpKSpaOV00r6fiTQK6i65LGuIvDcoaEHUJYpUXj r0WKl5nSkFbdrtfwtbBNouk0nF8G+dq8flqO9c7vD4YH+clTwqTRFBEASVaYWpJcMNoru/NJQKV 8bsXz/elY92gUDUy6OpkNNzf7LR7VSXhc3TJ2HGsD84cz4RyDy0xATVadail+38SXMM743vgJGW XF4EJvaGdGEH041fEE7Dp2tfqzugA6Iz4LHpX9y9FbRutEcv6pxPJuWKt/q/yu2hkvYos7T1cpM SL1ME4U0IckhmrJG5p6OE6lrMJIsD47aKfUQTzuo/IwbSuoE5izR0bd0jLVwdTfNrf9YZLxWMsh Vord5782VB/Kyo7iC0CIhlEBMo8si35qst3SyAvLpQYIXBNmkNdV6iGvEUnR4ElxoYW2DAJ52CK vaJY7ETeehXb7LlyVq7PwknkQRdTbQmO 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-perf-users@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.