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 48577A051A; Fri, 17 Jan 2020 10:52:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A4521D419; Fri, 17 Jan 2020 10:52:24 +0100 (CET) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 14D9E1D412; Fri, 17 Jan 2020 10:52:22 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id k24so25298153ioc.4; Fri, 17 Jan 2020 01:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SgvgP94j+9boKrW7ez834nCx+THEXU+sUVqhrvGdrlI=; b=PX5GhXyMC4Zim0xpoVPCa686kaUC4rdM1DSj1op7ghC6EP5VWUJ/ivWVDn1MgNeDof k/KnDcY/7xbLEme5qchShQGHvEXEdQttQrq3JunJQ2qvbLuxFle5W+ENWcK13caXzDa6 DlFP3yvkdjyDc0WwBixcDyj/iO9hJ4REWt0g1UQ0UcLGdg/EAcfTw5IXph82wqQ+ov4g uiVWBZKyUW6GecHp2J2GQ1tasiHSkNubwjgivAn08tn9mDcffki7Rg9j8/EPLD/PEBgP /DYNbquco2gtfzAJOkhKsh2qo9/kZOG6iYZ7FT6Q6Me2060bg6IP9YIb4bRKoGERzixH Ta3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SgvgP94j+9boKrW7ez834nCx+THEXU+sUVqhrvGdrlI=; b=FpKdI4580l0DRKJOcpgkVofVlZNhpiuUk+Vb28LUeJMvyPdH2nohh1gK5EyCR9xN78 qr6SU9sEMpR+YEjMtw0Jmfj5tq31Ngd4FzE7Q1P5P4K2qOAc31h7CfATo8GzhH7mhLr6 4uqroc8C0Lk6BKaOUuZDS/L0nD7nsHGOEEzJ8xCPThpw/UQr8iyJ7WuXXfzNM5l5ozcc LVttFxx6u64W95lT3lzt02r6tYsY/vOVrfvDPwQ3+Gscu0t6mPdd5zUL1GukSDstlw3P jBDElEgXOrLzl5oDMwCfQFNbxAPwmF4kqIuJVQ/dwgxsPsDoqjX+LzKXFnOQ9uzTPESf 0dRw== X-Gm-Message-State: APjAAAWnJa91cRrR57IJucLHx6BgU6mjG/eJEo4UvQZ53LWHe6NXgNLY SJvvYR0rrG8TX2DUjZVbjc0qEs8efRRCIAowvH0= X-Google-Smtp-Source: APXvYqwLmqPKqncF56jkPzlLSiucbqTBOQ0z2B/avKCAYRvGdphZ5E7Lsecxz7ySwJTEG5RDDVtcveJB1fwOlYnwnwY= X-Received: by 2002:a5d:8cce:: with SMTP id k14mr31632314iot.294.1579254741254; Fri, 17 Jan 2020 01:52:21 -0800 (PST) MIME-Version: 1.0 References: <20200113130543.GC1645@bricha3-MOBL.ger.corp.intel.com> <20200113145823.GD1645@bricha3-MOBL.ger.corp.intel.com> <20200113161259.GE1645@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: From: Jerin Jacob Date: Fri, 17 Jan 2020 15:22:05 +0530 Message-ID: To: David Marchand Cc: Bruce Richardson , Jerin Jacob Kollanukkaran , "dev@dpdk.org" , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ajit Khaparde , Qi Zhang , Xiaolong Ye , Raslan Darawsheh , Maxime Coquelin , Tiwei Bie , Akhil Goyal , Luca Boccassi , Kevin Traynor , "maintainers@dpdk.org" , John McNamara , Marko Kovacevic , Ray Kinsella , Aaron Conole , Michael Santana , Harry van Haaren , Cristian Dumitrescu , Phil Yang , Joyce Kong , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Jan Viktorin , Gavin Hu , David Christensen , Konstantin Ananyev , Anatoly Burakov , Harini Ramakrishnan , Omar Cardona , Anand Rawat , Olivier Matz , Gage Eads , Adrien Mazarguil , Nicolas Chautru , Declan Doherty , Fiona Trahe , Ashish Gupta , Erik Gabriel Carrillo , Abhinandan Gujjar , Hemant Agrawal , "Artem V. Andreev" , Nithin Kumar Dabilpuram , Vamsi Krishna Attunuru , Rosen Xu , Sachin Saxena , Stephen Hemminger , Chas Williams , "John W. Linville" , Prasun Kapoor , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , Ravi Kumar , Igor Russkikh , Pavel Belous , Shepard Siegel , Ed Czeck , John Miller , Somnath Kotur , Maciej Czekaj , Shijith Thotton , Srisivasubramanian Srinivasan , Rahul Lakkireddy , John Daley , Hyong Youb Kim , "Wei Hu (Xavier" , "Min Hu (Connor" , Yisen Zhuang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Beilei Xing , Xiao Wang , Jingjing Wu , Wenzhuo Lu , Qiming Yang , Tomasz Duszynski , Liron Himi , Zyta Szpak , Kiran Kumar Kokkilagadda , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , "K. Y. Srinivasan" , Haiyang Zhang , Jan Remes , Heinrich Kuhn , Jan Gutter , Gagandeep Singh , Rasesh Mody , Shahed Shaikh , Yong Wang , Zhihong Wang , Steven Webster , Matt Peters , Keith Wiles , Tetsuya Mukawa , Jasvinder Singh , Jakub Grajciar , Ruifeng Wang , Anoob Joseph , Fan Zhang , Pablo de Lara , John Griffin , Deepak Kumar Jain , Michael Shamis , Nagadheeraj Rottela , Srikanth Jampala , Ankur Dwivedi , Jay Zhou , Lee Daly , Sunila Sahu , Nipun Gupta , Liang Ma , Peter Mccarthy , Tianfei zhang , Satha Koteswara Rao Kottidi , Xiaoyun Li , Bernard Iremonger , Vladimir Medvedkin , David Hunt , Reshma Pattan , Byron Marohn , Sameh Gobriel , Yipeng Wang , Honnappa Nagarahalli , Robert Sanford , Kevin Laatz , Maryam Tahhan , Ori Kam , Radu Nicolau , Tomasz Kantecki , Sunil Kumar Kori , Pavan Nikhilesh Bhagavatula , Kirill Rybalchenko , "Kadam, Pallavi" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [RFC] DPDK Trace support 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" On Fri, Jan 17, 2020 at 1:35 PM David Marchand wrote: > > On Fri, Jan 17, 2020 at 5:41 AM Jerin Jacob wrote= : > > > > > > > > > > > > > > Yes this is when trace is enabled. If the trace is disabled the= n it > > > > > > will be the only a handful of cycles. > > > > > > > > > > > Two follow-on questions: > > > > > 1. Is the trace enable/disable dynamic at runtime? > > > > > > > > Yes. See the requirement section. > > > > > > > > > 2. Have you investigated how low the "handful of cycles" actually= is? > > > > > > > > Yes. it is around 1 to 3 cycles based on the arch. it boils down to > > > > mostly a branch hit/miss on a memory location > > > > embedded in a C macro. > > > > > > > That seems impressively low, which is great news! > > > > Does anyone have an objection to have > > 1) Use CTF as trace format to reuse the opensource tracing tools and > > compatibility wth LTTng > > https://diamon.org/ctf/ > > 2) Have native DPDK CTF trace emitter for better performance for DPDK > > fast path tracing and Non-Linux support. > > > > I would like to avoid the situation where once code gets completed and > > then starts our basic discussion > > on the design decisions. > > > > If someone needs more time to think through or any clarification is > > required then please discuss. > > I did not find the time to look at this. > Some quick questions: > - is LTTng coming with out-of-tree kmod? making it hard to support in > distributions? LTTng kernel tracing only needs kmod support. For the userspace tracing at minium following libraries are required. a) LTTng-UST b) LTTng-tools c) liburcu d) libpopt-dev Based on the https://lttng.org/docs/v2.11/#doc-installing-lttng -------------------------- 8<---------------------------------- Important:As of 22 October 2019, LTTng 2.11 is not available as distribution packages, except for Arch Linux. You can build LTTng 2.11 from source to install and use it. -------------------------- >8---------------------------------- > - I have been playing with perf those days to track live processes and > gathering informations/stats at key point of a dpdk app without adding > anything in the binary. What does LTTng provide that scripting around > perf would not solve? Profiler and Tracer are two different things: Perf is a profiler. Definitions from https://lttng.org/docs/v2.11/#doc-what-is-tracing -------------------------- 8<---------------------------------- A profiler is often the tool of choice to identify performance bottlenecks. Profiling is suitable to identify where performance is lost in a given software. The profiler outputs a profile, a statistical summary of observed events, which you may use to discover which functions took the most time to execute. However, a profiler won=E2=80=99t report why some identified functions are the bottleneck. Bottlenecks might only occur when specific conditions are met, conditions that are sometimes impossible to capture by a statistical profiler, or impossible to reproduce with an application altered by the overhead of an event-based profiler. For a thorough investigation of software performance issues, a history of execution is essential, with the recorded values of variables and context fields you choose, and with as little influence as possible on the instrumented software. This is where tracing comes in handy. Tracing is a technique used to understand what goes on in a running software system. The software used for tracing is called a tracer, which is conceptually similar to a tape recorder. When recording, specific instrumentation points placed in the software source code generate events that are saved on a giant tape: a trace file. You can trace user applications and the operating system at the same time, opening the possibility of resolving a wide range of problems that would otherwise be extremely challenging. -------------------------- >8---------------------------------- Once tracing infrastructure is in place, we can add tracepoints in the dpdk functions such as rte_eth_dev_configure(), rx_burst, etc so that one can trace the flow of the program and debug. The use case details from the RFC: -------------------------- 8<---------------------------------- Use-cases --------- - Most of the cases, The DPDK provider will not have access to the DPDK customer applications. To debug/analyze the slow path and fast path DPDK API usage from the field, we need to have integrated trace support in DPDK. - Need a low overhead Fast path multi-core PMD driver debugging/analysis infrastructure in DPDK to fix the functional and performance issue(s) of PM= D. - Post trace analysis tools can provide various status across the system su= ch as cpu_idle() using the timestamp added in the trace. -------------------------- >8---------------------------------- Here is more details on viewing Traces using Trace compass(An opensource CTF trace viewer) https://www.renesas.com/cn/zh/doc/products/tool/doc/014/r20ut4479ej0000-ltt= ng.pdf > > > -- > David Marchand >