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 4739CA00BE; Wed, 6 May 2020 08:11:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88A901D6F9; Wed, 6 May 2020 08:11:38 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 795461D6F1 for ; Wed, 6 May 2020 08:11:37 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id r2so659715ilo.6 for ; Tue, 05 May 2020 23:11:37 -0700 (PDT) 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=FQPRcDSKQXyN98zmdAtLlOGkG6xMo2masYC5G5ave64=; b=ZZh6dXz+Z85b9M9VH/twgYfMy01rxxjRlXqIZ2iX/o63YJHZ+nHjGX3EsAxAx64qFl n6OW/nALg9mdp+ZAu7ZPGvNu72DnQp4CkC46VHzM7Zi2OkCGQYMfX46KJQmKiHr/getX B2eJg4gbsokfZEPZwSRQXamkPHmJ8GggToU7nYzuNszfD+cvcMN46yEAYWt7+p5XIKGE xSJh/rPjcT7GA6wxAaio23LYkZWkmAPVe+u7EPfI+ZvEWf+3LrhgB7tSB/MmxwQCFpyv S3n/eq2vagJJpN6mL9mKzYnIHrBYhwltaNaWxElwqjIA5fOS9bJzFc9TZHua0VZph64D cLIA== 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=FQPRcDSKQXyN98zmdAtLlOGkG6xMo2masYC5G5ave64=; b=S8fp5dgalwrNPBgCLSE3rcCPvwDvbVQwOmk7L36baE2PcVMssx/RY112ppk1Qijoy1 PlnFvI+WBzlYohafZeqs+yNCwMh+Arq+fy/IPdA8OAGGCR9BNx2UNefx25GosmAgrvbE 0gHIzBz0uV6tpshphu+cHu+28MNbTvDS95WCpOxd289tsSkHIQ/auBBZ1rs0MKECYq9+ OVfm3qbII53Jf//gV0Acp4SwoQcmmQCrR5WjBjH5LtZPivAn3hHtjclq3zIumix4bmbw q3tfT1o9vLtyQkvnDbTmMNVAibJcic1ObDMZHqkMgeRpUJ/VY3TUIPN/GXBuikSIQUxH 97dQ== X-Gm-Message-State: AGi0PubiEJ5L22E6Mbd4AqeKnHX2dVgoJoe2uNTT8nqbq8mniYdGZwBQ 1K2TcmwFlnoBq+q1uUHveforAaKRFawMiKkJzMlduYmR X-Google-Smtp-Source: APiQypKsYOsmoVtBXVmElo6xuGJaoamiPNik3jpLtodwfF48m8+EFPnoME22cnQZuBmCMk6jG3AgT+tbb5S2Wlh64Q4= X-Received: by 2002:a92:485b:: with SMTP id v88mr7380156ila.271.1588745496615; Tue, 05 May 2020 23:11:36 -0700 (PDT) MIME-Version: 1.0 References: <20200503203135.6493-1-david.marchand@redhat.com> <1870194.PIDvDuAF1L@thomas> <4414218.rnE6jSC6OK@thomas> In-Reply-To: <4414218.rnE6jSC6OK@thomas> From: Jerin Jacob Date: Wed, 6 May 2020 11:41:20 +0530 Message-ID: To: Thomas Monjalon Cc: David Marchand , dpdk-dev , Jerin Jacob , Sunil Kumar Kori , John McNamara , Marko Kovacevic , Declan Doherty , Ferruh Yigit , Andrew Rybchenko , Olivier Matz Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 2/8] trace: simplify trace point registration 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 Wed, May 6, 2020 at 1:40 AM Thomas Monjalon wrote: > > 05/05/2020 19:28, Jerin Jacob: > > On Tue, May 5, 2020 at 10:50 PM Thomas Monjalon wrote: > > > 05/05/2020 19:09, Jerin Jacob: > > > > On Tue, May 5, 2020 at 10:38 PM Jerin Jacob wrote: > > > > > On Tue, May 5, 2020 at 10:28 PM Thomas Monjalon wrote: > > > > > > 05/05/2020 18:46, Jerin Jacob: > > > > > > > On Tue, May 5, 2020 at 9:58 PM David Marchand wrote: > > > > > > > > On Tue, May 5, 2020 at 5:25 PM Jerin Jacob wrote: > > > > > > > > > On Tue, May 5, 2020 at 5:56 PM Jerin Jacob wrote: > > > > > > > > > > On Tue, May 5, 2020 at 5:06 PM David Marchand wrote: > > > > > > > > > > > On Tue, May 5, 2020 at 12:13 PM Jerin Jacob wrote: > > > > > > > > > > > > > > Please share the data. > > > > > > > > > > > > > > > > > > > > > > > > > > Measured time between first rte_trace_point_register and last one with > > > > > > > > > > > > > a simple patch: > > > > > > > > > > > > > > > > > > > > > > > > I will try to reproduce this, once we finalize on the above synergy > > > > > > > > > > > > with rte_log. > > > > > > > > > > > > > > > > > > > > > > I took the time to provide measure but you won't take the time to look at this. > > > > > > > > > > > > > > > > > > > > I will spend time on this. I would like to test with a shared library > > > > > > > > > > also and more tracepoints. > > > > > > > > > > I was looking for an agreement on using the constructor for rte_log as > > > > > > > > > > well(Just make sure the direction is correct). > > > > > > > > > > > > > > > > > > > > Next steps: > > > > > > > > > > - I will analyze the come back on this overhead on this thread. > > > > > > > > > > > > > > > > > > I have added 500 constructors for testing the overhead with the shared > > > > > > > > > build and static build. > > > > > > > > > My results inline with your results aka negligible overhead. > > > > > > > > > > > > > > > > > > David, > > > > > > > > > Do you have plan for similar RTE_LOG_REGISTER as mentioned earlier? > > > > > > > > > I would like to have rte_log and rte_trace semantics similar to registration. > > > > > > > > > If you are not planning to submit the rte_log patch then I can send > > > > > > > > > one for RC2 cleanup. > > > > > > > > > > > > > > > > It won't be possible for me. > > > > > > > > > > > > > > I can do that if we agree on the specifics. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Relying on the current rte_log_register is buggy with shared builds, > > > > > > > > as drivers are calling rte_log_register, then impose a default level > > > > > > > > without caring about what the user passed. > > > > > > > > So if we introduce a RTE_LOG_REGISTER macro now at least this must be fixed too. > > > > > > > > > > > > > > > > What I wanted to do: > > > > > > > > - merge rte_log_register_and_pick_level() (experimental) into > > > > > > > > rte_log_register, doing this should be fine from my pov, > > > > > > > > - reconsider the relevance of a fallback logtype when registration fails, > > > > > > > > - shoot the default level per component thing: levels meaning is > > > > > > > > fragmented across the drivers/libraries because of it, but this will > > > > > > > > open a big box of stuff, > > > > > > > > > > > > > > This you are referring to internal implementation improvement. Right? > > > > > > > I was referring to remove the current clutter[1] > > > > > > > If we stick the following as the interface. Then you can do other > > > > > > > improvements when you get time > > > > > > > that won't change the consumer code or interference part. > > > > > > > > > > > > > > #define RTE_LOG_REGISTER(type, name, level) > > > > > > > > > > > > This discussion is interesting but out of scope for rte_trace. > > > > > > I am also interested in rte_log registration cleanup, > > > > > > but I know it is too much work for the last weeks of 20.05. > > > > > > > > > > > > As Olivier said about rte_trace, > > > > > > "Since it's a new API, it makes sense to make > > > > > > it as good as possible for the first version." > > > > > > > > > > > > So please let's conclude on this rte_trace patch for 20.05-rc2, > > > > > > and commit to fix rte_log registration in the first days of 20.08. > > > > > > > > > > Why not hold the trace registration patch 2/8 and apply rest for RC2. > > > > > Once we have synergy between the registration scheme between rte_log > > > > > and rte_trace > > > > > apply the patch for RC2. > > > > > > > > I meant, Once we have synergy between the registration scheme between > > > > rte_log and rte_trace > > > > apply the patch for _20.08_? > > > > > > Because of what I wrote above: > > > As Olivier said about rte_trace, > > > "Since it's a new API, it makes sense to make > > > it as good as possible for the first version." > > > > > > The intent is to show an API as simple as possible > > > in order to have a maximum of developers integrating it, > > > and getting more interesting feedbacks. > > > > > > In other words, we want to make your work shine for prime time. > > > > I like that, If it is not shining just because of 2/8 not applying now > > then I fine with that. > > Anyway, it is an experimental API, There is still room to change and > > nothing is set and stone. > > For me, the synergy between log/trace interface important as trace > > needs to replace rte_log. > > Now that I better understand what rte_trace (and tracing in general) is, > I believe rte_log cannot be replaced. > I think we can write logs in traces, as a log option, but it should be > just one possible output among others. IMO, log function can be implemented with trace. Not another way around. Functionality-wise we can replace/redirect logs are traces. At least at the registration point, semantically and syntax wise it can be similar. > > I think everybody agree to use one constructor per log type and > per trace type. > We are ready to do this change for rte_trace first. If we consider the constructor per log/trace is an improvement, I would like to do that first in rte_log and it has more consumers. And I am willing to send a patch for the following change across rte_log consumers. http://mails.dpdk.org/archives/dev/2020-May/166468.html I created the rte_trace registration mechanism similar to rte_log with community feedback on alignment and rte_trace and rte_log. I would like to maintain that. > This is your call to accept it or not, even if don't understand > why you would like both to be done at the exact same time. > >