Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-27 Thread Sam James

Alexe Stefan  writes:

> So it's only useful for developers that already use valgrind.

Why would it be useful to anybody else? It can be useful if you suspect
you may want to use Valgrind with system packages at some point and you
don't want then to recompile, sure.

I'm not sure if I understand your point. What perspective are you asking
from?

I wouldn't expect users who don't know what Valgrind is to set this.


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-27 Thread Alexe Stefan
So it's only useful for developers that already use valgrind.

sâm., 27 mai 2023, 17:13 Sam James  a scris:

>
> Alexe Stefan  writes:
>
> > In that case, is it worth it to enable USE=valgrind globally?
>
> I have, and I'd say others interested in using Valgrind should too.
>
>
>


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-27 Thread Sam James

Alexe Stefan  writes:

> In that case, is it worth it to enable USE=valgrind globally?

I have, and I'd say others interested in using Valgrind should too.




signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-27 Thread Alexe Stefan
In that case, is it worth it to enable USE=valgrind globally?

vin., 26 mai 2023, 10:44 Sam James  a scris:

>
> Sam James  writes:
>
> > [[PGP Signed Part:Undecided]]
> >
> > Sam James  writes:
> >
> >> Alexe Stefan  writes:
> >>
> >>> Does enabling USE=valgrind impact runtime performance in any way?
> >>
> >> A very small amount because it adds a check at runtime for whether
> >> the application is running under Valgrind. The compiler may be able
> >> to optimise this a bit if it can determine it's unlikely (if the
> >> Valgrind headers don't already do this, they should probably mark
> >> them as cold functions).
> >
> > Sorry, I should say, they're hot functions but the if()s for them
> > should be unlikely()'d.
>
> Alexander Monakov reached out and pointed out this isn't right - they're
> actually branchless and just encoded in nops, so there's really
> essentially no runtime cost.
>
>
>


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-26 Thread Sam James

Sam James  writes:

> [[PGP Signed Part:Undecided]]
>
> Sam James  writes:
>
>> Alexe Stefan  writes:
>>
>>> Does enabling USE=valgrind impact runtime performance in any way?
>>
>> A very small amount because it adds a check at runtime for whether
>> the application is running under Valgrind. The compiler may be able
>> to optimise this a bit if it can determine it's unlikely (if the
>> Valgrind headers don't already do this, they should probably mark
>> them as cold functions).
>
> Sorry, I should say, they're hot functions but the if()s for them
> should be unlikely()'d.

Alexander Monakov reached out and pointed out this isn't right - they're
actually branchless and just encoded in nops, so there's really
essentially no runtime cost.




signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-14 Thread Sam James

Sam James  writes:

> Alexe Stefan  writes:
>
>> Does enabling USE=valgrind impact runtime performance in any way?
>
> A very small amount because it adds a check at runtime for whether
> the application is running under Valgrind. The compiler may be able
> to optimise this a bit if it can determine it's unlikely (if the
> Valgrind headers don't already do this, they should probably mark
> them as cold functions).

Sorry, I should say, they're hot functions but the if()s for them
should be unlikely()'d.




signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-14 Thread Sam James

Alexe Stefan  writes:

> Does enabling USE=valgrind impact runtime performance in any way?

A very small amount because it adds a check at runtime for whether
the application is running under Valgrind. The compiler may be able
to optimise this a bit if it can determine it's unlikely (if the
Valgrind headers don't already do this, they should probably mark
them as cold functions).

The aim of this change is to be able to have USE=valgrind in make.conf
if you're an active user of it and have things work better, so it
should be fine to do.


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-14 Thread Alexe Stefan
Does enabling USE=valgrind impact runtime performance in any way?

dum., 14 mai 2023, 19:46 Arsen Arsenović  a scris:

>
> Sam James  writes:
>
> > This always has the same meaning in packages - build in annotations to
> help
> > with e.g. custom memory allocators to reduce noise and improve
> Valgrind's accuracy.
> >
> > All invalid uses of this were already fixed (cases where it was used to
> control
> > running the testsuite under Valgrind which we don't want to do, it's too
> flaky
> > under sandbox & not reliable with diff arches.)
>
> LGTM.  thanks!
>
> > Signed-off-by: Sam James 
> > ---
> >  profiles/use.desc | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/profiles/use.desc b/profiles/use.desc
> > index 04ca8e845ccd9..675fd291fee22 100644
> > --- a/profiles/use.desc
> > +++ b/profiles/use.desc
> > @@ -1,4 +1,4 @@
> > -# Copyright 1999-2022 Gentoo Authors
> > +# Copyright 1999-2023 Gentoo Authors
> >  # Distributed under the terms of the GNU General Public License v2
> >
> >  # Keep them sorted
> > @@ -333,6 +333,7 @@ usb - Add USB support to applications that have
> optional USB support (e.g. cups)
> >  v4l - Enable support for video4linux (using linux-headers or userspace
> libv4l libraries)
> >  vaapi - Enable Video Acceleration API for hardware decoding
> >  vala - Enable bindings for dev-lang/vala
> > +valgrind - Enable annotations for accuracy. May slow down runtime
> > slightly. Safe to use even if not currently using dev-util/valgrind
> >  vanilla - Do not add extra patches which change default behaviour; DO
> NOT USE
> > THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically
> >  vcd - Video CD support
> >  vdpau - Enable the Video Decode and Presentation API for Unix
> acceleration interface
>
>
> --
> Arsen Arsenović
>


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-14 Thread Arsen Arsenović

