Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp882700iob; Wed, 4 May 2022 09:51:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFZiurbgKJHRYoXUq4qeM/mIeZdOgv3eMBX5HHw4xZZiNty6VZGh5rh3FA1W79XHu15rt8 X-Received: by 2002:a05:6402:26d3:b0:427:c57f:5333 with SMTP id x19-20020a05640226d300b00427c57f5333mr16438390edd.61.1651683072253; Wed, 04 May 2022 09:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651683072; cv=none; d=google.com; s=arc-20160816; b=0HNmBR0E+F6HmG7k/tVqHGW2GG2kLKXEWwEMilQqewKV+7sfgZuM4ZrUZMPGUNc1lO 5aTwAKzV80ghe66kUGR0CWd1hPwyX+DWOwyRh2iXZTZH6UtL3yyz4Cx/ygnHko25cJsd j4txR61IDqOEV7Fw5rp+vetezNerbzDjexgRN8JpRCT1AaNs4EsW6W+OcTvW3UMqnzMZ 8T5KiplD1q9859GoEZSxe5kKJ1ODKAwrPA1KTdqhP8ztX5me9K2jzC3ryklw0HbjgWbg 7wPNwjYWK6LNnIHLoK8ljzzWUtOKAm48m+Ali7e/rl5fX0OO/BJmT4qano+S3Mft00qc b27w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XcODd2UEyyFgA/yVxsM9N/jWqB3ZQaatytNcaR5HYJk=; b=N05tpYtfFKBJi7brujpIp/G7dNZZRQMygywO2gRNbqbeZmS2sxPjL9uXFLK7yWU3gO feL9NnLy+OGGpyW2LtepsLOIlG6Sy2jFFzCQOqBKlKiI3/MKDExf+IwsDUllppocKrrM SpFxw3mcU1/H0aREIfHHEjZK8RlSBIPQgSkzdF9XTdyioWof91yR5bqVvROUuJeiI91m WBOj7WLpe6dNb2LBaTkY+Gtc9H783wBqGozIrOUZDvhh/g9gzzUUoI6cwS2U1CjP9Qhq 9i9BTnc//fsLRJBMGUouZSpbEgZtcB5fhL+hknu+IyiMX1MwaogCxRcsTUuv0XMP0/I/ tdyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a170906c18b00b006f413609a67si9275854ejz.444.2022.05.04.09.50.47; Wed, 04 May 2022 09:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351752AbiEDPGU (ORCPT + 99 others); Wed, 4 May 2022 11:06:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351777AbiEDPGK (ORCPT ); Wed, 4 May 2022 11:06:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CF9E63702F; Wed, 4 May 2022 08:02:29 -0700 (PDT) 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 492B11042; Wed, 4 May 2022 08:02:29 -0700 (PDT) Received: from hype-n1-sdp.warwick.arm.com (hype-n1-sdp.warwick.arm.com [10.32.32.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2A4E13F885; Wed, 4 May 2022 08:02:27 -0700 (PDT) From: German Gomez To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: German Gomez , Mike Leach , Leo Yan , John Garry , Will Deacon , Mathieu Poirier , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/4] perf cs_etm: Basic support for virtual/kernel timestamps Date: Wed, 4 May 2022 16:02:11 +0100 Message-Id: <20220504150216.581281-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This change has a soft dependency on [1], but assuming the name/location of the new sysfs interface (ts_source) doesn't change, it should be safe to apply. The new 'ts_source' interface allows perf to detect if the timestamps in the trace correspond to the value of CNTVCT_EL0, which we can convert to a perf timestamp and store it in the instruction and branch samples. Due to the way the trace is compressed and decoded by OpenCSD, we only know the precise time of the first instruction in a range, but I think for now this is better than not having timestamps at all... Thanks, German [1] https://lore.kernel.org/all/20220503123537.1003035-1-german.gomez@arm.com/ German Gomez (4): perf pmu: Add function to check if a pmu file exists perf cs_etm: Keep separate symbols for ETMv4 and ETE parameters perf cs_etm: Record ts_source in AUXTRACE_INFO for ETMv4 and ETE perf cs_etm: Set the time field in the synthetic samples tools/perf/arch/arm/util/cs-etm.c | 89 +++++++++++++++++++-- tools/perf/util/cs-etm.c | 126 +++++++++++++++++++++++++----- tools/perf/util/cs-etm.h | 13 ++- tools/perf/util/pmu.c | 17 ++++ tools/perf/util/pmu.h | 2 + 5 files changed, 221 insertions(+), 26 deletions(-) -- 2.25.1