public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
@ 2023-05-14  8:26 Sam James
  2023-05-14 16:45 ` David Seifert
  2023-05-14 16:46 ` Arsen Arsenović
  0 siblings, 2 replies; 11+ messages in thread
From: Sam James @ 2023-05-14  8:26 UTC (permalink / raw
  To: gentoo-dev; +Cc: 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 <sam@gentoo.org>
---
 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



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-14  8:26 [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag Sam James
@ 2023-05-14 16:45 ` David Seifert
  2023-05-14 16:46 ` Arsen Arsenović
  1 sibling, 0 replies; 11+ messages in thread
From: David Seifert @ 2023-05-14 16:45 UTC (permalink / raw
  To: gentoo-dev; +Cc: Sam James

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 <sam@gentoo.org>
> ---
>  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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-14  8:26 [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag Sam James
  2023-05-14 16:45 ` David Seifert
@ 2023-05-14 16:46 ` Arsen Arsenović
  2023-05-14 18:19   ` Alexe Stefan
  1 sibling, 1 reply; 11+ messages in thread
From: Arsen Arsenović @ 2023-05-14 16:46 UTC (permalink / raw
  To: gentoo-dev; +Cc: Sam James

[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]


Sam James <sam@gentoo.org> 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 <sam@gentoo.org>
> ---
>  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ć

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-14 16:46 ` Arsen Arsenović
@ 2023-05-14 18:19   ` Alexe Stefan
  2023-05-14 18:26     ` Sam James
       [not found]     ` <499369d0d6210fd722452328e5bcb0ba2ddf30a64fb3d4dfdb4d3b0d7d6eeac8@mu.id>
  0 siblings, 2 replies; 11+ messages in thread
From: Alexe Stefan @ 2023-05-14 18:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1925 bytes --]

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

dum., 14 mai 2023, 19:46 Arsen Arsenović <arsen@gentoo.org> a scris:

>
> Sam James <sam@gentoo.org> 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 <sam@gentoo.org>
> > ---
> >  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ć
>

[-- Attachment #2: Type: text/html, Size: 2514 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-14 18:19   ` Alexe Stefan
@ 2023-05-14 18:26     ` Sam James
       [not found]     ` <499369d0d6210fd722452328e5bcb0ba2ddf30a64fb3d4dfdb4d3b0d7d6eeac8@mu.id>
  1 sibling, 0 replies; 11+ messages in thread
From: Sam James @ 2023-05-14 18:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]


Alexe Stefan <stefanalexe48@gmail.com> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
       [not found]     ` <499369d0d6210fd722452328e5bcb0ba2ddf30a64fb3d4dfdb4d3b0d7d6eeac8@mu.id>
@ 2023-05-14 18:40       ` Sam James
  2023-05-26  7:43         ` Sam James
  0 siblings, 1 reply; 11+ messages in thread
From: Sam James @ 2023-05-14 18:40 UTC (permalink / raw
  To: Sam James; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]


Sam James <sam@gentoo.org> writes:

> Alexe Stefan <stefanalexe48@gmail.com> 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.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-14 18:40       ` Sam James
@ 2023-05-26  7:43         ` Sam James
  2023-05-27 13:52           ` Alexe Stefan
  0 siblings, 1 reply; 11+ messages in thread
From: Sam James @ 2023-05-26  7:43 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]


Sam James <sam@gentoo.org> writes:

> [[PGP Signed Part:Undecided]]
>
> Sam James <sam@gentoo.org> writes:
>
>> Alexe Stefan <stefanalexe48@gmail.com> 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.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-26  7:43         ` Sam James
@ 2023-05-27 13:52           ` Alexe Stefan
  2023-05-27 14:12             ` Sam James
  0 siblings, 1 reply; 11+ messages in thread
From: Alexe Stefan @ 2023-05-27 13:52 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

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

vin., 26 mai 2023, 10:44 Sam James <sam@gentoo.org> a scris:

>
> Sam James <sam@gentoo.org> writes:
>
> > [[PGP Signed Part:Undecided]]
> >
> > Sam James <sam@gentoo.org> writes:
> >
> >> Alexe Stefan <stefanalexe48@gmail.com> 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.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1653 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-27 13:52           ` Alexe Stefan
@ 2023-05-27 14:12             ` Sam James
  2023-05-27 17:26               ` Alexe Stefan
  0 siblings, 1 reply; 11+ messages in thread
From: Sam James @ 2023-05-27 14:12 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]


Alexe Stefan <stefanalexe48@gmail.com> 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.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-27 14:12             ` Sam James
@ 2023-05-27 17:26               ` Alexe Stefan
  2023-05-27 17:34                 ` Sam James
  0 siblings, 1 reply; 11+ messages in thread
From: Alexe Stefan @ 2023-05-27 17:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

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

sâm., 27 mai 2023, 17:13 Sam James <sam@gentoo.org> a scris:

>
> Alexe Stefan <stefanalexe48@gmail.com> 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.
>
>
>

[-- Attachment #2: Type: text/html, Size: 701 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag
  2023-05-27 17:26               ` Alexe Stefan
@ 2023-05-27 17:34                 ` Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-05-27 17:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]


Alexe Stefan <stefanalexe48@gmail.com> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-27 17:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-14  8:26 [gentoo-dev] [PATCH] profiles: create USE=valgrind global USE flag Sam James
2023-05-14 16:45 ` David Seifert
2023-05-14 16:46 ` Arsen Arsenović
2023-05-14 18:19   ` Alexe Stefan
2023-05-14 18:26     ` Sam James
     [not found]     ` <499369d0d6210fd722452328e5bcb0ba2ddf30a64fb3d4dfdb4d3b0d7d6eeac8@mu.id>
2023-05-14 18:40       ` Sam James
2023-05-26  7:43         ` Sam James
2023-05-27 13:52           ` Alexe Stefan
2023-05-27 14:12             ` Sam James
2023-05-27 17:26               ` Alexe Stefan
2023-05-27 17:34                 ` Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox