From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0048.outbound.protection.outlook.com [104.47.38.48]) by dpdk.org (Postfix) with ESMTP id CD20C6CD8 for ; Wed, 5 Oct 2016 10:44:06 +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=jgpQ87wKCvp8wKpL5IzMD3iYHCrOiHfVK/ZUOz7gIkE=; b=AnBQ9y+jJGkOPK0KTJVex2U1svrOZGTAfYLTFWIXmerah2u4l/5KlEgSmvj4dh8nYYP6j3AUhB+gd1xCWJCRmxvED9p1dLJ3bpdv5ss+TORUOCsKZXbDy2YSvyK+9X83ysOoAtrGwEyg9KOB6EHJM97jK+kq5yweT3HKoRwAqZo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (111.92.120.53) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Wed, 5 Oct 2016 08:44:03 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob Date: Wed, 5 Oct 2016 14:13:29 +0530 Message-ID: <1475657009-11139-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1475577630-14318-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1475577630-14318-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.92.120.53] X-ClientProxiedBy: MA1PR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.164.116.140) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: 3627a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L8Y5iV/amqaMP7nZQAFZOk3P9PMt5SB9ML11ZxL0c6QdwxygHtvyuqk/8Ds7102+wVyO6LgGbbgiIdcLAOApmApisZeWkpxb76dLJItRK8vN063NMraTIxWPMyNIyViR62NLZorTxKjNY= 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)(10201501046)(3002001); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:g1SrFeKvwR5YGu083uwvjqtFbVAePtAcKJRPOuP1tMLI+SFZPjOhd2sA9ppItw4CrCcw0fOswtykM8SWfi6s3G5+0nyjLYbF8x2uyBaZYIagSFmFuWwKtX41sk9RRulQ5LyP2W1m3NM+GM0WzZc47OOag2aDCn5w6BUDissPSwLg3Z67T+z6+fzEruv3z5OTn02U8ixoOCJ+aLrtjrMqclkt4vUil7HHb5SdBI4S0p00bUx1Vp9EybDzg9z7OqDM0WcUZFnKUXS0W49YCJg8oBfpgLTY7Zj2ADurxoGjl1Q4v6UI8oaHu+cHcoHeBbPidAB1j71NpsL+8u3mM9XKDFLTj3tQRKlHVzFkPa5NzQAwSpnCGFNDGBbkjtDMUaNmjK/dUt627RcpmbeAf87u7ZAKV/AQ4U2u8eS5t9DrG1DRRsSsflYJUWEp6vwmvWT+nlNpe068w5Vgof0Db1BF6yNn0eneEi6pPPqvJynOWu/ZvjTEYw6F5xFNrTLJU/ncgZQ7eXakKzc81/307mvjyTNZmihqYqpa+BegSaRamcaToverzbrz3roxQEl0WVxQ X-Forefront-PRVS: 008663486A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(77096005)(6116002)(7846002)(6666003)(107886002)(7736002)(97736004)(76176999)(15975445007)(5660300001)(48376002)(50986999)(106356001)(101416001)(5009440100003)(4001430100002)(68736007)(19580395003)(50466002)(2351001)(66066001)(6916009)(189998001)(19580405001)(229853001)(47776003)(42882006)(2906002)(2950100002)(33646002)(15395725005)(36756003)(4326007)(110136003)(42186005)(305945005)(586003)(105586002)(81166006)(92566002)(50226002)(81156014)(8676002)(3846002)(5003940100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; 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; BLUPR0701MB1714; 23:9ynlPp0X/ExmlxUvZV6glsyaES4qcCkpNIPmFLT?= =?us-ascii?Q?uIp6+LXo02nwQWZmplvDytOW7GFSPN9GnI86u9MXytBh0M3ZrSdG0KsyST9B?= =?us-ascii?Q?zwTj5Qptaz2AfxUZpyHN09tsPzttS+FANP/c9Su8U3ml1QvtPxZJic4jpdJr?= =?us-ascii?Q?ctc1NL+U68dERebUz6Pf5f/Rzr8QwSN4yL9D6NRLxC/xZNEmKnuR3DRi3zJY?= =?us-ascii?Q?oGuL7x0iOYkKKMKrqU3pT5w0sTAQjEyGgwxJM+Hf7r2IpwjPnbatRD19cdSO?= =?us-ascii?Q?paHhunKSLrTVR9lXf5GT8iYNUWkiFsjfOtjF3xnyfH1wIoS4ov7D9/4fYX7R?= =?us-ascii?Q?aUheGICxeAbT8AH4QpAhKVr8BAr0vh65a37Q/CpI6kcd2/CCE05E8WzsIxQM?= =?us-ascii?Q?L/1qvSw/yiFCUEuF24sK39QR3facjcDBXCaxpAKWBjsKHYyErvakXWAQ3Sqd?= =?us-ascii?Q?DegWIAp8BEAYAgQJMJ0PlrZBgMosU7wX8JzurHx4JOwzWrm4P2c20fndLFlL?= =?us-ascii?Q?INuUwv45OYBJPjwAymgTYISIE7gwUOhD78xNRQmkcUBb7RfHtqJOgl4spvli?= =?us-ascii?Q?jRZiaZ2mWG+hv61wQ8xhVQS2bnn7dxjjA6fJH4X3MZ5RcLXx7ayTB5UCmhx7?= =?us-ascii?Q?+qDlEITzdCveelWehM6cXqv566m48GElVvhEhMWMas9enD9Ko08JfOWp7zD2?= =?us-ascii?Q?G+DCD4NVqrjvgKn80HHkWPmNQ+zDxsO+fHq7qQ7ZUTy47Axrvejt61J/0igX?= =?us-ascii?Q?6SS6m458szEVlluV1/T8yHs4NEII6MU+AYn+angqjGaKy2V+XYmJ6QPUyuBr?= =?us-ascii?Q?3PBIwDxGppRaa6l9PegLUf1KzSimKi+HQvuwg86pYn0ZO6cxpDrFzajITztG?= =?us-ascii?Q?aG+JqRwVup/ubAQA7QBnlTt4oOf412/i+6YrVMsME90YCNOzkZkDo+TRCPvb?= =?us-ascii?Q?7X5aKBq7sgPM/62CNGXPSiecUop/JKFPSElel15ZCgKchGIjZuzazGTLOlCi?= =?us-ascii?Q?6xmdfO2g3mmgPJsyXFcCVhVIRl72vtxoGlvPafaYWW7i/h/T/5CG8T2cxdgQ?= =?us-ascii?Q?TVbYCjCC3kIR/F1ZzypVTEzQZXaq2vmUqTZOzS6jJ2Z3c1dzCh+EihsvKALL?= =?us-ascii?Q?xRIkggBF50ayClH923v8wA8tp8n65qv3hMl22GMUMhB1Fi6+D3eV2Wh4/nb6?= =?us-ascii?Q?wm2buiZQ7/9ofRu+wAxeASxgYKSKMboFevMFR599mKVrZjpaGxLteK8+U8+w?= =?us-ascii?Q?/LthRMK/SkRGgu2YOyQ+R0Yo0b96ljnG+wcyR5cfDz0gjxcEQvBoIp7p9Y7W?= =?us-ascii?Q?qIg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 6:MBkPI1oB1K5qNvqs+rYAKz3JhR5LVmdOYJtDU2YoLC5fRMj/fvZTyIKF6ImueNaNRAPnaaW/SsLsjIrBJT7VrVmhyDyi1zmsYU6TP+HnwiMyKJ+BtKOL7LrnIpQ2+OhZaFFd+TmXJl1uGUJBDTsLwl5qo+SCi2jiR6t8acZZ6hdmej/qWLP5CN8GGqCwNlZ55Y73k/UfkUIfjqsbaoCQX0WV5KBPgB8B1X2dx/QL7rLTXCwquWIDlXxz4UsmVczl4txUhz7B6vPJwBuxreEKqOznzpSIF42XGVyA6CX2T3o=; 5:YfRZJxaGQMgzpjL0bvpdG5mG3p3slnoFr//D58+W0FFCt6jOmTcImg09jFMoxl3fYmJt7IO5gjdv/IbAvlf2H+91iFo/HBiOZmzAo/bAf7Idz8t0WxUKfrlQ6P8akJmjXD9qhOoA+57vbtUTP8UQZw==; 24:ihVvtUAwThfA/FUG0vUT3ryFLZHzgR1tQRfyaZeGa6vyAHGHxWpIFtm14AqF/roZrGHa6qvgAB+DuuWmp3A2w4iMmX0Wvk1yppbKh/FWn5Q=; 7:d+26wwIWOBSM9Unx6OnZ2+n20D82HU/BwWgAeT/bb1CZ3Qm6M3CyLKZ4WfFrDAn6gPXSETZBva3ATooOsi0AteZw1kwWFOptzeaps6WAXVK/VZhU7f3z5pXhbOES5VRf45k/MoWI8fGweYmAenY/ci35N26cJSuvbQ01nGsYo9EmxWkk93Pof0EOHD7fVMFlMXKRL1aY+Ulv+AOelIvAFvbyIGrIedDvW97YTDpShgGMiShIWiyCvslnyO3wBi7kAqBW0TbV3IjzU1Y99tFMxDXR/wkYuLsFBHaQf6BOw9Tnp9KgGnpMVwpBSC2qZPCe SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2016 08:44:03.2640 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: [dpdk-dev] [PATCH v2] 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: Wed, 05 Oct 2016 08:44:07 -0000 Signed-off-by: Jerin Jacob --- v2: -Addressed ARM64 specific review comments(Suggested by Thomas) http://dpdk.org/dev/patchwork/patch/16362/ --- 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..9f1b7ee 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 + +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:: + + The PMU based scheme is useful for high accuracy performance profiling with + rte_rdtsc(). However, This method can not be used in conjunction with Linux + userspace profiling tools like perf as this scheme alters the PMU registers + state. -- 2.5.5