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 90FE0A0531; Mon, 27 Jan 2020 18:23:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A3561BFC4; Mon, 27 Jan 2020 18:23:43 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 83EBD1BFC0; Mon, 27 Jan 2020 18:23:41 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id c16so10894258ioh.6; Mon, 27 Jan 2020 09:23:41 -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; bh=v/qYwBPADWh7f8S4uxyawqTMcLF7/eVlm4yc0sXwaMY=; b=BMvgNR9JOrPWvoZ1MPR8f4ZPovOBigF6BA8Dq/IaioTjTYwkFe8JqJrK0Je4UXkc2L ESbSuOZfcFK3ba8obayz2sTAcvpd8ClMm2UgWlre1gj9oqjj94hNdPSaTPKIGoa7K6sw vT0yBn0DlRsuW0UhBvaHpw+oNjWFLBQPjqqygFaGAaJ5OHjb7J4fq4XVzoRXaMKlvY3M k/p/nidFsVhpwmzlKzYuNARPXy87yKrlW3Fdp2AiHHWd1SGCy+B6LiavxIQjLeuKfRmq 47UxWOh+6ZPxClb0aRPJmN5XrjjtDVPNC2Be9SuRJWjyjm1kQwFd+W7tkOBSA5qlXmPp ZWXA== 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; bh=v/qYwBPADWh7f8S4uxyawqTMcLF7/eVlm4yc0sXwaMY=; b=qanB/9Vrri6fRegyX/IUONzL4332lf49rDuVAvTiHKV2V7mgOdUzl/v3oc5wngRwK5 Oj0x2clGYtmF4lMSYmmhVMFfk77xwDRWkIAFpYnElZBHZcL1raNlhietk2OWEOBQsWR5 JmgFgU3jqgRSBxir5qkneh36kpL9am61mQ/ZQna9UrbnIjozRXoZkplUuyNfJD2/as1m H1qVRZWicQrRhGpKdGA4/u3+8MvOZII9T0HKnOCZrv6E7iKMLAPkpoWeTk4CME67gacR qB2caYiP/p9slX0ReGwM35MwCoNcnb1gpda7Rzyb3jWN98bXApgOjQLel+MFEhl6RHzU 3ejw== X-Gm-Message-State: APjAAAWX6+CXBkeilT4Pi3gpcuxhlk10pf8vnMkIaCDu+yqxAex/fBJg XZBM4662wqZKZfsLvt1kLril4THCUjxVruhtO4I= X-Google-Smtp-Source: APXvYqxvks8INSFn2hRFl7PTtzZABLHplC8zpkrc+w4G7hZPZW9SIoRYJ9NTCyhJwTNVoo9dgrsvkg1waN329aEtnFM= X-Received: by 2002:a5e:8e4d:: with SMTP id r13mr12469901ioo.60.1580145820598; Mon, 27 Jan 2020 09:23:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jerin Jacob Date: Mon, 27 Jan 2020 22:53:23 +0530 Message-ID: To: Aaron Conole Cc: Jerin Jacob Kollanukkaran , "dev@dpdk.org" , Thomas Monjalon , David Marchand , 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 , Bruce Richardson , 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 , Ranjit Menon , Olivier Matz , Gage Eads , Adrien Mazarguil , Nicolas Chautru , Declan Doherty , Fiona Trahe , Ashish Gupta , Erik Gabriel Carrillo , Abhinandan Gujjar , Shreyansh Jain , 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 , Gaetan Rivet , 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" 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 Mon, Jan 27, 2020 at 9:43 PM Aaron Conole wrote: > > Jerin Jacob Kollanukkaran writes: > > > Hi All, > > > > I would like to add tracing support for DPDK. > > I am planning to add this support in v20.05 release. > > > > This RFC attempts to get feedback from the community on > > > > a) Tracing Use cases. > > b) Tracing Requirements. > > b) Implementation choices. > > c) Trace format. > > > > 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 PMD. > > > > - Post trace analysis tools can provide various status across the system such > > as cpu_idle() using the timestamp added in the trace. > > > > > > Requirements: > > ------------- > > - Support for Linux, FreeBSD and Windows OS > > - Open trace format > > - Multi-platform Open source trace viewer > > - Absolute low overhead trace API for DPDK fast path tracing/debugging. > > - Dynamic enable/disable of trace events > > > > > > To enable trace support in DPDK, following items need to work out: > > > > a) Add the DPDK trace points in the DPDK source code. > > > > - This includes updating DPDK functions such as, > > rte_eth_dev_configure(), rte_eth_dev_start(), rte_eth_dev_rx_burst() to emit the trace. > > I wonder for these if it makes sense to use librte_bpf and a helper > function to actually emit events. That way rather than static trace > point data, a user can implement some C-code and pull the exact data > that they want. > > There could be some downside with the approach (because we might lose > some inlining or variable eliding), but I think it makes the trace point > concept quite a bit more powerful. Have you given it any thought? I think the reasoning for the same to have control over whether to emit the trace or not. Right? i.e only when specific conditions are met with runtime data then only emit the trace to buffer. I think, a couple of challenges would be 1) Performance in fast-path tracing 2) Need to write eBPF class for all the events that we need to trace to have control the arguments for tracing I think, once we have the base framework in C which support enable/disable the event at runtime and then we can give provision to hook eBPF program to control more runtime nature. example emit rte_eth_dev_configure() trace only when port_id == 2 and nb_rx_q == 4.