Message ID | 20210410050046.5394-4-leo.yan@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=jXx7=JH=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 14E14C433ED for <linux-arm-kernel@archiver.kernel.org>; Sat, 10 Apr 2021 05:04:39 +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 AE5C06115B for <linux-arm-kernel@archiver.kernel.org>; Sat, 10 Apr 2021 05:04:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE5C06115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:References:In-Reply-To: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:List-Owner; bh=DRkjEGcwi44ZBgLzyBAzw/nNqdK4aPTG7vIV07roNxM=; b=O5xVsLay0kVCT5i+7n7wZm5Qp x/kcPpQ+T+/YFTCcbw+EimyzTv85jWTCTu0azEg9x7NbU63Z3gaBRcEEJ5UvZ1YmjLqa4FLFP644s 8SWdDn6cKC60SaLFRTn47D7ns1lxzNe3clXn4dFI3MLTKS7XHqTJUaMKuX2eLsOFsO0jnSQenuOQG v3TLs0Hoccw+KjA5GsO1HamKOgVsvam7OLaYs51ax6cO43N8EoS9x0tVcVmlX0VfAhRrXhxtxssVT pFjg0oioJJlA8S8iebfwTfQSP+Czk3qnBhBGXis/RVGv5MhbeLx80Ty6cCAhXn8coBJ+iF5AsOdpk obC+vdLBw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lV5lc-002AN1-9G; Sat, 10 Apr 2021 05:02:44 +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 1lV5l1-002AJG-KG for linux-arm-kernel@desiato.infradead.org; Sat, 10 Apr 2021 05:02:10 +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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=S2eMAvnU/VPv1tOaH24j1fTs/20qgersR7UfBpgGUfc=; b=SupUm23FQaRt2prssGmo9/6Ded lrX7TCy3J7IB9vhQm0k9908pSMmZ4QjXqrmPB/uwFaRV/FUO9uPn9SJ5OhnSKqySbxE0E8e7+5WKR jtRPHt22S4at9EtHat6w98W2L5jSTOolrFsISyL+q6PxRyrY8FSk8E1lcIDvMBDDF+AR9efomxdmN 425MNum6T68RsbefMeRWIQd30nusuN8kcmliXVfUl3vPBLpSqSlUkCBn3uD+cz30/o+PjretAu7Bj nZH9LmZJIY4eFHJCHg46lnaz/5V5o5tdZoHVm9x3YNnGEJ5IX82OW+GR3d/hAAbTv4RLUilp7zaaD z6o4auCw==; Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lV5kz-004w2P-79 for linux-arm-kernel@lists.infradead.org; Sat, 10 Apr 2021 05:02:06 +0000 Received: by mail-pf1-x42e.google.com with SMTP id o123so5571102pfb.4 for <linux-arm-kernel@lists.infradead.org>; Fri, 09 Apr 2021 22:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S2eMAvnU/VPv1tOaH24j1fTs/20qgersR7UfBpgGUfc=; b=GeWCfq8v7BKxOeZLMYA4WMw4ttCARZDuEUue4sfCkBPbzNy/Y0VbbK58tw20qjz4ol YA0CgSmlDd/lLZLavVzWqr9upF621I0KZXY6aZuw1u/LwmULAoLlWpFEGm53M129TOIG 99ce6ZNEUC2SZw4QB6YP3qqBTvQzUrPnKjnoZl4VnhseUos8vIe1xswrMBPvSuc1FFUs xjySAnINzI02vCM5rJ0q+7myQi9k+4MnL+61/AAhlyehFCEJ16ji5dWOEQ5En8e+ilb3 pSnfLTQAXXxqyo8qqquv4OpGTKPmchAvQzNTo7H67emxXtzI/l8MAW282BbcOTpEEhRk pKGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S2eMAvnU/VPv1tOaH24j1fTs/20qgersR7UfBpgGUfc=; b=Vsy+JnfNqmJdp66GuvcYIznhgNT99/dcseubVFE7pL+3HKApnNdBDrwkaL3+Nj/Ver uIur93XFndx2kYXCpjxWDo7UG4E8r2pcz319tvTu3xIoxa8cXwZdzGamt3X178Zdd0Fy ISbVEKKMI/IN18OBwtfGgNeakTnvvrf+fAWITFE2buMIjN8XT5A+AJpwoESLgU30IrYE 1W8wA0eItQ09skQqVQz3vJg5LFmm0wN8Yn2PqScBjXB90jI27BZpeUE1KtNfTqKFTQ26 ZITShsjDh2hTgAGH/TjinwEq9wNOX3KuUNxm934UtG1/WecGzzKbbSydbK4Z3IKQ0bH6 Fugg== X-Gm-Message-State: AOAM531sBhJBi2aXPJscSF1PW9dmD3Rrc4VqmaRhu7SrJR4RSHCAd2yc D8gCLfQTWPy6LCWvHodCan487w== X-Google-Smtp-Source: ABdhPJzS+S0dzrXM99O8/UPWV3kxKBMLsMGFfEVyW9mZ6F+83Vt8JVXNF3v1JCkFDeEm4SwiHBCVTQ== X-Received: by 2002:a62:db43:0:b029:244:3c4c:6b90 with SMTP id f64-20020a62db430000b02902443c4c6b90mr11294634pfg.59.1618030924319; Fri, 09 Apr 2021 22:02:04 -0700 (PDT) Received: from localhost ([116.206.101.232]) by smtp.gmail.com with ESMTPSA id w1sm4232233pgh.26.2021.04.09.22.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Apr 2021 22:02:03 -0700 (PDT) From: Leo Yan <leo.yan@linaro.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, Al Grant <Al.Grant@arm.com>, John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Adrian Hunter <adrian.hunter@intel.com>, Dave Martin <Dave.Martin@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, James Clark <James.Clark@arm.com> Cc: Leo Yan <leo.yan@linaro.org> Subject: [PATCH v3 3/6] perf arm-spe: Convert event kernel time to counter value Date: Sat, 10 Apr 2021 13:00:43 +0800 Message-Id: <20210410050046.5394-4-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210410050046.5394-1-leo.yan@linaro.org> References: <20210410050046.5394-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_220205_264432_43C50C3C X-CRM114-Status: GOOD ( 16.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
perf arm-spe: Enable timestamp
|
expand
|
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index b48816d5c0b4..f66e10c62473 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -669,7 +669,7 @@ static int arm_spe_process_event(struct perf_session *session, } if (sample->time && (sample->time != (u64) -1)) - timestamp = sample->time; + timestamp = perf_time_to_tsc(sample->time, &spe->tc); else timestamp = 0;
When handle a perf event, Arm SPE decoder needs to decide if this perf event is earlier or later than the samples from Arm SPE trace data; to do comparision, it needs to use the same unit for the time. This patch converts the event kernel time to arch timer's counter value, thus it can be used to compare with counter value contained in Arm SPE Timestamp packet. Signed-off-by: Leo Yan <leo.yan@linaro.org> --- tools/perf/util/arm-spe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)