From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0075.outbound.protection.outlook.com [104.47.32.75]) by dpdk.org (Postfix) with ESMTP id 187D02BA1 for ; Tue, 4 Oct 2016 12:41:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jJNiDXlXz7ujoBQuEhlx+x1NcGu1SQ9Dx/Moy8nzeKo=; b=avF6mzTNrQdiH+bQCVyYbC5OPB7huYPf+jagfHk30vEmEkLagMylXtD1bIdYmAkXE6Lcvewx16jt0THAST/9vVW8mfwq6Hvr3K4o2LVEETLWctb9x52yqdBmoJXTtvx3szpnHRAzmTh3xkLqWLrGzP8j/GdgymZTl6vQ51VRZYg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (111.92.124.249) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Tue, 4 Oct 2016 10:41:19 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob Date: Tue, 4 Oct 2016 16:10:30 +0530 Message-ID: <1475577630-14318-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.92.124.249] X-ClientProxiedBy: MA1PR01CA0069.INDPRD01.PROD.OUTLOOK.COM (10.164.116.169) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-Office365-Filtering-Correlation-Id: 7d59f63f-d27c-4ced-1fea-08d3ec42fbbc X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 2:/OL4ScaRPIJUt1H51+71011rt7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TyN2hA; 20:JXbYY7REfAXT5kn6Yw1ykOwJdNa8LRzUur8NqLp2NM3skLY1aH2Rtn7bb+pxOtUxvMlMDOV0p0h9jIWye6XWwlhV4nQ+OFI0LWLb5QegmpDifodtXOndULYX7zGK8FRr3dIuhcm45ZA9Cer3MEbAccD1IeTjeDxMPRtWQDgkyRtdwcedCPJ8l0DYkHXlh71KxkzVMpTazgC3zGhqtp8Snp/RSkdFDJgDjtrbjQkQITxxGfSSD96kmxrIqFRTlAF/++FK5scxoGvqAFz6jTMYNsfT7m9XaYKm1UIvYda/tLU2KK+5FAUH1iuOM1/C9mHhaGA56Dnf4442vjWbTLfx4QjFlgg7UGixD3fCP/7DW9Fc4qj8dyz3p/ZmHh1zlBPutj5L0BvD8YCAXuPey0mXW612wmzICU4kahIy7NlVjnJpf5ICokvmvB5eQkhQsBFbqYIGS5u85TplWyErQtKeL/BwIwl6U1jVcItAtMi9tah+f/Qg3q0dEAkUnGWZwSNwVYvY7reTosRrlAo7kqAb/htaGWPpQi56BhQC5AGhOUlvjAW1FvLhIYfzutW16ynnlUrOWs6H1v4EKUOAMZ5fAiezn9Tg4txrBhbpirzs+mk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(278428928389397)(108984395545644)(166708455590820)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 4:LJHfRnyG6/HhkwkBG4CxO0fB+mo2SXTKnFoTtqdxnDTNq3oUyzlaVXq/vXcBRShr8VpQ3TKbqSqj5E4Ql4xP9WgxqDDY+tAr/Vvf3fj6J88dpbRtQweUxDpZc37z78X7kRXQbrTBT6PcJwqE0InkrjxVeFVCrDXfOQgg9EkYCJRWxeCSHsitGYR1ncxaqHAiYnHcAcDsHDzH3KieuW6vL2Hb1vT6mIEgomTOloisisFJN7Q7/giTcIb2Y8k86Re0pGdTThjBFm5NLxAxeexx7Wl39LjXnB29z1WbkKJljdTZpYInh2a+F9A2uo06YOS0+dChrCFxZYKxYWmjBQBawc5Wel7D/gE3+zAzomdzMRJLgfZ3ayS+6GmDgnNWy4L5iN2ltcdHZnlf0Hrt0IwMZ0q4OlzWWP7vr22sZe3G92n0VY64HxWUtMvh+0b6I1a4KPLJF9QzyAX6HjwDv7+aSj2JdpHcMqL+kh1ElznHbXVym2Fgjud45xr8/8M6Hqc6M+0Me/AEmMCW+wmOVeFvIoDFHwwEmYL/ymobnPFoudw/QgRpOru2b0GqaAooLIEu X-Forefront-PRVS: 00851CA28B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(42882006)(586003)(81166006)(229853001)(15975445007)(189998001)(6116002)(3846002)(19580405001)(47776003)(2351001)(66066001)(33646002)(305945005)(97736004)(5660300001)(48376002)(50466002)(4001430100002)(4326007)(77096005)(92566002)(5009440100003)(42186005)(8676002)(81156014)(6666003)(19580395003)(7846002)(36756003)(68736007)(6916009)(101416001)(5003940100001)(50986999)(7736002)(105586002)(107886002)(2906002)(50226002)(110136003)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 23:HZ4sjpslCeoepfccvpCLzujDcY64zYDHBIJUjL+?= =?us-ascii?Q?iQLXCvCooGe/fc2j0K9LHylhbr3xzYcHpxil1RjY9fvvLuBgvbBIYOrnpli+?= =?us-ascii?Q?YnbpYxX2d2Py0brBPLL16dxErlUMom70dYk/OKI808JGdh9bpvcAioQxwnCT?= =?us-ascii?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EpbmAnLCRyUdH3fbw2ZMqCmyldIAhqjgvjLKbmX6cOUuJRBHG6O8Ce3aEfL6SlAEa8UrW2UWxq5E2QB/lkgxDsvWCmD2afDYANKe42EcsoqcMqEOB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2016 10:41:19.9708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: [dpdk-dev] [PATCH] doc: arm64: document DPDK application profiling methods X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 10:41:25 -0000 Signed-off-by: Jerin Jacob --- doc/guides/prog_guide/profile_app.rst | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/doc/guides/prog_guide/profile_app.rst b/doc/guides/prog_guide/profile_app.rst index 3226187..bb78623 100644 --- a/doc/guides/prog_guide/profile_app.rst +++ b/doc/guides/prog_guide/profile_app.rst @@ -31,6 +31,14 @@ Profile Your Application ======================== +Introduction +------------ + +The following sections describe the methods to profile DPDK applications on +different architectures. + +x86 +~~~ Intel processors provide performance counters to monitor events. Some tools provided by Intel can be used to profile and benchmark an application. See the *VTune Performance Analyzer Essentials* publication from Intel Press for more information. @@ -50,3 +58,53 @@ The main situations that should be monitored through event counters are: Refer to the `Intel Performance Analysis Guide `_ for details about application profiling. + +ARM64 +~~~~~ + +Perf +^^^^ +ARM64 architecture provide performance counters to monitor events. +The Linux perf tool can be used to profile and benchmark an application. +In addition to the standard events, perf can be used to profile arm64 specific +PMU events through raw events(-e -rXX) + +Refer to the +`ARM64 specific PMU events enumeration `_ + +High-resolution cycle counter +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The default cntvct_el0 based rte_rdtsc() provides portable means to get wall +clock counter at user space. Typically it runs at <= 100MHz. + +The alternative method to enable rte_rdtsc() for high resolution +wall clock counter is through armv8 PMU subsystem. +The PMU cycle counter runs at CPU frequency, However, access to PMU cycle +counter from user space is not enabled by default in the arm64 linux kernel. +It is possible to enable cycle counter at user space access +by configuring the PMU from the privileged mode (kernel space). + +by default rte_rdtsc() implementation uses portable cntvct_el0 scheme. +Application can choose the PMU based implementation with +CONFIG_RTE_ARM_EAL_RDTSC_USE_PMU + +The PMU based scheme useful for high accuracy performance profiling. +Find below the example steps to configure the PMU based cycle counter on an +armv8 machine. + +.. code-block:: console + + git clone https://github.com/jerinjacobk/armv8_pmu_cycle_counter_el0 + cd armv8_pmu_cycle_counter_el0 + make + sudo insmod pmu_el0_cycle_counter.ko + cd $DPDK_DIR + make config T=arm64-armv8a-linuxapp-gcc + echo "CONFIG_RTE_ARM_EAL_RDTSC_USE_PMU=y" >> build/.config + make + +.. warning:: + + This method can not be used in production systems as this may alter PMU + state used by standard Linux user space tool like perf. + -- 2.5.5