From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A71CC606A31A for ; Tue, 1 Dec 2026 11:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=IWulpJvW; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=huFzdrlU DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=3Bc7yHk/SZY+dZp0I9gVoi99iyPmfGw9EyQKeEuk8X4=; b=IWulpJvWfklUla tWZtxeMNHy1pwAYoJsy2a9udi0mtCDyQuoO7x3VhOogu/pM8XbEcZ7KqZomrvg7Lhy+Ee1zfGP9VK KoaMUa0uLKzK+Yk7Z6A6gOZPIS3fhK7iMsK/1EtSjDPlWRjTbe1P/XjXX6X03o54S1n9ZdJu89T++ OW8ofUvZd098O0PgmJHiWZp6RHLFyq4waoIzQIj0mrGUg/y1kB+M04fqm606acX7IYf55juf6H4Eq P664k51dUnMY6TH0reDCxolcfkiUoIG7K2x6au8r9IVp+Faixp9csv462MvG2sNOipU5qBOBffjcK 2CceVfBTJq5nXH0dG13Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYMTP-00000007gTn-3TuF; Tue, 01 Dec 2026 11:56:47 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYMTM-00000007gP2-1fb6 for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2026 11:56:38 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-4ac109a8a12so6940422f8f.3 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=lists.infradead.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=huFzdrlULe25y4pJtU1hiLAE8GsuK8Q6Jr/pNVMgTiqC614EE4Ua6muXdCerrKMEpM 3lDLBOLKqnAQudHkCgBijcbw1V2rrSDUpuEwmgh8KKdRUdLtmqVzx0mkBjbRIbt1jCtx eqsnp0S+NWJjKN67LklRrjOT1CC7Kn4m5KCnCw5drBIVWqSQPVTbDforebtRlOoaPOHe WJX3IbgUlDTpxDVAOz9weDYWu0R+RNdNq24xGyR4Q8dScmg410r9j2TwqRBHAwXIDG6o VkdDruMG76vPxuv6TJJujpRm590vD5QAAdvHutYeuKZOyLCdqnqICu8ohYxIE0r1Lg8n 0T1w== 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=XJQVmv5SHu8rLXx5KpCjNKxOrvgaSY4SyZMyDBFBVZBpzqz+3q4jT3Fhgkt/owji6V JdD0ZNNHKQ0pResxo3YE2l5ebwgKgP2jNmi4gQzPLSZxZTn5h3qTOy5tMVEitpW6ZIHs 7H5x1mHnTAtW3PUkxEfYQWi/mqvNHCKvqdr0IgZExA9/qwlsevlX2+FQSTp+2tEK5pxa hjAwFFlAIVdxwzjeZUALTww2yVJW3zP6NDMJgLwUeD4HO9XRFUlmylsg156XED2993qf ZuWyoNVIMvSwp2Gy/OjHlr0zq7ENZENevNYZJjSHo+7SbHdHEkTHqed9kL1T6x8UC9cK NDLg== X-Forwarded-Encrypted: i=1; AL+hErHYi8FJeF9arpMNbclWPamebhWVNeB7yCq4b3rkwc/97/ULeSOpxAOm+1opmTlM9u4HcrUiny3HI+aionGAxFeq@lists.infradead.org X-Gm-Message-State: APuU4Z9SegOeGJwk2F6cZc2WbSeDTmliM0YJNbLzx0DxGwAVEHojiQSz 5hehuj55gYR82OooxHmfx3zqHZlvLYx+kqjZHWpEOuLqsX8cFdBd16QjRmMRO7AW+hw= X-Gm-Gg: AZFdTZfgSv66HO6WzAxqur4hjPNVikD51e2o/r09q/q17tueBZ55Hd5/4NWkx2m57mL EWtTWYdvMNPEgMIhDm2sftbG5gF/ePLjpUM1ll/oB/L5ww1O3vNgKcJAweHk+wWRSd9eySYaRCI cinP+NHWau+mVdIrYceprUC359D4cIPjlZub1DJuGrICS0PSVXYVBns6DWLyYZ0QLD4c1XxOe+6 9b00wmNL177UpSF+aPeQ42yHqobvdmqWbB4e57kaUsyK+uxjx9GFA576QjcatDLgITUfxgyt/1o Nic/8ASxh1QocEOBsl7iBfHq6qRl/Udbq9GjiF85cFGpUqOyzVbmK+So9oURnjmLdr2EsS3N9sJ k7Gjey3NaFxYr1dx5gBauY2f7VCXMe9wrGx2Du1Np6DXOZvki8MwQBR3k0OoV/bHj4q0q/zbZN9 utu9hOqjE/IJqDLb4ODpluVUf+ln7FGb8+E8gczChDgrGoljwpdCcEsz04CGQf1hi657SPZnxuI Iu7o2em3QwWFnLk3yqjVgoY9O6qt5Y5qIY5MrIxbZz+ARx6VS3JR9QsHMq6FzXlqlnXH8zXQBcp oCoHgbMl1Z0bWRLDU/EO6p1VUwlInd4k 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-Archived-By: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_035636_482422_E2496499 X-CRM114-Status: GOOD ( 19.91 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-7.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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.