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 8A79DA059F; Fri, 10 Apr 2020 15:29:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C787E1C23B; Fri, 10 Apr 2020 15:29:56 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 198E31C134 for ; Fri, 10 Apr 2020 15:29:55 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id w20so1753077iob.2 for ; Fri, 10 Apr 2020 06:29:55 -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=7+smY+HgEpeEeim22bOrUFtVBi8liDoCdjUazwnRV0o=; b=k9LaUvZAUGVG5r1fGD3d9GaTdEV55cHxIPgXel0SDVFPYC87w+dEACW32v+4YxiY6X /9rZduoqOk/HWMYy+Kl7wE9PVre4jTpbym8QCOoJmTQh6P4zFqn5pb5oMXv3aa8qspeT JkNElYdEfBpwst4hAsPzMw99mAy7eNKWm4P3mI9tZIuDrFwZm+84wNIbeqW/yHCKNDmN 8eUR5os83ISTvewOsKry4ttOwE2gWcgjMAdquC+xKWO2HkNV/BDxp9TuPMSGE/VgPfhz taFgGNaHdKbt0NVKrqEhljJhn1jLyeMVKx5UkgpPZdu6yTV/kCb6aFmXg/nf0MVAeTuH JWVA== 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=7+smY+HgEpeEeim22bOrUFtVBi8liDoCdjUazwnRV0o=; b=BGxGmjxRak1v+Mf3xjCUWsl/+GkrxFp59ow+ccnafD92kGI3VpF2zrpjSbremszeXJ 5X/bSyONd0WsJVCTYk1Zj0OHwnFPPWFMgPQYrp8WRbJGkpBsAni2JcpJ0tCDMP69DXIW lfmCX57LDoDlCoRWgoe79e3T6kuKHheS3vgAvGxZxF0dZHTMJhTHN4/qUwEEjyYsaqMR S/adUuurE9+BGvyrseCjlaL3YFN1j2TIwjEei8Xd4YyDygIcbJrx3x3pU79u7otFplNM AOTqfBEYvYLqtObjoqa4OmFmmmVIpCwNPfLuPH9Dh/LVmUdzMGfHmHA9U1vtCDXI4afY BIhw== X-Gm-Message-State: AGi0PuaVzTMkcgsJlgrXR2gYx5XWQGCxzRkSC8Dv4FiXl/PNW4YQH7CV 19R6DiKk/jX2vvu1aPxpNDHk/9A50xkZhiEHQA4= X-Google-Smtp-Source: APiQypITCk0/ewKnxDbxoBM2hyjTZuNvEC8Qo2KTRzPSKF0jId7GB7VfWhh5XsItEfp6DOmAxdGN4r5r5ywB98hJd84= X-Received: by 2002:a05:6602:450:: with SMTP id e16mr4158500iov.163.1586525394328; Fri, 10 Apr 2020 06:29:54 -0700 (PDT) MIME-Version: 1.0 References: <20200329144342.1543749-1-jerinj@marvell.com> <6115809.K2JlShyGXD@thomas> <14100064.JCcGWNJJiE@thomas> In-Reply-To: From: Jerin Jacob Date: Fri, 10 Apr 2020 18:59:37 +0530 Message-ID: To: David Marchand Cc: Thomas Monjalon , Jerin Jacob , dpdk-dev , "Richardson, Bruce" , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Sunil Kumar Kori , Olivier Matz Content-Type: text/plain; charset="UTF-8" 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" On Fri, Apr 10, 2020 at 6:45 PM David Marchand wrote: > > On Thu, Apr 9, 2020 at 8:27 PM Jerin Jacob wrote: > > > 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)? > > The event types can be encoded in the tracepoint names if we want to > organise trace points with types (maybe as a suffix). > > > > > 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=regex/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. > > The level notion in the traces api is artificial. > I prefer a simple api where tracepoints state is controlled via a > single criteria: with the new suggestion that would be names. > So +1. I thought it may be helpful to replace log and I decided to pick the level in the trace. Looks like the consensus is to remove "level" from Trace. OK. I will rework the Trace API to remove the "level" and rte_trace_global_* API from Trace library. Let me know If you have any other top-level architecture comments if any. I will send v5 with new changes. > > > Afaiu, for logs, if we wanted to make use of the trace api, the level > notion can be done in the rte_log layer. That works too. > > > -- > David Marchand >