All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] xerces: enable threads if available
@ 2018-10-06 20:13 Fabrice Fontaine
  2018-10-06 20:59 ` Matthew Weber
  2018-10-09 13:06 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2018-10-06 20:13 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/xerces/xerces.mk | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk
index a25641fb45..da088d8e1c 100644
--- a/package/xerces/xerces.mk
+++ b/package/xerces/xerces.mk
@@ -10,9 +10,7 @@ XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources
 XERCES_LICENSE = Apache-2.0
 XERCES_LICENSE_FILES = LICENSE
 XERCES_INSTALL_STAGING = YES
-XERCES_CONF_OPTS = \
-	--disable-threads \
-	--with-gnu-ld
+XERCES_CONF_OPTS = --with-gnu-ld
 
 define XERCES_DISABLE_SAMPLES
 	$(SED) 's/ samples//' $(@D)/Makefile.in
@@ -39,4 +37,10 @@ else
 XERCES_CONF_OPTS += --disable-network
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+XERCES_CONF_OPTS += --enable-threads
+else
+XERCES_CONF_OPTS += --disable-threads
+endif
+
 $(eval $(autotools-package))
-- 
2.17.1

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

* [Buildroot] [PATCH 1/1] xerces: enable threads if available
  2018-10-06 20:13 [Buildroot] [PATCH 1/1] xerces: enable threads if available Fabrice Fontaine
@ 2018-10-06 20:59 ` Matthew Weber
  2018-10-06 21:51   ` Fabrice Fontaine
  2018-10-09 13:06 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Matthew Weber @ 2018-10-06 20:59 UTC (permalink / raw)
  To: buildroot

Fabrice,

On Sat, Oct 6, 2018 at 3:13 PM Fabrice Fontaine
<fontaine.fabrice@gmail.com> wrote:
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>

> ---
>  package/xerces/xerces.mk | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk
> index a25641fb45..da088d8e1c 100644
> --- a/package/xerces/xerces.mk
> +++ b/package/xerces/xerces.mk
> @@ -10,9 +10,7 @@ XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources
>  XERCES_LICENSE = Apache-2.0
>  XERCES_LICENSE_FILES = LICENSE
>  XERCES_INSTALL_STAGING = YES
> -XERCES_CONF_OPTS = \
> -       --disable-threads \

I went back and checked the history on why threading was disabled by
default.  It looks like there wasn't a specific reason.  Just a
package bump and change of configuration style.
https://git.busybox.net/buildroot/commit/package/xerces/xerces.mk?id=324f61f7982c64ebd4a457467b33a6984bd8a584

> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
> +XERCES_CONF_OPTS += --enable-threads
> +else
> +XERCES_CONF_OPTS += --disable-threads
> +endif
> +

Does this yield a pretty good performance increase?  Wonder how they
bound the thread number to use on target when it runs.

Matt

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

* [Buildroot] [PATCH 1/1] xerces: enable threads if available
  2018-10-06 20:59 ` Matthew Weber
@ 2018-10-06 21:51   ` Fabrice Fontaine
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2018-10-06 21:51 UTC (permalink / raw)
  To: buildroot

Dear Matthew,

Le sam. 6 oct. 2018 ? 22:59, Matthew Weber <
matthew.weber@rockwellcollins.com> a ?crit :

> Fabrice,
>
> On Sat, Oct 6, 2018 at 3:13 PM Fabrice Fontaine
> <fontaine.fabrice@gmail.com> wrote:
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
>
> > ---
> >  package/xerces/xerces.mk | 10 +++++++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk
> > index a25641fb45..da088d8e1c 100644
> > --- a/package/xerces/xerces.mk
> > +++ b/package/xerces/xerces.mk
> > @@ -10,9 +10,7 @@ XERCES_SITE =
> http://archive.apache.org/dist/xerces/c/3/sources
> >  XERCES_LICENSE = Apache-2.0
> >  XERCES_LICENSE_FILES = LICENSE
> >  XERCES_INSTALL_STAGING = YES
> > -XERCES_CONF_OPTS = \
> > -       --disable-threads \
>
> I went back and checked the history on why threading was disabled by
> default.  It looks like there wasn't a specific reason.  Just a
> package bump and change of configuration style.
>
> https://git.busybox.net/buildroot/commit/package/xerces/xerces.mk?id=324f61f7982c64ebd4a457467b33a6984bd8a584
>
> > +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
> > +XERCES_CONF_OPTS += --enable-threads
> > +else
> > +XERCES_CONF_OPTS += --disable-threads
> > +endif
> > +
>
> Does this yield a pretty good performance increase?  Wonder how they
> bound the thread number to use on target when it runs.
>
Thread is only used for posix mutex (see m4/xerces_mutexmgr_selection.m4),
not for creating threads.
If threads is available, then xerces will use
util/MutexManagers/PosixMutexMgr.hpp otherwise it will use
util/MutexManagers/NoThreadMutexMgr.cpp.
NoThreadMutexMgr is basically doing nothing. So, current behavior of always
disabling threads means that xerces is not thread safe.

> Matt
>
Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181006/20cbc46e/attachment.html>

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

* [Buildroot] [PATCH 1/1] xerces: enable threads if available
  2018-10-06 20:13 [Buildroot] [PATCH 1/1] xerces: enable threads if available Fabrice Fontaine
  2018-10-06 20:59 ` Matthew Weber
@ 2018-10-09 13:06 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-10-09 13:06 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  6 Oct 2018 22:13:08 +0200, Fabrice Fontaine wrote:
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/xerces/xerces.mk | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-10-09 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-06 20:13 [Buildroot] [PATCH 1/1] xerces: enable threads if available Fabrice Fontaine
2018-10-06 20:59 ` Matthew Weber
2018-10-06 21:51   ` Fabrice Fontaine
2018-10-09 13:06 ` 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.