On Tue, Jul 22, 2025 at 11:13 PM Gerald Pfeifer <ger...@pfeifer.com> wrote: > > On Tue, 15 Jul 2025, H.J. Lu wrote: > >> This feels a bit complex to parse. How about something like > >> > >> + <li>The new <code>--enable-x86-64-mfentry</code> configure option > >> + makes <code>-mfentry</code> use <code>__fentry__</code> instead > >> + of <code>mcount</code> for profiling on x86-64. This option is > >> + enabled by default for glibc targets. > >> + </li> > >> > >> This replaces "option is added to enable" by "new option makes", fixes > >> grammar/word order and drops what feels like an extra "by default". > > -mfentry is the option to enable __fentry__. How about this v3 patch? > > Sorry, I've been thinking about this multiple times. > > Maybe I misunderstand? Configured with --enable-x86-64-mfentry, GCC will > always use __fentry__ when -mfentry is used, and mcount otherwise?
No. --enable-x86-64-mfentry will make -mfentry, which replaces mcount with __fentry__, as the default. > This is what (I think) my suggestion above describes. > > > The way I read your patch > > + <li>The new <code>--enable-x86-64-mfentry</code> configure option > + enables <code>-mfentry</code> automatically to use > + <code>__fentry__</code>, instead of <code>mcount</code>, for > + profiling on x86-64. This option is enabled by default for > + glibc targets. > + </li> > > -mfentry *may* use __fentry__, but doesn't have to. No. > > > If indeed I misunderstood, please go ahead an push your patch. Just drop > "automatically" which I believe is superflous (and grammatically at the > wrong place, should be directly before a verb - either "enables" or > "use".) > > Gerald How about this? diff --git a/htdocs/gcc-16/changes.html b/htdocs/gcc-16/changes.html index cc6fe204..83091a85 100644 --- a/htdocs/gcc-16/changes.html +++ b/htdocs/gcc-16/changes.html @@ -118,6 +118,12 @@ for general information.</p> <!-- <h3 id="x86">IA-32/x86-64</h3> --> + <li>The new <code>--enable-x86-64-mfentry</code> configure option + enables <code>-mfentry</code> which uses <code>__fentry__</code>, + instead of <code>mcount</code>, for profiling on x86-64. This + option is enabled by default for glibc targets. + </li> + <h3 id="amdgcn">AMD GPU (GCN)</h3> <ul> -- H.J.