xerces: enable threads if available
PATCH 1/1 xerces: enable threads if available
--- package/xerces/xerces.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
package/xerces/xerces.mk +7 -3
@@ -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))
Signature · 1 line
2.17.1
PATCH 1/1 xerces: enable threads if available
Fabrice,
Quoted 2 lines · Fabrice Fontaine
Signed-off-by Fabrice Fontaine <[email protected]>
Quoted 9 lines
--- package/xerces/xerces.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)package/xerces/xerces.mk +0
-0
package/xerces/xerces.mk XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources · line 14
Quoted 5 lines
package/xerces/xerces.mk +0
-2@@ -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
package/xerces/xerces.mk else · line 45
Quoted 6 lines
package/xerces/xerces.mk +6
-0+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
PATCH 1/1 xerces: enable threads if available
Dear Matthew,
Le sam. 6 oct. 2018 ? 22:59, Matthew Weber <
[email protected]> a ?crit :
Quoted 31 lines
Fabrice,
Quoted 2 lines · Fabrice Fontaine
Signed-off-by Fabrice Fontaine <[email protected]>Reviewed-by Matt Weber <[email protected]>package/xerces/xerces.mk XERCES_SITE =
Quoted 9 lines
--- package/xerces/xerces.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)package/xerces/xerces.mk +0
-0@@ -10,9 +10,7 @@ XERCES_SITE =package/xerces/xerces.mk XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources · line 14
Quoted 5 lines
package/xerces/xerces.mk +0
-2XERCES_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.
Quoted 10 lines
package/xerces/xerces.mk else · line 45
Quoted 6 lines
package/xerces/xerces.mk +6
-0+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.
Quoted 2 lines
Matt
Best Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181006/20cbc46e/attachment.html>
Thomas Petazzoni
AppliedPATCH 1/1 xerces: enable threads if available
In reply to Fabrice FontaineHello,
Quoted 4 lines · Fabrice Fontaine
Signed-off-by Fabrice Fontaine <[email protected]>--- package/xerces/xerces.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com