From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1737432BB; Mon, 6 Nov 2023 18:30:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7191040633; Mon, 6 Nov 2023 18:30:51 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6E25E402D4 for ; Mon, 6 Nov 2023 18:30:50 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 89EEF20B74C0; Mon, 6 Nov 2023 09:30:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 89EEF20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1699291849; bh=8qSeiAHCSfEESiPHKUZ8Ha9mcqnic7mdehYCyr14FAY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GR0/6zPJsWwQF2QOtyPgM7Qk2o/o8FNtYVd5weJfCpFJtcInhR4qiBjye+E0YXklk avyYf+fl/uVjsUgfVJxlQowtAt0Q5T7AbIHWhpboXEQYr8XeyaALwtzWQelKIqRCS7 CUoWwhNuZ/CXMrLbhnnKa8BWG14IPNZPzVHnO7UA= Date: Mon, 6 Nov 2023 09:30:49 -0800 From: Tyler Retzlaff To: Thomas Monjalon Cc: dev@dpdk.org, Jerin Jacob , Sunil Kumar Kori , david.marchand@redhat.com Subject: Re: [PATCH] eal: provide trace point register macro for MSVC Message-ID: <20231106173049.GA24529@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1698878822-17099-1-git-send-email-roretzla@linux.microsoft.com> <2526524.4XsnlVU6TS@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2526524.4XsnlVU6TS@thomas> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Nov 06, 2023 at 05:40:12PM +0100, Thomas Monjalon wrote: > 01/11/2023 23:47, Tyler Retzlaff: > > Provide an alternate RTE_TRACE_POINT_REGISTER macro when building with > > MSVC that allocates segments for the trace point using MSVC specific > > features > > Please could you elaborate what is the improvement? well not intended to be an improvement, intended to align the msvc build with the gcc/clang builds placement of registered tracepoint in their own section. the alternate expansion for msvc is provided to place the trace point being registered in it's own section `__rte_trace_point' msvc doesn't have __attribute__(section("name")) instead as an alternate we use msvc's data_seg pragma to create and place the trace point into a named section. i.e. gcc/clang T __attribute__(section("__rte_trace_point") __##trace; msvc T __pragma(data_seg("__rte_trace_point")) __declspec(allocate("__rte_trace_point")) __##trace; > > > +#define RTE_TRACE_POINT_REGISTER(trace, name) \ > > +rte_trace_point_t \ > > +__pragma(data_seg("__rte_trace_point")) \ > > +__declspec(allocate("__rte_trace_point")) \ > > +__##trace; \ > > +static const char __##trace##_name[] = RTE_STR(name); \ > > +RTE_INIT(trace##_init) \ > > +{ \ > > + __rte_trace_point_register(&__##trace, __##trace##_name, \ > > + (void (*)(void)) trace); \ > > +} > >