Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3164466pxv; Sun, 27 Jun 2021 21:09:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhXjR4GcNGbhG6M9uNirHglRYDd7CBlQMuq0LLIVj1RTJD2BpEL51o4quU8vop4l8RpFkq X-Received: by 2002:a05:6402:1d56:: with SMTP id dz22mr30574721edb.376.1624853389684; Sun, 27 Jun 2021 21:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624853389; cv=none; d=google.com; s=arc-20160816; b=b+Iw0khoeEHhZXQuDZBj5zu5gloXgC/+x6WJ7LY/LYiAE+MEmqSysGHwPTiLANMJ5F o8YS9fAJ5ALWV4wxk3I7S04+Ix3e99hTlsAoXnv/UbBZ4CQda4+0kdtaNz6MO4WWxE12 fpCFLa7/FgVSDzDQBxHnXj7mJbyi/b2MHb3Hq5oEWZ5csRY0/bkeyeTAXeZ9kiZ2FYpz mPDNzvNwqcfQy1iPVYCTtCGqv/wdPwU5dNIpf//RKc8vHSs3w8sWSgsdZUTA1xyPKPnW yX0X0cOjZ2oQss32x+jk21qW8n6KpJ8D0hC/tvlA4VyYTefFXDHZhh/qTgUR1qD2v3kn 6InQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UPwJ4JFkf9xbmYHm20uOVNE4kSxCHxiSpBWFcMmJsf4=; b=dFQ3DuUQGiv4rUbY1YbvZLut8DgIBwFuz/v6LbDqSDHhxI9hmM6KYilaDLfPkD5ldZ ZRqitB8JW8RLTkvzRutZQyQc6qJRLA8p3gkb6CamvA8MdTkU3oiLvsdTFzFcB8UhbEgM TLKTys0mCwJ+8d4w57mjxOMnTw7Mvx4rxQtAxP+0QI3n6uNCpDYyhUQ1TKkrt0RPf9BT 784Zi+DPAKNZggeA2Ux+E5vjwvrO+cz+KbP4Phx7J72oKjNa57F6EcR3KOeQybPG1IVn tfZQL/qf1fTcJGXdccyXOX4n5kSJBfl5SSrj8aVZOvCaQGyC8CvJxlePb1fYuDQX//On t7ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uok0jT2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a8si13382830edm.571.2021.06.27.21.09.26; Sun, 27 Jun 2021 21:09:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uok0jT2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230166AbhF1EJu (ORCPT + 99 others); Mon, 28 Jun 2021 00:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbhF1EJt (ORCPT ); Mon, 28 Jun 2021 00:09:49 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF436C061766 for ; Sun, 27 Jun 2021 21:07:23 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id b5so638113plg.2 for ; Sun, 27 Jun 2021 21:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UPwJ4JFkf9xbmYHm20uOVNE4kSxCHxiSpBWFcMmJsf4=; b=Uok0jT2pxd+MJTrzQzNU+B1Vw/1BMSfeaNwyu3DXXL5ufR2/CLXdtn57aSt/Ij+NyS v1czpL+N/SxMFG/f9g9Y79C1BQL5ZX7wtuO8pqqdNgPgZbasIgwKw9DFwf9Vu/4wDPOq 8J7Xk8e3fpcaL8HJYe9orfgkxD6X8HGcNyAV8iIkcx47v6GZZmxtLFMGZTV0baoi/WG7 pmeuXXar7yh5VrUItS2vMKrkJPMwZ+Qe/VSUk2V99UlW2GgbuvEK8sGpBhil0klRZEu9 8RagdFbFbrPm9DCbQ3lx1sySvMcq1+QCzjXQ1TeApB+Vq/xGZomy5aU2C/TI++3j7khi yaNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UPwJ4JFkf9xbmYHm20uOVNE4kSxCHxiSpBWFcMmJsf4=; b=KhH3UfXuzYxt2qTVuprIbWn2P/WVH9owpmXdlDA0TC4A2NIYX8SBqRZ+XprUkRGelL xgGnAqEAH1XMMCWIWvQzi5gC3C+Hqd0umqDjEI6uPPl/7929Mq0Bsuthj6Lf63QlvQHL HbsLv1V24I+GSYiiQcHm6mGvspLupSRTUPsqKaZxPgiDMKjnaM7xepVarR5OkUYaV0Jo uusYTslN1hTYNjwgCZEtzNoI5Ni9R7zAH0XbjVyiUIL41guJ8V8jvbAMkh4HOOK5HS5W d0CZRfAeb5dlggPRKEzNzt8j7vh829BCgddLzwCZwazawZu5j1H7fMoyxN7r8fZ/NE+R XRXQ== X-Gm-Message-State: AOAM530Hf47GYLoLgvlnoRd8ct2RVyUTgTYCaVk4TWwqFBpvPe8+y1ay nOA5BdMM1nMC2K1LTR1fdG3BjA== X-Received: by 2002:a17:90a:69e2:: with SMTP id s89mr35387821pjj.154.1624853242453; Sun, 27 Jun 2021 21:07:22 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id j3sm12654626pfe.98.2021.06.27.21.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Jun 2021 21:07:21 -0700 (PDT) Date: Mon, 28 Jun 2021 12:07:16 +0800 From: Leo Yan To: Yang Jihong Cc: john.garry@huawei.com, will@kernel.org, mathieu.poirier@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, james.clark@arm.com, andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf arm-spe: Fix incorrect sample timestamp in perf script Message-ID: <20210628040716.GC163942@leoy-ThinkPad-X240s> References: <20210626032115.16742-1-yangjihong1@huawei.com> <20210628014953.GA163942@leoy-ThinkPad-X240s> <75dac5f8-9c82-0db1-d362-44289dcaa206@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75dac5f8-9c82-0db1-d362-44289dcaa206@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 11:45:07AM +0800, Yang Jihong wrote: [...] > The timestamp does not match. Each timestamp has a difference of > 213.98296702 seconds. Is the command I executed wrong? I don't understand what's your meaning "a difference of 213.98296702 seconds". But let me give an explaination with your below examples. You could the command "perf script" outputs the timestamp 314938.859071370 which is the kernel's timestamp, if using the command "perf script -D", it outputs the value 31515284203839 which is the Arch timer's raw counter value. In theory, the arch timer's counter is enabled at the very early time before kernel's booting (e.g. bootloaders, UEFI, etc...). So for the kernel's timestamp, it should calibrate the timestamp and reduce the offset prior to the kernel's booting. I think this is the reason why you observed 213.98296702 seconds difference (if compared with your own patch?) If still see any issue, please let me know. Thanks a lot for the testing! Leo > |symbol_address|perf script| perf script -D| > |ffffb7ee2a20e100|314938.859071370|31515284203839| > |ffffb7ee29f360e0|314938.859753820|31515284272084| > |fffe85dd87e0|314938.859820430|31515284278745| > |fffe85dd7a28|314938.859941110|31515284290813| > |fffe85dd7a28|314938.859948890|31515284291591| > |fffe85dc8f58|314938.859953610|31515284292063|