From patchwork Mon Jul 24 17:24:00 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: 27159 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 3D1742F42; Mon, 24 Jul 2017 19:24:41 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 66E4B2629 for ; Mon, 24 Jul 2017 19:24:39 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2017 10:24:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.40,408,1496127600"; d="scan'208"; a="1198838164" Received: from nntvtune144.inn.intel.com ([10.125.21.144]) by fmsmga002.fm.intel.com with ESMTP; 24 Jul 2017 10:24:09 -0700 From: ilia.kurakin@intel.com To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, konstantin.ananyev@intel.com, keith.wiles@intel.com, dmitry.galanov@intel.com, Ilia Kurakin Date: Mon, 24 Jul 2017 20:24:00 +0300 Message-Id: <1500917040-26906-1-git-send-email-ilia.kurakin@intel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] 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 Programmer's 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 --- doc/guides/prog_guide/profile_app.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/guides/prog_guide/profile_app.rst b/doc/guides/prog_guide/profile_app.rst index 54b546a..a52fd70 100644 --- a/doc/guides/prog_guide/profile_app.rst +++ b/doc/guides/prog_guide/profile_app.rst @@ -59,6 +59,40 @@ Refer to the for details about application profiling. +Profiling wasted iterations with ITT +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Iterations that yielded no RX packets (wasted loop iterations) can be analyzed +using IntelĀ® VTune\ :sup:`TM` 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 ------------------