openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe
@ 2021-10-26  7:58 mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 2/7] jemalloc: Fix build on musl mingli.yu
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Mingli Yu <mingli.yu@windriver.com>

jemalloc is a general purpose malloc(3) implementation that emphasizes
fragmentation avoidance and scalable concurrency support.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../jemalloc/jemalloc_5.2.1.bb                | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb

diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
new file mode 100644
index 000000000..4738f0e78
--- /dev/null
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -0,0 +1,24 @@
+# Copyright (C) 2021 Mingli Yu <mingli.yu@windriver.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "General-purpose scalable concurrent malloc implementation"
+
+DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that emphasizes \
+fragmentation avoidance and scalable concurrency support."
+
+HOMEPAGE = "https://github.com/jemalloc/jemalloc"
+LICENSE = "BSD"
+
+SECTION = "libs"
+
+LIC_FILES_CHKSUM = "file://README;md5=6900e4a158982e4c4715bf16aa54fa10"
+
+SRC_URI = "git://github.com/jemalloc/jemalloc.git"
+
+SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_AUTORECONF += "--exclude=autoheader"
-- 
2.17.1



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

* [meta-oe][hardknott][PATCH 2/7] jemalloc: Fix build on musl
  2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
@ 2021-10-26  7:58 ` mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 3/7] jemalloc: fix the race during do_install mingli.yu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Khem Raj <raj.khem@gmail.com>

Fixes
In file included from include/jemalloc/internal/jemalloc_preamble.h:21:
include/jemalloc/internal/../jemalloc.h:235:28: error: exception specification in declaration does not match previous declaration
    void JEMALLOC_NOTHROW       *je_aligned_alloc(size_t alignment,
                                 ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Mingli Yu <mingli.yu@windriver.com>
---
 meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index 4738f0e78..39637663f 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -22,3 +22,5 @@ S = "${WORKDIR}/git"
 inherit autotools
 
 EXTRA_AUTORECONF += "--exclude=autoheader"
+
+EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"
-- 
2.17.1



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

* [meta-oe][hardknott][PATCH 3/7] jemalloc: fix the race during do_install
  2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 2/7] jemalloc: Fix build on musl mingli.yu
@ 2021-10-26  7:58 ` mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 4/7] jemalloc: add ptest support mingli.yu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Mingli Yu <mingli.yu@windriver.com>

Fixes:
 | TOPDIR/tmp-glibc/hosttools/install: cannot stat 'doc/jemalloc.3': No such file or directory
 | make: *** [Makefile:513: install_doc_man] Error 1

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ke-sure-doc-generated-before-install.patch | 42 +++++++++++++++++++
 .../jemalloc/jemalloc_5.2.1.bb                |  4 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/jemalloc/files/0001-Makefile.in-make-sure-doc-generated-before-install.patch

diff --git a/meta-oe/recipes-devtools/jemalloc/files/0001-Makefile.in-make-sure-doc-generated-before-install.patch b/meta-oe/recipes-devtools/jemalloc/files/0001-Makefile.in-make-sure-doc-generated-before-install.patch
new file mode 100644
index 000000000..0a1fe6d76
--- /dev/null
+++ b/meta-oe/recipes-devtools/jemalloc/files/0001-Makefile.in-make-sure-doc-generated-before-install.patch
@@ -0,0 +1,42 @@
+From 1efb45330f5dbe475a092cda6982e6d7e135485a Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Tue, 10 Aug 2021 13:02:18 +0000
+Subject: [PATCH] Makefile.in: make sure doc generated before install
+
+There is a race between the doc generation and the doc installation,
+so make the install depend on the build for doc to fix the error occurs
+sometimes as below:
+ | TOPDIR/tmp-glibc/hosttools/install: cannot stat 'doc/jemalloc.3': No such file or directory
+ | make: *** [Makefile:513: install_doc_man] Error 1
+
+Upstream-Status: Submitted [https://github.com/jemalloc/jemalloc/pull/2108]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 7128b007..ab94f0c8 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -501,14 +501,14 @@ install_lib: install_lib_static
+ endif
+ install_lib: install_lib_pc
+ 
+-install_doc_html:
++install_doc_html: build_doc_html
+ 	$(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
+ 	@for d in $(DOCS_HTML); do \
+ 	echo "$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
+ 	$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
+ done
+ 
+-install_doc_man:
++install_doc_man: build_doc_man
+ 	$(INSTALL) -d $(MANDIR)/man3
+ 	@for d in $(DOCS_MAN3); do \
+ 	echo "$(INSTALL) -m 644 $$d $(MANDIR)/man3"; \
+-- 
+2.29.2
+
diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index 39637663f..b191f729a 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -13,7 +13,9 @@ SECTION = "libs"
 
 LIC_FILES_CHKSUM = "file://README;md5=6900e4a158982e4c4715bf16aa54fa10"
 
-SRC_URI = "git://github.com/jemalloc/jemalloc.git"
+SRC_URI = "git://github.com/jemalloc/jemalloc.git \
+           file://0001-Makefile.in-make-sure-doc-generated-before-install.patch \
+"
 
 SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"
 
-- 
2.17.1



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

* [meta-oe][hardknott][PATCH 4/7] jemalloc: add ptest support
  2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 2/7] jemalloc: Fix build on musl mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 3/7] jemalloc: fix the race during do_install mingli.yu
