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 DFD76A0597; Thu, 9 Apr 2020 20:27:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 480041C2BF; Thu, 9 Apr 2020 20:27:50 +0200 (CEST) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by dpdk.org (Postfix) with ESMTP id 58ED31C0AE for ; Thu, 9 Apr 2020 20:27:48 +0200 (CEST) Received: by mail-il1-f171.google.com with SMTP id p13so645940ilp.3 for ; Thu, 09 Apr 2020 11:27:48 -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:content-transfer-encoding; bh=HULMmJJI/6FcjZ1aBIru01zIP/oL5jHH8gk/AeRjLWI=; b=PWbXquQUb48G2JthJmyfT8BKM1MMnCbppY2tiWy1FPaBk96kHPMaAIbBb7e9HkKvCd jd9433ygq2kEydgmCi4Lkd0vN0qZtWP8I3Jjf8NguE9oMuiee2dTGX8z2kdT/EWs7SQW NOpDJBjRBTjqo0Dcqa4fIyOx65CeKTzaz/guIfPV/SPpxivNcrL4WjdfnwmKhgaOVyBL bcdnvNOFxmxB5k+sZTSMvooooJdkbJjCSSw8ko7pN7lU+FobEADEYp6IisPeH94RvoUT q1bKwOMNXQz9/U1pOrkc8pfrhVBOXzmbgpwZ7qomCY7JjKK+snNCP1mFAwGQNZSYNXsG O6xA== 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=HULMmJJI/6FcjZ1aBIru01zIP/oL5jHH8gk/AeRjLWI=; b=hbFSCyRozVrDoorZ4OoARJK5BQoTamLbTTmj4JKgUv5RZ0P/p1OOozgKfE/XuFnOW4 938hrnINwt3DoDmCvPqEM3KIivU2RbK+tP6xE38jcvqjVJS0llITydTr25JrG3LaRCVx S1JLOtR+93yq44k8pblOvRUXKQkhYpmSBKligA1k0J4+yRoSIOxsBq1aY/km0V4TnMJr UhrPPC0FfrRn7buHoYsIoOxNpJZeVigsO0CExNCV1qc8ycPZv1l6tiFTYfyJLM23WDuA SpahKM8uoXlQM1MkR9PeHiE6Jn+SG2D5HaNAlFm6yNXQYpfq0zUq8PhMDlGZAO1W6uEV bwsw== X-Gm-Message-State: AGi0PuYQTDAmcMFzIA/p2OPp+hwGY4BpcMox8obDvrXEoJW0yJWE+Hhf HH7ZIWm8kZOeT46XdL+pTrSTkmZIOOMTLkDYhjc= X-Google-Smtp-Source: APiQypI50wqW6mQeuJKk6w1UNM7DLf9l3HFTdmvQhlpfyMBcx1Ap8ZWDQMqCT6pAwt/9WLd9orc6IEK/o48KnjYl+dU= X-Received: by 2002:a92:2804:: with SMTP id l4mr1192125ilf.130.1586456867562; Thu, 09 Apr 2020 11:27:47 -0700 (PDT) MIME-Version: 1.0 References: <20200329144342.1543749-1-jerinj@marvell.com> <6115809.K2JlShyGXD@thomas> <14100064.JCcGWNJJiE@thomas> In-Reply-To: <14100064.JCcGWNJJiE@thomas> From: Jerin Jacob Date: Thu, 9 Apr 2020 23:57:31 +0530 Message-ID: To: Thomas Monjalon Cc: Jerin Jacob , dpdk-dev , "Richardson, Bruce" , David Marchand , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Sunil Kumar Kori , Olivier Matz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v4 00/33] 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" > > > > > > They are setting levels with regex or globbing. > > > --log-level supports 3 syntaxes today: > > > - int (global level) > > > - globbing:int > > > - regex,int > > > > Here is my understanding. > > > > IMO, Actual Syntax is > > - int (global level) > > - globbing: int (global level) > > - regex: int (global level) > > The level apply to the logs matching the pattern (globbing or regex) > so I don't understand why you call it "global". What I meant is, if there is no global, what is the point of changing the trace level with EAL command-line argument with globbing and regex. > > > i.e > > > > 1) Each log/trace has a "level" > > 2) There is a global level. See [1] > > 3) The trace will be emitted when > > a) When it is enabled(not applicable for log as it is always enabled) > > AND > > b) it is less than the global level. > > When it is less than both global and logtype level. > See rte_log_can_log(). OK. > > The global level is just disabling some logs even if it is enabled > in the logtype level. > It only makes usage complicate. > We should consider only logtype levels. OK. Do we care about the following use case? # Trace only specific types of events(example, DEBUG or CRITICAL)? IF NOT, There is no need for, # rte_trace_global_* API # No need to introduce trace type(ie DEBUG or CRITICAL) i.e remove rte_trace_level_set() API etc # In summary: ~~~~~~~~~~~~~ # In the existing code: The trace will be emitted when a) When the trace is enabled AND b) trace level than the global level. # in new suggestion The trace will be emitted when a) When it is enabled And the EAL argument will be --trace=3Dregex/globbing, This EAL argument will call rte_trace_regexp() and enable the selected tracepoints. The downside will be it will not be similar to log API. I am fine with either way. @Mattias R=C3=B6nnblom, Do you have any thoughts as you spend some time reviewing the public API. Thoughts in general?