From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84FD2A034E; Thu, 7 May 2020 00:48:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB8641DB66; Thu, 7 May 2020 00:48:28 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 6F0D21DB64 for ; Thu, 7 May 2020 00:48:27 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200506224826euoutp0266e2c139f3bd0aed5e87682141c4d94b~MkgIYFCa70215602156euoutp02B for ; Wed, 6 May 2020 22:48:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200506224826euoutp0266e2c139f3bd0aed5e87682141c4d94b~MkgIYFCa70215602156euoutp02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1588805306; bh=Af+9mHzPHyXOl08r+16MDN5CIWVBJUzRqTy9TATQ8EI=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=hmO6WsCM0Ae4vX3xyHCYNnKO5EpHg1vzoqyoMW2RxOviTEGI88PoGTVAcoXigsyv8 /JMrdQm7kdSf8zOUAWZm63hWIbzsyernXn9TvyI+2ShFHtmoyT2oLYIpe+L2yqtlt8 qzg/48NXGOyupZXtcHAfADvUVTjpCCYYOrgwb3W4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200506224825eucas1p1c796956fa5e8f6230a9701aacdfa8d0d~MkgHTvJy80465704657eucas1p1c; Wed, 6 May 2020 22:48:25 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 80.03.60698.9BE33BE5; Wed, 6 May 2020 23:48:25 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200506224823eucas1p1970befbdca62582acc8354f875fbd1d8~MkgGPes8h0425404254eucas1p1u; Wed, 6 May 2020 22:48:23 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200506224823eusmtrp122be22538e5be4cf11eff3401741dbb5~MkgGO5VpS2043720437eusmtrp1z; Wed, 6 May 2020 22:48:23 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-69-5eb33eb96a30 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C7.3A.07950.7BE33BE5; Wed, 6 May 2020 23:48:23 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200506224823eusmtip1e5799accaf932cd5f1ae1c55520b2401~MkgFslF5k1690516905eusmtip1k; Wed, 6 May 2020 22:48:23 +0000 (GMT) To: Dharmik Thakkar , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org, nd@arm.com From: Lukasz Wojciechowski Message-ID: Date: Thu, 7 May 2020 00:48:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200506215847.7628-1-dharmik.thakkar@arm.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01SbUhTYRjl3b2bd8PZ653hg2nB8EcWaWo/BpkViNgvNaKocHnTyxSdyq5a RoaSThkTNDPb/Mi08gNn5lIrS0lFKz9+JKmt+rcKR/bhUmbqrO1O8t95zjkPzznwUARtEAZQ 6Vm5rCaLyZSLJGTf2Or0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mAEjISHy4JQNQIS/y51sUGYgsJvGaU+PhH AcQWFgiTaF97mA2kV0RgFaPE7dN72UB6mYF6py12g5jZzygxu+MsE0gDm4CtxJGZX1lBangF 3CRetRaDmCwCKhI/1hqBmKICsRItFzVBinkFBCVOznzCAmJzCthItJx9xgxiMwuYSczb/BDK lpdo3jobyhaXuPVkPtMERqFZSNpnIWmZhaRlFpKWBYwsqxhFUkuLc9Nzi430ihNzi0vz0vWS 83M3MQLjaduxn1t2MHa9Cz7EKMDBqMTDe2DZpjgh1sSy4srcQ4wSHMxKIrw8PzbGCfGmJFZW pRblxxeV5qQWH2I0BXptIrOUaHI+MNbzSuINTQ3NLSwNzY3Njc0slMR5OwQOxggJpCeWpGan phakFsH0MXFwSjUwJqoYVhv1lH19aMGqm+v/iUl66/2VbAnejQ0Z1mHvzom1pgvo724X4+/K NuKbOOvjqhk2VVVv8r4VZ/D4654t+CW3wrU4W1E/sP8rY5GG0FO1m1tlfx0QXfR2+ZeMS+d2 TWNlY7Y7+18vyqXepuGMk4qJ2lc/D5+vteuvGJx1Xyyf027KvkGJpTgj0VCLuag4EQDqVxDV vQIAAA== X-CMS-MailID: 20200506224823eucas1p1970befbdca62582acc8354f875fbd1d8 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200506215939eucas1p1fd98a671dda83adf884c30d7bf9b77c4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200506215939eucas1p1fd98a671dda83adf884c30d7bf9b77c4 References: <20200506215847.7628-1-dharmik.thakkar@arm.com> Subject: Re: [dpdk-dev] [PATCH 1/5] app/testpmd: print clock with CPU cycles per pkt X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" W dniu 06.05.2020 o 23:58, Dharmik Thakkar pisze: > On aarch64 platforms, the cycles are counted using either a > low-resolution generic counter or a high-resolution PMU cycle counter. > Print the clock frequency along with CPU cycles/packet to identify which > cycle counter is being used. > > Signed-off-by: Dharmik Thakkar > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Phil Yang > --- > app/test-pmd/testpmd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 99bacddbfdca..9a8cbbd6fc7c 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1953,11 +1953,12 @@ fwd_stats_display(void) > "%s\n", > acc_stats_border, acc_stats_border); > #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES > +#define CYC_PER_MHZ 1E6 > if (total_recv > 0) > printf("\n CPU cycles/packet=%u (total cycles=" > - "%"PRIu64" / total RX packets=%"PRIu64")\n", > + "%"PRIu64" / total RX packets=%"PRIu64") at %lu MHz Clock\n", Please use PRIu64 instead of %lu to keep printing uint64_t portable for different hardware, OS and compilers. > (unsigned int)(fwd_cycles / total_recv), > - fwd_cycles, total_recv); > + fwd_cycles, total_recv, (uint64_t)(rte_get_tsc_hz() / CYC_PER_MHZ)); > #endif > } > -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com