DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	david.marchand@redhat.com
Subject: Re: [PATCH] eal: provide trace point register macro for MSVC
Date: Mon, 6 Nov 2023 09:30:49 -0800	[thread overview]
Message-ID: <20231106173049.GA24529@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <2526524.4XsnlVU6TS@thomas>

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); \
> > +}
> 
> 


  reply	other threads:[~2023-11-06 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 22:47 Tyler Retzlaff
2023-11-06 16:40 ` Thomas Monjalon
2023-11-06 17:30   ` Tyler Retzlaff [this message]
2023-11-12 12:04 ` Thomas Monjalon
2024-02-12 20:51 ` [PATCH v2] eal: provide macro to allocate and name a section or segment Tyler Retzlaff
2024-02-13  8:51   ` Morten Brørup
2024-02-13 11:28     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231106173049.GA24529@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=skori@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).