All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [FYI] jemalloc and valgrind
@ 2016-09-08 20:54 Charles Hardin
  2016-09-08 21:12 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Hardin @ 2016-09-08 20:54 UTC (permalink / raw)
  To: buildroot

So, we hit an oddity on a ?debug? build which turned out to be that if we have
valgrind installed - jemalloc would race and if it got build before valgrind then
it would not detect it.

I?ll try to make this a format patch later - but this is off another tree and so simple
that if someone wants to add it - I would suggest you do.

diff --git a/package/jemalloc/jemalloc.mk b/package/jemalloc/jemalloc.mk
index 7086dfa..71d6200 100644
--- a/package/jemalloc/jemalloc.mk
+++ b/package/jemalloc/jemalloc.mk
@@ -11,5 +11,10 @@ JEMALLOC_LICENSE = BSD-2c
 JEMALLOC_LICENSE_FILES = COPYING
 JEMALLOC_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_VALGRIND),y)
+JEMALLOC_DEPENDENCIES += valgrind
+JEMALLOC_CONF_OPTS += --enable-valgrind
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160908/a9a11d15/attachment.html>

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

* [Buildroot] [FYI] jemalloc and valgrind
  2016-09-08 20:54 [Buildroot] [FYI] jemalloc and valgrind Charles Hardin
@ 2016-09-08 21:12 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-09-08 21:12 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 8 Sep 2016 13:54:00 -0700, Charles Hardin wrote:
> So, we hit an oddity on a ?debug? build which turned out to be that if we have
> valgrind installed - jemalloc would race

What do you mean by "would race" ?

> and if it got build before valgrind then
> it would not detect it.
> 
> I?ll try to make this a format patch later - but this is off another tree and so simple
> that if someone wants to add it - I would suggest you do.

It would be better if you could make an official patch, since your
patch below looks almost good, it only needs a proper commit log +
correct submission.

> 
> diff --git a/package/jemalloc/jemalloc.mk b/package/jemalloc/jemalloc.mk
> index 7086dfa..71d6200 100644
> --- a/package/jemalloc/jemalloc.mk
> +++ b/package/jemalloc/jemalloc.mk
> @@ -11,5 +11,10 @@ JEMALLOC_LICENSE = BSD-2c
>  JEMALLOC_LICENSE_FILES = COPYING
>  JEMALLOC_INSTALL_STAGING = YES
>  
> +ifeq ($(BR2_PACKAGE_VALGRIND),y)
> +JEMALLOC_DEPENDENCIES += valgrind
> +JEMALLOC_CONF_OPTS += --enable-valgrind

Please add:

else
JEMALLOC_CONF_OPTS += --disable-valgrind

> +endif

Also, for good measure:

HOST_JEMALLOC_CONF_OPTS += --disable-valgrind

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-09-08 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 20:54 [Buildroot] [FYI] jemalloc and valgrind Charles Hardin
2016-09-08 21:12 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.