From patchwork Wed Jul 26 15:20:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: ilia.kurakin@intel.com X-Patchwork-Id: 27220 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 996647CF8; Wed, 26 Jul 2017 17:20:17 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1222C7CF6 for ; Wed, 26 Jul 2017 17:20:14 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2017 08:20:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,416,1496127600"; d="scan'208";a="129736389" Received: from unknown (HELO 10.125.21.77) ([10.125.21.77]) by orsmga005.jf.intel.com with ESMTP; 26 Jul 2017 08:20:11 -0700 From: ilia.kurakin@intel.com To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, john.mcnamara@intel.com, dmitry.galanov@intel.com, Ilia Kurakin Date: Wed, 26 Jul 2017 18:20:08 +0300 Message-Id: <20170726152008.14341-1-ilia.kurakin@intel.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <1500917040-26906-1-git-send-email-ilia.kurakin@intel.com> References: <1500917040-26906-1-git-send-email-ilia.kurakin@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2] doc: add how to enable empty cycles profiling 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" From: Ilia Kurakin Programmers Guide: section "Profile Your Application" updated with how to enable ITT tasks collection. Based on patch: http://dpdk.org/dev/patchwork/patch/27158/ Signed-off-by: Ilia Kurakin Acked-by: John McNamara --- -V2 change: Fixes due to review doc/guides/prog_guide/profile_app.rst | 37 ++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/profile_app.rst b/doc/guides/prog_guide/profile_app.rst index 54b546a..f1d6eeb 100644 --- a/doc/guides/prog_guide/profile_app.rst +++ b/doc/guides/prog_guide/profile_app.rst @@ -39,7 +39,8 @@ Profiling on x86 ---------------- Intel processors provide performance counters to monitor events. -Some tools provided by Intel, such as VTune, can be used to profile and benchmark an application. +Some tools provided by Intel, such as Intel® VTune™ Amplifier, can be used +to profile and benchmark an application. See the *VTune Performance Analyzer Essentials* publication from Intel Press for more information. For a DPDK application, this can be done in a Linux* application environment only. @@ -59,6 +60,40 @@ Refer to the for details about application profiling. +VTune ITT +~~~~~~~~~ + +Iterations that yielded no RX packets (wasted loop iterations) can be analyzed +using VTune Amplifier. This profiling employs the +`Instrumentation and Tracing Technology (ITT) API +`_ +feature of VTune Amplifier and requires only reconfiguring the DPDK library, +no changes in a DPDK application are needed. + +To trace wasted iterations on RX queues, first reconfigure DPDK with +``CONFIG_RTE_ETHDEV_RXTX_CALLBACKS`` and +``CONFIG_RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS`` enabled. + +Then rebuild DPDK, specifying paths to the ITT header and library, which can +be found in any VTune Amplifier distribution in the *include* and *lib* +directories respectively: + +.. code-block:: console + + make EXTRA_CFLAGS=-I \ + EXTRA_LDLIBS="-L -littnotify" + +Finally, to see wasted iterations in your performance analysis results, +select the *"Analyze user tasks, events, and counters"* checkbox in the +*"Analysis Type"* tab when configuring analysis via VTune Amplifier GUI. +Alternatively, when running VTune Amplifier via command line, specify +``-knob enable-user-tasks=true`` option. + +Collected regions of wasted iterations will be marked on VTune Amplifier's +timeline as ITT tasks. These ITT tasks have predefined names, containing +Ethernet device and RX queue identifiers. + + Profiling on ARM64 ------------------