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 7D8F3A04B2; Mon, 4 May 2020 19:40:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 084911D50A; Mon, 4 May 2020 19:40:51 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 6D4231D42B for ; Mon, 4 May 2020 19:40:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588614048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VEiJv/EuGo1UEPQZQwHPgOcRkFcqdddQqteMC6p4KKo=; b=d1gz/NKt7xMwlD0N4uFKEACYISd4eVqG6cDy+64yji6CFCHflYJOH7YPM0oozb6sRMkXEA QPga8bqZJGL/iGlHOnvCfTq5JfcR84z4Spd5naHpG2OIXkCxWx16dk0EUHRHngopHquMxs gkX9j2j59fdTx5AL8Msr+tPips2jGW4= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-496-bRW1o3F7NSakk8TjuywZdA-1; Mon, 04 May 2020 13:40:47 -0400 X-MC-Unique: bRW1o3F7NSakk8TjuywZdA-1 Received: by mail-vs1-f71.google.com with SMTP id h8so151483vsq.19 for ; Mon, 04 May 2020 10:40:47 -0700 (PDT) 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=BZPRmBOXyq521DB2eSTa4WUZt4Enzm+8AtRHUcPzO0o=; b=P80GVvFrn8Y/E2Yj+NIDTIM7UImrcgY2JqmdEqfn71EQq8OjaukUY1Jggmk7JRZvdL iARhESGAIkqqkt2sW28XyOsQ/WSx1PwcgirkXK2jtokseyfMk1+zap35dM1JfaspEvnD kThETwkIhM8GxvYY4beHsRxyZf1IM7vTEsn2Nyuxv7PAfsciD+bcGvVmgFkF1aqxJmPF f1i+6cmrTQYGtcp7GyZLfIH90fVV78GyV8cpPOzd72/6Gw3xOimxrwe7fT5Hz8BGb4Ys FG+iPjBrolwwGDzQOc4aGFCbVT/8x/Ur4UM8QMhBRdYfvw9ApixzUwWQDwc/4msvwaAQ HU4g== X-Gm-Message-State: AGi0PuZg84XLKXQ8CiWCzHUDRP4MupLGkRdbHLWlN9j9gmEsMFXlklqR VOeZbUc2peanEVC2YeG/qWPIJfeozHuaJfH9ffFp/gApFLJzm3CnEJKvHFcRi7DRzGyx0XRU4Ly 6+NRbvUJEQ/9NCzytgrc= X-Received: by 2002:a1f:a844:: with SMTP id r65mr444074vke.56.1588614046541; Mon, 04 May 2020 10:40:46 -0700 (PDT) X-Google-Smtp-Source: APiQypJdVgxoWypmxVZZMqZDAmdSVIRmSCrSY9JTcv2Fowk8WvM8Q/trvPg0BCap/27EpcDYCzQTuczQb52wiJTazYk= X-Received: by 2002:a1f:a844:: with SMTP id r65mr444044vke.56.1588614046227; Mon, 04 May 2020 10:40:46 -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: David Marchand Date: Mon, 4 May 2020 19:40:35 +0200 Message-ID: To: Jerin Jacob Cc: dpdk-dev , Thomas Monjalon , Jerin Jacob , Sunil Kumar Kori , John McNamara , Marko Kovacevic , Declan Doherty , Ferruh Yigit , Andrew Rybchenko , Olivier Matz X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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:19 PM Jerin Jacob wrote: > > On Mon, May 4, 2020 at 10:38 PM David Marchand > wrote: > > > > On Mon, May 4, 2020 at 4:39 PM Jerin Jacob wrot= e: > > > > > > 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 i= n pairs. > > > > > > Merge them and let RTE_TRACE_POINT_REGISTER handle the construc= tor part. > > > > > > > > > > > > > > > Initially, I thought of doing the same. But, later I realized tha= t > > > > > this largely grows the number of constructors been called. > > > > > I had concerns about the boot time of the application and/or load= ing > > > > > the shared library, that the reason why spitting > > > > > as two so that constructor registers a burst of traces like rte_l= og. > > > > > > > > I am a bit skeptical. > > > > In terms of cycles and looking at __rte_trace_point_register() (whi= ch > > > > 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 differen= t > > > than rte_log. > > > > What is similar to rte_log? > > There is neither RTE_LOG_REGISTER macro, nor two-steps declaration of > > dynamic logtypes. > > > Here is an example of rte_log registration. Which has _one_ > constructor and N number of > rte_log_register() underneath. rte_log is one thing, rte_trace is already different. There is _no macro_ in rte_log for registration. The reason being in that a rte_log logtype is a simple integer without any special declaration requiring a macro. For tracepoints, we have a special two steps thing: the tracepoint handle must be derived from the tracepoint name. Then this handle must be registered. What I proposed is to make life easier for developers that want to add tracepoints and I suppose you noticed patch 1 of this series. > > > 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. > > > > Sorry, but I have a hard time understanding your point. > > Are you talking about application boot time? > > Yes. The optimization of application boottime time in case of static > binary and/or shared library(.so) load time. As Thomas mentioned, do you have numbers? --=20 David Marchand