From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5961EC3F68F for ; Fri, 17 Jan 2020 10:55:15 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id EAC322082F for ; Fri, 17 Jan 2020 10:55:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VY+VyYaZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAC322082F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 421361BE8A; Fri, 17 Jan 2020 11:55:14 +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 96BB02BF2; Fri, 17 Jan 2020 11:55:12 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id i11so25461771ioi.12; Fri, 17 Jan 2020 02:55:12 -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=WQ+eZyKRuUXi7p9WagrFmuYcCx+AW8I3MRgo1DLS2YE=; b=VY+VyYaZQqQ8Iu3CB/JT//M6cvMpDGtDwDUHTjVgizA7r8kZTguWRXhgVBe8OnaMmo kenNNQxuQkEHUR7MFWnI4wW69VZqd+L1zKqnQHXsvihn0QG9hHSXpR6aCRo5IbmXrR3j 6uWqaMsfMh7nzqz/eoH+52BwrgTulRwD3ylufuxOSkVe15/kUlAeUyKk8yS9KN8SPijj ROON50Gj5k+E5RueoYtkraZN0yua7Sz2on7TmTQ9Z7SNTMDP1cIoX7+PSEWc1Ab7Jqfg +1pL/hYWIOpQUdvB4MbuIXTTVFRnco57ZP0MlrE+l9u3RE3ZCyRd1c0x/IYb0T5ILL9t 3B/A== 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=WQ+eZyKRuUXi7p9WagrFmuYcCx+AW8I3MRgo1DLS2YE=; b=XxiyUr2EMFfcvsq4sqDdScSFKxvYs4HS31tm10tkNbI+ZKlj+TAym3WDnU3aPJl4yz v3Po9BV1TerNnzyrGBwIjD6wdaUlf2YapFyqiRY6hWkQ3aOTkt1QLe2cB8T7DOz9tOqQ q/Etz0AnfvGl0j4hJrp5BzHbdN5i2rXAapcKABbfwcy7MhAixhg7mFhQUxa/tJ13gUKZ duF+tE+kX700w482kHs2N6jIXF9Mb1RwucU45twE6hAWUZxt88ECRtDEJj8j0HW9waKl IdcHHgua/mOJEPlllxtMgEgpM1WuyY/GHZkDum2l9weSVkwcNdQxHz9wdWkXbi2EPTLf s0Jg== X-Gm-Message-State: APjAAAXB6Ebyz6DAYIVUR0rkx5aYkC9vPrp1bAbGcpyOzap3fXxCR+zj ppX/dHZxwGMLIOgsCuxabIpRuDPnjvDdardaaZk= X-Google-Smtp-Source: APXvYqw+duVWJNuiJoOwKMUoML26Ou/cDQknI87Q0/25gFkIB4Vsa4Dq6Nfiw1HoUq/3kdVOKShzAYqb3pR7Vx4WuDE= X-Received: by 2002:a02:c995:: with SMTP id b21mr33058975jap.112.1579258511814; Fri, 17 Jan 2020 02:55:11 -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 16:24:55 +0530 Message-ID: To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: David Marchand , 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 , 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 4:00 PM Mattias R=C3=B6nnblom wrote: > > > 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 > > This "DPDK CTF trace emitter" would make DPDK interoperate with, but > without any build-time dependencies to, LTTng. Correct? Yes. Native CTF trace emitter without LTTng dependency. > > Do you have any idea of what the performance benefits one would receive > from having something DPDK native, compared to just depending on LTTng US= T? I calibrated LTTng cost and pushed the test code to github[1]. I just started working on the DPDK native CTF emitter. I am sure it will be less than LTTng as we can leverage hugepage, exploit dpdk worker thread usage to avoid atomics and use per core variables, avoid a lot function pointers in fast-path etc I can share the exact overhead after the PoC. I think, based on the performance we can decide one or another? [1] -------------------------- 8<---------------------------------- https://github.com/jerinjacobk/lttng-overhead https://github.com/jerinjacobk/lttng-overhead/blob/master/README On high-end x86, it comes around 236 cycles/~100ns @ 2.4GHz (See the last line in the log(ZERO_ARG)) On arm64, it varies from 312 cycles to 1100 cycles(based on the class of CP= U). In short, Based on the "IPC capabilities", The cost would be around 100ns to 400ns for single void trace(a trace without any argument) -------------------------- 8<---------------------------------- > > Would this work also include moving over the DPDK trace macros to using > this new CTF trace emitter? If so, we would retain the current > printf()-style pattern, or move to a more LTTng-native like approach, > with trace event type declarations and binary-format trace events? Yes. I am planning to add tracepoints across the DPDK source code. The Fastpath stuff should be under conditional compilation. My view is to keep the printf() pattern as is. Probably we can decide the exact treatment later.