@ 2021-10-26  7:58 ` mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 5/7] jemalloc: improve the ptest output mingli.yu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Mingli Yu <mingli.yu@windriver.com>

Add ptest support.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-devtools/jemalloc/files/run-ptest | 19 +++++++++++++++++++
 .../jemalloc/jemalloc_5.2.1.bb                | 17 ++++++++++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/jemalloc/files/run-ptest

diff --git a/meta-oe/recipes-devtools/jemalloc/files/run-ptest b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
new file mode 100644
index 000000000..ea9d80cbb
--- /dev/null
+++ b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+saved_dir=$PWD
+for dir in tests/* ; do
+	cd $dir
+	for atest in * ; do
+		if [ \( -x $atest \) -a \( -f $atest \) ] ; then
+			./$atest > ${atest}.stdout 2> ${atest}.stderr
+			if [ $? = 0 ] ; then
+				echo "PASS: $dir $atest"
+				rm ${atest}.stdout ${atest}.stderr
+			else
+				echo "FAIL: ${dir}/${atest}"
+			fi
+		fi
+	done
+	cd $saved_dir
+done
+
diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index b191f729a..b5d53bb11 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -15,14 +15,29 @@ LIC_FILES_CHKSUM = "file://README;md5=6900e4a158982e4c4715bf16aa54fa10"
 
 SRC_URI = "git://github.com/jemalloc/jemalloc.git \
            file://0001-Makefile.in-make-sure-doc-generated-before-install.patch \
+           file://run-ptest \
 "
 
 SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"
 
 S = "${WORKDIR}/git"
 
-inherit autotools
+inherit autotools ptest
 
 EXTRA_AUTORECONF += "--exclude=autoheader"
 
 EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"
+
+do_compile_ptest() {
+	oe_runmake tests
+}
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	subdirs="test/unit test/integration test/stress "
+	for tooltest in ${subdirs}
+	do
+		cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests
+	done
+	find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
+}
-- 
2.17.1



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

* [meta-oe][hardknott][PATCH 5/7] jemalloc: improve the ptest output
  2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
                   ` (2 preceding siblings ...)
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 4/7] jemalloc: add ptest support mingli.yu
@ 2021-10-26  7:58 ` mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 6/7] jemalloc: improve reproducibility mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license mingli.yu
  5 siblings, 0 replies; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Mingli Yu <mingli.yu@windriver.com>

Previouly we only show the output of each text program, actually
each test program includes serveral test cases. Improve the ptest
script to show the output of each test case.

Before:
 # ./run-ptest
 [snip]
 PASS: tests/integration/MALLOCX_ARENA
 PASS: tests/integration/aligned_alloc
 [snip]

After:
 # ./run-ptest
 [snip]
 PASS: test_MALLOCX_ARENA (non-reentrant)
 PASS: test_MALLOCX_ARENA (libc-reentrant)
 PASS: test_MALLOCX_ARENA (arena_new-reentrant)
 PASS: test_alignment_errors (non-reentrant)
 PASS: test_alignment_errors (libc-reentrant)
 PASS: test_alignment_errors (arena_new-reentrant)
 PASS: test_oom_errors (non-reentrant)
 PASS: test_oom_errors (libc-reentrant)
 PASS: test_oom_errors (arena_new-reentrant)
 PASS: test_alignment_and_size (non-reentrant)
 PASS: test_alignment_and_size (libc-reentrant)
 PASS: test_alignment_and_size (arena_new-reentrant)
 PASS: test_zero_alloc (non-reentrant)
 PASS: test_zero_alloc (libc-reentrant)
 PASS: test_zero_alloc (arena_new-reentrant)
 [snip]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-devtools/jemalloc/files/run-ptest    | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/meta-oe/recipes-devtools/jemalloc/files/run-ptest b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
index ea9d80cbb..b351f947e 100644
--- a/meta-oe/recipes-devtools/jemalloc/files/run-ptest
+++ b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
@@ -5,13 +5,15 @@ for dir in tests/* ; do
 	cd $dir
 	for atest in * ; do
 		if [ \( -x $atest \) -a \( -f $atest \) ] ; then
-			./$atest > ${atest}.stdout 2> ${atest}.stderr
-			if [ $? = 0 ] ; then
-				echo "PASS: $dir $atest"
-				rm ${atest}.stdout ${atest}.stderr
-			else
-				echo "FAIL: ${dir}/${atest}"
-			fi
+			rm -rf tests.log
+			./$atest > tests.log 2>&1
+			sed -e '/: pass/ s/^/PASS: /g' \
+			    -e '/: skip/ s/^/SKIP: /g' \
+			    -e '/: fail/ s/^/FAIL: /g' \
+			    -e 's/: pass//g' \
+			    -e 's/: skip//g' \
+			    -e 's/: fail//g' \
+			    -e '/^--- pass:/d' tests.log
 		fi
 	done
 	cd $saved_dir
-- 
2.17.1



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

* [meta-oe][hardknott][PATCH 6/7] jemalloc: improve reproducibility
  2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
                   ` (3 preceding siblings ...)
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 5/7] jemalloc: improve the ptest output mingli.yu
@ 2021-10-26  7:58 ` mingli.yu
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license mingli.yu
  5 siblings, 0 replies; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Mingli Yu <mingli.yu@windriver.com>

Remove build host info from config file to improve reproducibility.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index b5d53bb11..d4fed864d 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -28,6 +28,12 @@ EXTRA_AUTORECONF += "--exclude=autoheader"
 
 EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"
 
+do_install:append() {
+	sed -i -e 's@${STAGING_DIR_HOST}@@g' \
+               -e 's@${STAGING_DIR_NATIVE}@@g' \
+               -e 's@${WORKDIR}@@g' ${D}${bindir}/jemalloc-config
+}
+
 do_compile_ptest() {
 	oe_runmake tests
 }
-- 
2.17.1



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

* [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license
  2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
                   ` (4 preceding siblings ...)
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 6/7] jemalloc: improve reproducibility mingli.yu
@ 2021-10-26  7:58 ` mingli.yu
  2021-10-26 11:11   ` [oe] " Anders Montonen
  5 siblings, 1 reply; 8+ messages in thread
