diff --git a/backport-0001-Correct-tsd-layout-graph.patch b/backport-0001-Correct-tsd-layout-graph.patch deleted file mode 100644 index 24b6b67227bc82176e46fd6171bc9b08c3546832..0000000000000000000000000000000000000000 --- a/backport-0001-Correct-tsd-layout-graph.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 56c8ecffc1f84f630e10f775bc29fcf4c743a3c9 Mon Sep 17 00:00:00 2001 -From: Yinan Zhang -Date: Thu, 6 Jun 2019 09:22:10 -0700 -Subject: [PATCH] Correct tsd layout graph - -Augmented the tsd layout graph so that the two recently added fields, -`offset_state` and `bytes_until_sample`, are properly reflected. -As is shown, the cache footprint is 16 bytes larger than before. ---- - include/jemalloc/internal/tsd.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/include/jemalloc/internal/tsd.h b/include/jemalloc/internal/tsd.h -index 9ba26004..18b2476b 100644 ---- a/include/jemalloc/internal/tsd.h -+++ b/include/jemalloc/internal/tsd.h -@@ -20,6 +20,7 @@ - * e: tcache_enabled - * m: thread_allocated (config_stats) - * f: thread_deallocated (config_stats) -+ * b: bytes_until_sample (config_prof) - * p: prof_tdata (config_prof) - * c: rtree_ctx (rtree cache accessed on deallocation) - * t: tcache -@@ -27,6 +28,7 @@ - * d: arenas_tdata_bypass - * r: reentrancy_level - * x: narenas_tdata -+ * v: offset_state - * i: iarena - * a: arena - * o: arenas_tdata -@@ -35,11 +37,13 @@ - * Use a compact layout to reduce cache footprint. - * +--- 64-bit and 64B cacheline; 1B each letter; First byte on the left. ---+ - * |---------------------------- 1st cacheline ----------------------------| -- * | sedrxxxx mmmmmmmm ffffffff pppppppp [c * 32 ........ ........ .......] | -+ * | sedrxxxx vvvvvvvv mmmmmmmm ffffffff bbbbbbbb pppppppp [c * 16 .......] | - * |---------------------------- 2nd cacheline ----------------------------| - * | [c * 64 ........ ........ ........ ........ ........ ........ .......] | - * |---------------------------- 3nd cacheline ----------------------------| -- * | [c * 32 ........ ........ .......] iiiiiiii aaaaaaaa oooooooo [t...... | -+ * | [c * 48 ........ ........ ........ ........ .......] iiiiiiii aaaaaaaa | -+ * +---------------------------- 4th cacheline ----------------------------+ -+ * | oooooooo [t...... ........ ........ ........ ........ ........ ........ | - * +-------------------------------------------------------------------------+ - * Note: the entire tcache is embedded into TSD and spans multiple cachelines. - * --- -2.37.3.windows.1 - diff --git a/backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch b/backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch deleted file mode 100644 index 33a18af4cce7d717f734d2822c79bb8874aa8bb0..0000000000000000000000000000000000000000 --- a/backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Nur jemalloc-5.2.1/src/arena.c tmp/src/arena.c ---- jemalloc-5.2.1/src/arena.c 2019-08-06 04:02:00.000000000 +0800 -+++ tmp/src/arena.c 2021-11-03 10:23:41.243648055 +0800 -@@ -199,13 +199,12 @@ - malloc_mutex_lock(tsdn, &arena->tcache_ql_mtx); - cache_bin_array_descriptor_t *descriptor; - ql_foreach(descriptor, &arena->cache_bin_array_descriptor_ql, link) { -- szind_t i = 0; -- for (; i < SC_NBINS; i++) { -+ for (szind_t i = 0; i < SC_NBINS; i++) { - cache_bin_t *tbin = &descriptor->bins_small[i]; - arena_stats_accum_zu(&astats->tcache_bytes, - tbin->ncached * sz_index2size(i)); - } -- for (; i < nhbins; i++) { -+ for (szind_t i = 0; i < nhbins - SC_NBINS; i++) { - cache_bin_t *tbin = &descriptor->bins_large[i]; - arena_stats_accum_zu(&astats->tcache_bytes, - tbin->ncached * sz_index2size(i)); diff --git a/backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch b/backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch deleted file mode 100644 index bc2cccb5412c69d0fdf33d9495028aac4ebdfc92..0000000000000000000000000000000000000000 --- a/backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -Nur jemalloc-5.2.1/include/jemalloc/internal/hash.h tmp/include/jemalloc/internal/hash.h ---- jemalloc-5.2.1/include/jemalloc/internal/hash.h 2019-08-06 04:02:00.000000000 +0800 -+++ tmp/include/jemalloc/internal/hash.h 2021-11-16 10:49:41.199628212 +0800 -@@ -182,19 +182,19 @@ - case 13: k4 ^= tail[12] << 0; - k4 *= c4; k4 = hash_rotl_32(k4, 18); k4 *= c1; h4 ^= k4; - JEMALLOC_FALLTHROUGH -- case 12: k3 ^= tail[11] << 24; JEMALLOC_FALLTHROUGH -+ case 12: k3 ^= (uint32_t) tail[11] << 24; JEMALLOC_FALLTHROUGH - case 11: k3 ^= tail[10] << 16; JEMALLOC_FALLTHROUGH - case 10: k3 ^= tail[ 9] << 8; JEMALLOC_FALLTHROUGH - case 9: k3 ^= tail[ 8] << 0; - k3 *= c3; k3 = hash_rotl_32(k3, 17); k3 *= c4; h3 ^= k3; - JEMALLOC_FALLTHROUGH -- case 8: k2 ^= tail[ 7] << 24; JEMALLOC_FALLTHROUGH -+ case 8: k2 ^= (uint32_t) tail[ 7] << 24; JEMALLOC_FALLTHROUGH - case 7: k2 ^= tail[ 6] << 16; JEMALLOC_FALLTHROUGH - case 6: k2 ^= tail[ 5] << 8; JEMALLOC_FALLTHROUGH - case 5: k2 ^= tail[ 4] << 0; - k2 *= c2; k2 = hash_rotl_32(k2, 16); k2 *= c3; h2 ^= k2; - JEMALLOC_FALLTHROUGH -- case 4: k1 ^= tail[ 3] << 24; JEMALLOC_FALLTHROUGH -+ case 4: k1 ^= (uint32_t) tail[ 3] << 24; JEMALLOC_FALLTHROUGH - case 3: k1 ^= tail[ 2] << 16; JEMALLOC_FALLTHROUGH - case 2: k1 ^= tail[ 1] << 8; JEMALLOC_FALLTHROUGH - case 1: k1 ^= tail[ 0] << 0; diff --git a/backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch b/backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch deleted file mode 100644 index fc5a5a7be8251a0da31895532d6cdbc5513516c0..0000000000000000000000000000000000000000 --- a/backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -Nur jemalloc-5.2.1/src/tcache.c tmp/src/tcache.c ---- jemalloc-5.2.1/src/tcache.c 2019-08-06 04:02:00.000000000 +0800 -+++ tmp/src/tcache.c 2021-11-16 19:12:46.889312051 +0800 -@@ -778,21 +778,15 @@ - - void - tcache_prefork(tsdn_t *tsdn) { -- if (!config_prof && opt_tcache) { -- malloc_mutex_prefork(tsdn, &tcaches_mtx); -- } -+ malloc_mutex_prefork(tsdn, &tcaches_mtx); - } - - void - tcache_postfork_parent(tsdn_t *tsdn) { -- if (!config_prof && opt_tcache) { -- malloc_mutex_postfork_parent(tsdn, &tcaches_mtx); -- } -+ malloc_mutex_postfork_parent(tsdn, &tcaches_mtx); - } - - void - tcache_postfork_child(tsdn_t *tsdn) { -- if (!config_prof && opt_tcache) { -- malloc_mutex_postfork_child(tsdn, &tcaches_mtx); -- } -+ malloc_mutex_postfork_child(tsdn, &tcaches_mtx); - } diff --git a/jemalloc-5.2.1.tar.bz2 b/jemalloc-5.2.1.tar.bz2 deleted file mode 100644 index 75baa3f9a1c21f350f28521657c1d907e6235a34..0000000000000000000000000000000000000000 Binary files a/jemalloc-5.2.1.tar.bz2 and /dev/null differ diff --git a/jemalloc-5.3.0.tar.bz2 b/jemalloc-5.3.0.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..5de860d778f7f3538e4bd7fc997dde512a8701c6 Binary files /dev/null and b/jemalloc-5.3.0.tar.bz2 differ diff --git a/jemalloc.spec b/jemalloc.spec index 88cebf5eb0af0c1d3b24a88e1ff51c14ca12d03f..07b2c8d2c52520971680eae01cdd9221ceb7d3aa 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -11,20 +11,15 @@ %endif Name: jemalloc -Version: 5.2.1 -Release: 2 +Version: 5.3.0 +Release: 1 Summary: General-purpose scalable concurrent malloc implementation -License: BSD +License: BSD-2-Clause URL: http://www.canonware.com/jemalloc/ Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 -Patch1: backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch -Patch2: backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch -Patch3: backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch -Patch6000: backport-0001-Correct-tsd-layout-graph.patch - -BuildRequires: libxslt perl-generators gcc +BuildRequires: perl-generators gcc /usr/bin/xsltproc %description Implemented by malloc (3), is an independent implementation of jemalloc. @@ -43,7 +38,7 @@ Summary: help for jemalloc. The help package contains manual pages and other related files for jemalloc. %prep -%autosetup -p1 +%setup -q %build export LDFLAGS="%{?__global_ldflags} -lrt" @@ -85,10 +80,31 @@ make check %{_mandir}/man3/jemalloc.3* %changelog -* Mon Jan 9 2023 mengwenhua - 5.2.1-2 +* Tue Mar 07 2023 mawenshuo - 5.3.0-1 +- Upgrade to 5.3.0 + +* Mon Jan 9 2023 mengwenhua - 5.2.1-8 - Correct tsd layout graph -* Thu Dec 30 2021 xigaoxinyan - 5.2.1-1 +* Tue Nov 15 2022 doupengda - 5.2.1-7 +- add loongarch64 support + +* Tue May 10 2022 Ge Wang - 5.2.1-6 +- License compliance rectification + +* Thu Dec 2 2021 guominghong - 5.2.1-5 +- Fix spec check + +* Tue Nov 16 2021 guominghong - 5.2.1-4 +- Fix tcaches mutex pre-post fork handling + +* Tue Nov 16 2021 guominghong - 5.2.1-3 +- Fix Undefined Behavior in hash.h + +* Wed Nov 3 2021 guominghong - 5.2.1-2 +- Fix large bin index accessed through cache bin descriptor + +* Tue Jul 20 2021 weidong - 5.2.1-1 - Update jemlloc * Wed Jun 02 2021 wulei - 5.1.0-4