Message ID | 20210519071939.1598923-3-leo.yan@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=N8cr=KO=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=-17.1 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,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 26472C433B4 for <linux-arm-kernel@archiver.kernel.org>; Wed, 19 May 2021 07:22:35 +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 AE6CC60725 for <linux-arm-kernel@archiver.kernel.org>; Wed, 19 May 2021 07:22:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE6CC60725 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=s6MjdVIQ5edfYtW5GIVcSLTnuECMhLW4Boz2fY7vVQQ=; b=TLG84wPV7zTD9Cfk1uILAZ77L qWPal44R+8qcNaZcgawrzWsYnblZUBVcgMkP9Cy9B3sAD0eyrk6L1waOfBi05RvizM5wHowSkafVv uTADCf6f2VArs09AScjFv8IbGAzc80j3mL2auFXtVFbv8FDEj1V9bnx/s7XytbLuk+4MsjGsrtYzn HCpzn9nn/1DTOYum6+F6T+xnouz8k9u6G6KxIHr7aSm5RklkKF3OwZv32YE0Gm2fD+1D2M8/zFUbl jfCu2d6ICC1qbcIoKcTs5PHplXBxQF3KuXExwRdTiT3+POs5xHEEBm9k67XlJJMnAZlz+M398/1yS UJV7Eqg2g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljGV9-0038fg-9c; Wed, 19 May 2021 07:20:19 +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 1ljGUm-0038a5-SV for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 07:19:59 +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=VF7HOk9FnOo7p3niyuc/ZeydcOUyPtyVd5u7rDmQFT0=; b=ZADFyT2ryErt0fdqV5qVxGdchR sTsk2yoS4wVqMbXvH3iiWgl0Sa5X+zrbJDQRRzwdEsg1j+6UXczSOEzc60fspAn7+XMkw2P200dDR GehBktzWuw4BhOhRM9b4kz2aDVVmtx6zc5n4eiCB5sE1a2j9joMPGHrrqMehzTAc19gAXI1z3X4HT Ub4dY5ZqCzi36oLcV0xd14BOPxj7VLXNAaVAkvFusLdQ6lee+NTjOc9X0dHsY0QvgW4zzCWC7ZNAD MhGD6sNkqWu4akAoSDXvLqYvbOeJfuLu6wlkWnmV/qINcbxwYjMiz+5rhynUYSByiB17aP11y3itT hHoi5PMw==; Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGUk-00FDIS-Dk for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 07:19:55 +0000 Received: by mail-pg1-x529.google.com with SMTP id q15so8796844pgg.12 for <linux-arm-kernel@lists.infradead.org>; Wed, 19 May 2021 00:19:54 -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=VF7HOk9FnOo7p3niyuc/ZeydcOUyPtyVd5u7rDmQFT0=; b=EM5liwyzntU9Cj0R9VZ/vTntNwcOgx+IqSmnrR+4qu+Wk0p0ypqYuTODL2r5OW+9jq FiHKDrnpQ2Nv5WEbqX7D8qHVtUg7h0qQRT7ja4Or4opgEGILz6r1Ih1tSn12ORGd3tjP mNVBoF4yHFUcANpACuFQXyA6jafxUCIpMPrNXBr8+alRZymbhzvD9gzGswmajl7qDhwG dIXe5+nLkP5ej/gxj08Nnl+oEayMo/dg0ZCDrqQyTksVlb/RudCXIztuNU+SUcFe12uX D6dueLH6R+wV8lCI93Z0nxFTWM5UMYEdvR5NdW4bc4GdhmQqeuSmoWy75TnB25WsD+C2 o/iA== 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=VF7HOk9FnOo7p3niyuc/ZeydcOUyPtyVd5u7rDmQFT0=; b=TOmYlUyvkbQseQclyi5SocwJwqdi0XN41MKNkZnoo3r56RMm6fvrp/lkyfzhcEmaLe gJOsFx8/YK6GrMhE/scrZddgtSkOCTA3sAldrg4QiISNbBKt4SDsJecoY7CfTmJJsOUu o40YDaKVqpBHN06HE3rH0tQXlJ6R/qLFP9wYaClfJcAoHGeN0Vms2quT2UUbO61pW6Zw Ft0djcPGV6sUXoaJAaPpX7Vb5HI6ut+sPu/q1kP1TDalmR8TFZGcvTyBxoRk4Xz7NUcW p8hqEfbx8YR6TcS8+fPHu0dyblEBc+djX7GIsk6wI4B7ct3avpPuSpD4wpJMHNX+BxUj Bn7w== X-Gm-Message-State: AOAM533xi0SpV5IC4XpZvd0NUE4cjj/Ap+Z/mcYWXRNtOz+6tlXRAdDl JC8/Wr6V4T5y6/4KKHg04yM3qw== X-Google-Smtp-Source: ABdhPJyWwwksCQZO2Hl+jN5SqYaQRszYdtaCccXCpevrwOSiRCdoiwIkINF5nLlC1dZqjTyS6nd9hQ== X-Received: by 2002:a63:2218:: with SMTP id i24mr9373392pgi.335.1621408793596; Wed, 19 May 2021 00:19:53 -0700 (PDT) Received: from localhost ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id 14sm13469638pfj.29.2021.05.19.00.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 00:19:53 -0700 (PDT) From: Leo Yan <leo.yan@linaro.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, James Clark <james.clark@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>, Dave Martin <Dave.Martin@arm.com>, Al Grant <Al.Grant@arm.com>, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan <leo.yan@linaro.org> Subject: [PATCH v5 2/5] perf arm-spe: Convert event kernel time to counter value Date: Wed, 19 May 2021 15:19:36 +0800 Message-Id: <20210519071939.1598923-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210519071939.1598923-1-leo.yan@linaro.org> References: <20210519071939.1598923-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-20210519_001954_481117_8BED56DA X-CRM114-Status: GOOD ( 16.68 ) 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 d2ae5a5c13ee..ff8b52e6d475 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(-)