qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, QEMU <qemu-devel@nongnu.org>
Subject: Re: Deprecating --enable-gprof?
Date: Fri, 18 Sep 2020 14:36:04 +0100	[thread overview]
Message-ID: <20200918133604.GI1628512@redhat.com> (raw)
In-Reply-To: <CAJ+F1CKSBCwWZjdUJ7Q3w5uGvM0ZLe65Vw05mm8v3t6kNLKUzg@mail.gmail.com>

On Fri, Sep 18, 2020 at 05:25:45PM +0400, Marc-André Lureau wrote:
> Hi
> 
> configure has --enable-gprof since its creation, but is it actually being
> used, or is it sporadic enough that we could deprecate it?
> 
> I have some reason to believe that it's not used much:
> - --enable-gprof only enables -p, which is prof (not gprof!)
> - nowadays there are better profiling tools, such as perf
> 
> Should we fix it to use gprof instead? Or does anyone actually care about
> it?

If we consider a future where configure is eliminated, then I think
the answer is it should be made a built-in feature of meson.

Whether we want to remove it from configure now, in anticipation
of this future day though...

> It is problematic as the flag is passed to meson globally
> (add_project_arguments), but some targets may not support it. I have
> pending patches for pc-bios/* roms. And we can't remove the flag for those
> easily (not as easily as if it was supported by meson, like coverage)

Is that just because it gets added to QEMU_CFLAGS instead of having
it own explicit config option ? If it doesn't work for some parts
of the build, then we can we just add a GPROF_CFLAGS arg and only
add it to the parts of the build where it actually works ?


> 
> I would propose to deprecate it on the configure options. A user can always
> override the cflags manually to provide -p option if he really needs it.
> Alternatively, I could work on getting support in meson (
> https://github.com/mesonbuild/meson/issues/3659), but this would bump our
> meson dependency more.

Meson has built-in support for various similar concepts such as
coverage, address sanitizer, profile guided optimization and so
on. It seems like grof fits in meson in this way.

We would not need to bump our minimum depedancy if it merely
requires a meson flag to be passed - anyone who wanted to use
it would merely install newer meson to get access to the flag.
We're not using it by default, so we don't have a need to bump
the version.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2020-09-18 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 13:25 Deprecating --enable-gprof? Marc-André Lureau
2020-09-18 13:36 ` Daniel P. Berrangé [this message]
2020-09-18 14:19 ` Peter Maydell
2020-09-18 14:27   ` Daniel P. Berrangé
2020-09-19  6:10     ` Paolo Bonzini

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=20200918133604.GI1628512@redhat.com \
    --to=berrange@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).