Sam James  writes:

> This always has the same meaning in packages - build in annotations to help
> with e.g. custom memory allocators to reduce noise and improve Valgrind's 
> accuracy.
>
> All invalid uses of this were already fixed (cases where it was used to 
> control
> running the testsuite under Valgrind which we don't want to do, it's too flaky
> under sandbox & not reliable with diff arches.)

LGTM.  thanks!

> Signed-off-by: Sam James 
> ---
>  profiles/use.desc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/profiles/use.desc b/profiles/use.desc
> index 04ca8e845ccd9..675fd291fee22 100644
> --- a/profiles/use.desc
> +++ b/profiles/use.desc
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2022 Gentoo Authors
> +# Copyright 1999-2023 Gentoo Authors
>  # Distributed under the terms of the GNU General Public License v2
>  
>  # Keep them sorted
> @@ -333,6 +333,7 @@ usb - Add USB support to applications that have optional 
> USB support (e.g. cups)
>  v4l - Enable support for video4linux (using linux-headers or userspace 
> libv4l libraries)
>  vaapi - Enable Video Acceleration API for hardware decoding
>  vala - Enable bindings for dev-lang/vala
> +valgrind - Enable annotations for accuracy. May slow down runtime
> slightly. Safe to use even if not currently using dev-util/valgrind
>  vanilla - Do not add extra patches which change default behaviour; DO NOT USE
> THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically
>  vcd - Video CD support
>  vdpau - Enable the Video Decode and Presentation API for Unix acceleration 
> interface


-- 
Arsen Arsenović


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-14 Thread David Seifert
On Sun, 2023-05-14 at 09:26 +0100, Sam James wrote:
> This always has the same meaning in packages - build in annotations to
> help
> with e.g. custom memory allocators to reduce noise and improve
> Valgrind's accuracy.
> 
> All invalid uses of this were already fixed (cases where it was used
> to control
> running the testsuite under Valgrind which we don't want to do, it's
> too flaky
> under sandbox & not reliable with diff arches.)
> 
> Signed-off-by: Sam James 
> ---
>  profiles/use.desc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/profiles/use.desc b/profiles/use.desc
> index 04ca8e845ccd9..675fd291fee22 100644
> --- a/profiles/use.desc
> +++ b/profiles/use.desc
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2022 Gentoo Authors
> +# Copyright 1999-2023 Gentoo Authors
>  # Distributed under the terms of the GNU General Public License v2
>  
>  # Keep them sorted
> @@ -333,6 +333,7 @@ usb - Add USB support to applications that have
> optional USB support (e.g. cups)
>  v4l - Enable support for video4linux (using linux-headers or
> userspace libv4l libraries)
>  vaapi - Enable Video Acceleration API for hardware decoding
>  vala - Enable bindings for dev-lang/vala
> +valgrind - Enable annotations for accuracy. May slow down runtime
> slightly. Safe to use even if not currently using dev-util/valgrind
>  vanilla - Do not add extra patches which change default behaviour; DO
> NOT USE THIS ON A GLOBAL SCALE as the severity of the meaning changes
> drastically
>  vcd - Video CD support
>  vdpau - Enable the Video Decode and Presentation API for Unix
> acceleration interface

yes please, lgtm



[gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag

2023-05-14 Thread Sam James
This always has the same meaning in packages - build in annotations to help
with e.g. custom memory allocators to reduce noise and improve Valgrind's 
accuracy.

All invalid uses of this were already fixed (cases where it was used to control
running the testsuite under Valgrind which we don't want to do, it's too flaky
under sandbox & not reliable with diff arches.)

Signed-off-by: Sam James 
---
 profiles/use.desc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/profiles/use.desc b/profiles/use.desc
index 04ca8e845ccd9..675fd291fee22 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Keep them sorted
@@ -333,6 +333,7 @@ usb - Add USB support to applications that have optional 
USB support (e.g. cups)
 v4l - Enable support for video4linux (using linux-headers or userspace libv4l 
libraries)
 vaapi - Enable Video Acceleration API for hardware decoding
 vala - Enable bindings for dev-lang/vala
+valgrind - Enable annotations for accuracy. May slow down runtime slightly. 
Safe to use even if not currently using dev-util/valgrind
 vanilla - Do not add extra patches which change default behaviour; DO NOT USE 
THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically
 vcd - Video CD support
 vdpau - Enable the Video Decode and Presentation API for Unix acceleration 
interface
-- 
2.40.1