public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Use mallinfo2 with glibc >= 2.33
Date: Thu, 8 Sep 2022 09:48:08 +0100	[thread overview]
Message-ID: <CACb0b4mdS4F39C0xXAXFKfPSHnSWXV6N0GRMhvC4mbySN4nKXw@mail.gmail.com> (raw)
In-Reply-To: <5d4e8613-c9f9-f63d-c739-fdd126f9e83a@gmail.com>

On Thu, 8 Sept 2022 at 06:03, François Dumont <frs.dumont@gmail.com> wrote:
>
>      libstdc++: glibc mallinfo deprecated, use mallinfo2 when version =>
> 2.33
>
>      glibc mallinfo is now deprecated resulting in make check-performance
>      failure. When glibc => 2.33 prefer mallinfo2.
>
>      libstdcxx-v3/ChangeLog:
>
>              * testsuite/util/testsuite_performance.h
> (__gnu_test::MallocInfo): New.
>              (__gnu_test::malloc_info): New, replace mallinfo on current
> platform
>              supporting it and use mallinfo2 when glibc >= 2.33.
>
> Tested under Linux x86_64.
>
> Ok to commit ?

Yes, looks good, thanks!


>
> François
>
> On 07/09/22 19:10, Jonathan Wakely wrote:
> > On Wed, 7 Sept 2022 at 18:03, François Dumont via Libstdc++
> > <libstdc++@gcc.gnu.org> wrote:
> >> libstdc++: Use glibc >= 2.33 mallinfo2 function
> >>
> >> mallinfo started to be deprecated which makes performance tests failed
> >> to build, just
> >> adopt mallinfo2.
> >>
> >> libstdcxx-v3/ChangeLog:
> >>
> >>           * testsuite/util/testsuite_performance.h (__mallinfo): New, our
> >> own mallinfo
> > There's no reason to use a reserved name here, this isn't a header
> > that users include.
> >
> > I would call the struct MallocInfo and the function malloc_info().
> > Even better, put them both in namespace __gnu_test, as
> > __gnu_test::MallocInfo and __gnu_test::malloc_info (without the extern
> > "C" language linkage). If we're not calling the glibc function
> > directly, but via our own wrapper, then there's no reason it has to
> > use the name "mallinfo", no reason it has to be in the global
> > namespace, and no reason it has to be extern "C" (in fact, I don't
> > think there was ever a reason for it to be extern "C").
> >
> >
> >
> >>           struct with just what we need. When using glibc >= 2.33 use
> >> mallinfo2 to
> >>           populate it.
> >>
> >> Tested under Linux x86_64,
> >>
> >> Ok to commit ?
> >>
> >> François
>


      reply	other threads:[~2022-09-08  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 17:02 François Dumont
2022-09-07 17:10 ` Jonathan Wakely
2022-09-08  5:03   ` François Dumont
2022-09-08  8:48     ` Jonathan Wakely [this message]

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=CACb0b4mdS4F39C0xXAXFKfPSHnSWXV6N0GRMhvC4mbySN4nKXw@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).