From patchwork Thu May 13 14:35:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 12255877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 471D9C433B4 for ; Thu, 13 May 2021 14:38:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F2AC61073 for ; Thu, 13 May 2021 14:38:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F2AC61073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=UuOioZsmri3B/YyfV4nwYtg9L2OjGVSIFSVc6SCej4o=; b=mkwq1U1iat5yhefQFX5JuUQKRH O/bmanDbP00QFAnaWsESkhDXwbRkU1aTr5+QKmz8/HT3R4I1GjivFztErvqYmwmVPzGSa25/qZ2CU jo9x1KSO0EMrHbAjaTfBrpHyspfHEcQKt6evNX4Hg4DfN1TvzDcnlIitUGz0Y2mmysTj3HXQUCtMW apW4bJ5yW8Mqy4jzv0BhxZ7WA3Pirj8Q7uL2UY4n076Lcbdu5tsgw7SdnhJXWFMibsM7FYjaA5GeL NCcTYgPakOLmeZQ7FiT2uJq3grYfEj1uDb0IVuDt1hWSiuuxMCiXCOzWohaOI38tHjb7guajLO55f or/Xyuzw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhCR9-005l8r-IM; Thu, 13 May 2021 14:35:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhCR6-005l82-MD for linux-arm-kernel@desiato.infradead.org; Thu, 13 May 2021 14:35:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=LHzjgbZJzVud2hfDLQ5K0gMDCa7XmUbD0qo0iQ6FlI4=; b=w20l3J6yM0rD+WEDPpzbVySjow U/ca3RI+KGU6z3ksdcj9hyQBxjDNV5YsTBbA00N5kDD8+1f+mdIEoRZje4FwvtQLGsb06xirDl9AD gb6WGLKRMbDqEDgQD+y4JPtt6SDjEm5qpHvVppnaqMXjivdkRl3DubfBw0p/BqVZLRUCYrTV4E7Ty eyg9Hf9hXbPfAtfkp/URR4Taocc71FcewmCghvwCObXiQ6/hLWiwVuWU8DPNx5rYOIxfirfZTTl+X wYBwiF6XX3dChxrl7wLKrdywBa7AWGvQCeTYHLWz1pOuYd4jxt700exw4HuYTzrBMQD0lhHcLFyJm apIItI3w==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhCR4-00BK9p-3U for linux-arm-kernel@lists.infradead.org; Thu, 13 May 2021 14:35:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31597169E; Thu, 13 May 2021 07:35:32 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.81.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 503613F73B; Thu, 13 May 2021 07:35:29 -0700 (PDT) From: James Clark To: coresight@lists.linaro.org, leo.yan@linaro.org Cc: al.grant@arm.com, branislav.rankov@arm.com, denik@chromium.org, suzuki.poulose@arm.com, anshuman.khandual@arm.com, James Clark , Mike Leach , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mathieu Poirier , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] perf cs-etm: Handle valid-but-zero timestamps Date: Thu, 13 May 2021 17:35:17 +0300 Message-Id: <20210513143520.22694-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210513_073534_214830_0FA2EFBA X-CRM114-Status: UNSURE ( 6.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patchset is an alternate solution to the original: "[RFC PATCH] perf cs-etm: Handle valid-but-zero timestamps". It uses the existing Z option to --itrace instead of modifying the behaviour of the cs_etm__etmq_get_timestamp() function. Using timeless mode is equivalent to ignoring 0 timestamps, as suggested by Mike and Leo. It applies on top of "[PATCH v3 0/2] perf cs-etm: Set time on synthesised samples to preserve ordering" James Clark (3): perf cs-etm: Move synth_opts initialisation perf cs-etm: Start reading 'Z' --itrace option perf cs-etm: Prevent and warn on underflows during timestamp calculation. .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 45 ++++++++++++++----- tools/perf/util/cs-etm.c | 20 +++++---- 2 files changed, 46 insertions(+), 19 deletions(-)