From: mingli.yu @ 2021-10-26  7:58 UTC (permalink / raw)
  To: openembedded-devel, akuster808

From: Armin Kuster <akuster808@gmail.com>

"BSD" is ambiguous, use the precise licenses BSD-3-Clause

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index d4fed864d..7cd06f102 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -7,7 +7,7 @@ DESCRIPTION = "jemalloc is a general purpose malloc(3) implementation that empha
 fragmentation avoidance and scalable concurrency support."
 
 HOMEPAGE = "https://github.com/jemalloc/jemalloc"
-LICENSE = "BSD"
+LICENSE = "BSD-2-Clause"
 
 SECTION = "libs"
 
-- 
2.17.1



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

* Re: [oe] [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license
  2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license mingli.yu
@ 2021-10-26 11:11   ` Anders Montonen
  0 siblings, 0 replies; 8+ messages in thread
From: Anders Montonen @ 2021-10-26 11:11 UTC (permalink / raw)
  To: Yu, Mingli; +Cc: openembedded-devel, Armpit

Hi,

> On 26 Oct 2021, at 10:58, Yu, Mingli <mingli.yu@windriver.com> wrote:
> 
> From: Armin Kuster <akuster808@gmail.com>
> 
> "BSD" is ambiguous, use the precise licenses BSD-3-Clause
...
> 
> -LICENSE = "BSD"
> +LICENSE = "BSD-2-Clause”

I realize this is a backport, but the commit message doesn’t match the change. Should the license be BSD-2-Clause, or BSD-3-Clause?

-a

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

end of thread, other threads:[~2021-10-26 11:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 2/7] jemalloc: Fix build on musl mingli.yu
2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 3/7] jemalloc: fix the race during do_install mingli.yu
2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 4/7] jemalloc: add ptest support mingli.yu
2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 5/7] jemalloc: improve the ptest output mingli.yu
2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 6/7] jemalloc: improve reproducibility mingli.yu
2021-10-26  7:58 ` [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license mingli.yu
2021-10-26 11:11   ` [oe] " Anders Montonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).