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 94425A04A4; Mon, 4 May 2020 16:39:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DFF01D172; Mon, 4 May 2020 16:39:25 +0200 (CEST) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id 270261D16F for ; Mon, 4 May 2020 16:39:24 +0200 (CEST) Received: by mail-il1-f193.google.com with SMTP id c16so11446136ilr.3 for ; Mon, 04 May 2020 07:39:24 -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=FA1lqQ2q+THg4J8YA5Vf8zrDPlLNrig6lEB4Sb/5IvA=; b=q969tJG2WkqnG2SdkZMJk5WbQefwxRDIc+IVPu9Hkso3Bc3N/NGlkIoJNeqxfIVgIv QDAr1ovbC2SM5aA7jBmpvRLVzlhfOIL7Yt/4bqNEqNpEMVuIbpDEkvQNy2Es8t6BVfPQ 5PQXPJFWLei8LtE/FckHr2mz6DARfUEVB03E6wGMijbJ+EJ9jqdtQhwbmjYRHc7LXxlA LHaRT2wKmyeZJt59tOnXvWtQ6H2D8v5cYoevzoiqdYe1tnwBrZvnwolbH0DY1pb4xKF/ TPISUfLuolU3s2Npb9GyG689gHLeVEBUuKrUNeZxB6Ma0VBGFJv+yo7wPFd7Ge4d9vyB 38KA== 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=FA1lqQ2q+THg4J8YA5Vf8zrDPlLNrig6lEB4Sb/5IvA=; b=nGkOQ3vLqqUh0fLjMv8m8TMclAugvQU+4ybWf16OHrIDyY4bmn2Du11EpV7Yb/73r4 DuVZEKnH/QWOcsUD6fVs4zZe8+VnvkMjb/WedCO91AzbQ78SaEl6+8bOvURs890qdKsv xeYAb7SGC1CNN5UnlsPpgXbSX/DlPPMwv7xCZMxHsJwCVY4NHyFZ4MK6NQw7taDgM1cm sDK/S9zvhgU2hzv2OevNbAkNMQD0SC8eIluwAVzACG5I91ffzKFX0b1ytJmiod7BSdXC YvaHr0GTsiM35mnWj0ALOI2DpnYENGHf19Q2oWUKvKngYhmEeeOncAHIJPUXFh3bBS4k s0pQ== X-Gm-Message-State: AGi0PuYpZlJ1vAPwlUuyDCtztCz9i3TgL9H7KtPfR2UQZl24KKNaHJvZ qqBJ+w+oBcUulFyvrR3Rlesj7p3fOjB8JRlJdpI= X-Google-Smtp-Source: APiQypJC/ejYEuDShY9MBTNquywRIlO/KNefoHwOxDU9AHNrpokxBFFJjwhrPhR3S9lxUx+2v/UpMpdoiSinxU9Da/Q= X-Received: by 2002:a92:9edb:: with SMTP id s88mr10093235ilk.294.1588603163221; Mon, 04 May 2020 07:39:23 -0700 (PDT) MIME-Version: 1.0 References: <20200503203135.6493-1-david.marchand@redhat.com> <20200503203135.6493-3-david.marchand@redhat.com> In-Reply-To: From: Jerin Jacob Date: Mon, 4 May 2020 20:09:07 +0530 Message-ID: To: David Marchand Cc: dpdk-dev , Thomas Monjalon , 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 Mon, May 4, 2020 at 7:34 PM David Marchand wrote: > > On Mon, May 4, 2020 at 4:47 AM Jerin Jacob wrote: > > > > On Mon, May 4, 2020 at 2:02 AM David Marchand wrote: > > > > > > RTE_TRACE_POINT_DEFINE and RTE_TRACE_POINT_REGISTER must come in pairs. > > > Merge them and let RTE_TRACE_POINT_REGISTER handle the constructor part. > > > > > > Initially, I thought of doing the same. But, later I realized that > > this largely grows the number of constructors been called. > > I had concerns about the boot time of the application and/or loading > > the shared library, that the reason why spitting > > as two so that constructor registers a burst of traces like rte_log. > > I am a bit skeptical. > In terms of cycles and looking at __rte_trace_point_register() (which > calls malloc), the cost of calling multiple constructors instead of > one is negligible. We will have a lot tracepoints latter, each one translates to the constructor may not be a good improvement. The scope is limited only to register function so IMO it is okay to have split just like rte_log. I don't see any reason why it has to be a different than rte_log. One of the thought process is, we probably remove the constructor scheme to all other with DPDK and replace it with a more register scheme. In such a case, we can skip calling the constructor all tother when trace is disabled. > > > -- > David Marchand >