qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deprecating --enable-gprof?


From: Daniel P . Berrangé
Subject: Re: Deprecating --enable-gprof?
Date: Fri, 18 Sep 2020 14:36:04 +0100
User-agent: Mutt/1.14.6 (2020-07-11)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]