From patchwork Sat Oct 14 07:41:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 13421933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8204CDB482 for ; Sat, 14 Oct 2023 07:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=9JzRBgxSeBsB3izQjRblLlSZ0LjbbVIgw9EAkhiaCZQ=; b=ZXh2A31HFbiIaX QmLkHDahW06+aMsWoJWPXGps2v8ZiRxwfs3UcMNvejHIxTFcNYJk+3ElXnOBwEfnEjhKSlI7iXNuq Rsh+TI5MZL0j3dP0c46ySRngyTUOGB4tXW5mqzNV7E6VFXchjgO5ES/+ZFBkeXLfl1c5et88jMTZF bYzn6zwjemRdO67ZfuCCVuz6xgEScy+MdwaXJ38bBtklALu+mnOVub44/b1hbr5kSGF6Z5Kg90ciB XOSDUO6rUpMQvG1sfyVCvX+4fh8047/P+decLV0ioZtUcypAiQc+0feklhUR+x3mLiJIemUNksdxb G732DeiIJNxgpYVNod4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrZHv-004vIk-13; Sat, 14 Oct 2023 07:42:19 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qrZHs-004vHy-1l for linux-arm-kernel@lists.infradead.org; Sat, 14 Oct 2023 07:42:17 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-68fb85afef4so2358363b3a.1 for ; Sat, 14 Oct 2023 00:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697269334; x=1697874134; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GXxaobQ9K38/gK95bNuK+bvOAZXTWecB5ef3F+VH4sQ=; b=fVTMAwCLoJIF2O3ernhaHGCGoRErvTdXwMoN9JtKeheSgy8SwHj//jC+EbwRzScNwJ ebHxxh7Kz59jYeW9I9hE0SfzBJPU6EleKu9zXzNQtnqM0mQ1MLa8+FK1BJ6Y3Vexcd0H XYzgL8TLZ+1uYhExX4aHL4dmFMj+2eOcDNtyqWFZ/dQOR3na/WY/flPcIzBP87WilWaG +3N1jIhp0XfB7Q0CabjEvgQx0Hd8YZhfRc4rSDTHO3AZ/Z7VioaQIFMWLx+j5SZrppu2 KZ0yn2eMVOF7QLB2Y0xk4QNk3uBLeIkKKdSn7i22ZHGWUXW3hbtilWLGautfKWFPacAw 8rcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697269334; x=1697874134; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GXxaobQ9K38/gK95bNuK+bvOAZXTWecB5ef3F+VH4sQ=; b=V/+l+RLmcAwY8iP04jvRcU0l+XM1Zw7rp2dstWn0sunb6fio21TFeoK+UH7fyyiZDL c/sVl38F7m6AHZphyc3yKNm5w02spH77BXutcZTaVWBDsQOaEiicZzw5YaRDA2CKozdU qbk52vRqErLfD3lPQCtP8ph751//rGgqYUC5SvDTlutH/AfVnrqiZN25VlwCgFgw3tej k9fEEZqwkzIQunH4owulp/ZxD6LO4PhyOr7KTujH3XOy4ateEyVUbAEfZ0/I9+x5FNt+ Vq2GQU7l4TTeBPj63k8NWCJ+ZI9mvGezptLeQZcmyJDIXUNADhHbEEJFv8de2wX3XRO6 68Lg== X-Gm-Message-State: AOJu0Yzdgv8ILDALntF2p4U/Frt5yBYgeBnWwdXUcE44w3vGkwvlSSTD bYMsr3Wd8teiirV9RprmuqP8aA== X-Google-Smtp-Source: AGHT+IGcVUgx3nU+w0wcZJrjCCPKDU059QOm4igtEbkEJHWclbME3f2cxUe/LO9Opao5s93fynh/Zg== X-Received: by 2002:a05:6a20:7291:b0:157:b453:dbb9 with SMTP id o17-20020a056a20729100b00157b453dbb9mr31350342pzk.6.1697269333671; Sat, 14 Oct 2023 00:42:13 -0700 (PDT) Received: from leoy-huanghe.lan ([98.98.49.106]) by smtp.gmail.com with ESMTPSA id e11-20020a170902b78b00b001c5b8087fe5sm4957319pls.94.2023.10.14.00.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 00:42:13 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , James Clark , Suzuki K Poulose , Mike Leach Cc: John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Leo Yan Subject: [PATCH v1 RESEND 0/2] perf cs-etm: Improve timestamp tracing Date: Sat, 14 Oct 2023 15:41:57 +0800 Message-Id: <20231014074159.1667880-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231014_004216_600753_1A3E411F X-CRM114-Status: GOOD ( 10.73 ) 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 patch series is to improve timestamp handling in per-thread mode. The current code doesn't validate timestamp and always return success for per-thread mode, for a sane implementation, the first patch is to allow validation timestamp tracing in per-thread mode. The second patch is to respect timestamp option "--timestamp" or "-T", when users set this option, the tool will automatically enable hardware timestamp tracing in Arm CoreSight. This patch set is rebased on the latest perf-tools-next branch, and tested on Arm Juno board. And added James Clark's review tags. Leo Yan (2): perf cs-etm: Validate timestamp tracing in per-thread mode perf cs-etm: Respect timestamp option tools/perf/arch/arm/util/cs-etm.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)