From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 383BDC4363D for ; Tue, 22 Sep 2020 16:50:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 CDF1520738 for ; Tue, 22 Sep 2020 16:50:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IrTuqb7j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDF1520738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kVdnr5HVQvlxAmiYqck0JHXEGprXSs58Q5fAFSVHAWY=; b=IrTuqb7jakVXLK6GtmQbIIhjP PlHiSp1TzOT4bQPe0OzSnxBU08I4Qfsg4k6hAgvacsPmTAPTANigpAazU7SYWAlH5Ma+nybey9fUL pRv7GzuNshJ6DbAxj+vmvk7vciL/zufyVLbNMaCAd2Qba9dl5Jmq9KCpSg1Lmb8RehuEqSWnFQioF kugP3lbMnLwtoZoQZapWivlm3GhgvbpKqpbsdP5jTzaz1xUw3iRxryASB1B7PfN7Yq7TA2B5xZPvQ asool/ocTzxcf2E9eb33lfMzzqrJXP2FDNlYoLMs2BjTfsyE3AfEc8k9qesf+Vfj40rsxPfom67Wh YN2Vo4ziw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKlTc-0005aY-8T; Tue, 22 Sep 2020 16:49:12 +0000 Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKlTZ-0005aA-Es; Tue, 22 Sep 2020 16:49:09 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id BDC95400E9; Tue, 22 Sep 2020 13:49:06 -0300 (-03) Date: Tue, 22 Sep 2020 13:49:06 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Subject: Re: [PATCH v4 0/6] Perf tool: Support TSC for Arm64 Message-ID: <20200922164906.GA2248446@kernel.org> References: <20200914115311.2201-1-leo.yan@linaro.org> <20200922120732.GB15124@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200922120732.GB15124@leoy-ThinkPad-X240s> X-Url: http://acmel.wordpress.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ian Rogers , Remi Bernon , Andi Kleen , Mathieu Poirier , Kemeng Shi , Peter Zijlstra , Will Deacon , John Garry , Adrian Hunter , Stephane Eranian , "Gustavo A. R. Silva" , Alexander Shishkin , Ingo Molnar , Steve MacLean , linux-arm-kernel@lists.infradead.org, Nick Gasson , Namhyung Kim , Zou Wei , Jiri Olsa , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Tue, Sep 22, 2020 at 08:07:32PM +0800, Leo Yan escreveu: > Hi Arnaldo, > > On Mon, Sep 14, 2020 at 07:53:05PM +0800, Leo Yan wrote: > > This patch set is to refactor TSC implementation and move TSC code from > > x86 folder to util/tsc.c, this allows all archs to reuse the code. And > > alse move the TSC testing from x86 folder to tests so can work as a > > common testing. > > > > So far, for x86 it needs to support cap_user_time_zero and for Arm64 > > it needs to support cap_user_time_short. For architecture specific > > code, every arch only needs to implement its own rdtsc() to read out > > timer's counter. > > > > This patch set has been rebased on the perf/core branch with latest > > commit b1f815c479c1 ("perf vendor events power9: Add hv_24x7 core level > > metric events") and tested on Arm64 DB410c. > > Could you pick up this patch set? Thanks! Yeah, I picked it up now, its a pity nobody provided Acks :-\ Or have a missed them somehow? - Arnaldo > Leo > > > $ perf test list > > [...] > > 68: Convert perf time to TSC > > [...] > > > > $ perf test 68 -v > > 68: Convert perf time to TSC > > --- start --- > > test child forked, pid 10961 > > mmap size 528384B > > 1st event perf time 35715036563417 tsc 686221770989 > > rdtsc time 35715036649719 tsc 686221772647 > > 2nd event perf time 35715036660448 tsc 686221772852 > > test child finished with 0 > > ---- end ---- > > Convert perf time to TSC: Ok > > > > Changes from v3: > > * Added comments for Arm64's rdtsc() for short counter (PeterZ); > > * Rebased on latest acme/perf/core branch. > > > > Changes from v2: > > * Refactored patch set to move TSC common code to util/tsc.c (Wei/Al); > > * Moved TSC testing to perf/tests (Wei); > > * Dropped Arm SPE timestamp patch so can have clear purpose and easier > > reviewing; will send Arm SPE timestamp as separate patch. > > > > > > Leo Yan (6): > > perf tsc: Move out common functions from x86 > > perf tsc: Add rdtsc() for Arm64 > > perf tsc: Calculate timestamp with cap_user_time_short > > perf tsc: Support cap_user_time_short for event TIME_CONV > > perf tests tsc: Make tsc testing as a common testing > > perf tests tsc: Add checking helper is_supported() > > > > tools/lib/perf/include/perf/event.h | 4 + > > tools/perf/arch/arm64/util/Build | 1 + > > tools/perf/arch/arm64/util/tsc.c | 21 +++++ > > tools/perf/arch/x86/include/arch-tests.h | 1 - > > tools/perf/arch/x86/tests/Build | 1 - > > tools/perf/arch/x86/tests/arch-tests.c | 4 - > > tools/perf/arch/x86/util/tsc.c | 73 +---------------- > > tools/perf/tests/Build | 1 + > > tools/perf/tests/builtin-test.c | 5 ++ > > .../{arch/x86 => }/tests/perf-time-to-tsc.c | 13 +++ > > tools/perf/tests/tests.h | 2 + > > tools/perf/util/jitdump.c | 14 ++-- > > tools/perf/util/synthetic-events.c | 8 -- > > tools/perf/util/tsc.c | 81 +++++++++++++++++++ > > tools/perf/util/tsc.h | 5 ++ > > 15 files changed, 143 insertions(+), 91 deletions(-) > > create mode 100644 tools/perf/arch/arm64/util/tsc.c > > rename tools/perf/{arch/x86 => }/tests/perf-time-to-tsc.c (93%) > > > > -- > > 2.17.1 > > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel