Compare commits
No commits in common. "master" and "f18" have entirely different histories.
16
.gitignore
vendored
16
.gitignore
vendored
@ -14,19 +14,3 @@
|
||||
/jemalloc-3.3.0.tar.bz2
|
||||
/jemalloc-3.3.1.tar.bz2
|
||||
/jemalloc-3.4.0.tar.bz2
|
||||
/jemalloc-3.5.1.tar.bz2
|
||||
/jemalloc-3.6.0.tar.bz2
|
||||
/jemalloc-4.0.0.tar.bz2
|
||||
/jemalloc-4.0.2.tar.bz2
|
||||
/jemalloc-4.0.3.tar.bz2
|
||||
/jemalloc-4.0.4.tar.bz2
|
||||
/jemalloc-4.1.0.tar.bz2
|
||||
/jemalloc-4.1.1.tar.bz2
|
||||
/jemalloc-4.2.1.tar.bz2
|
||||
/jemalloc-4.3.1.tar.bz2
|
||||
/jemalloc-4.4.0.tar.bz2
|
||||
/jemalloc-4.5.0.tar.bz2
|
||||
/jemalloc-5.0.1.tar.bz2
|
||||
/jemalloc-5.1.0.tar.bz2
|
||||
/jemalloc-5.2.0.tar.bz2
|
||||
/jemalloc-5.2.1.tar.bz2
|
||||
|
12
jemalloc-2.0.1-s390.patch
Normal file
12
jemalloc-2.0.1-s390.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up jemalloc-2.0.1/include/jemalloc/internal/jemalloc_internal.h.in.orig jemalloc-2.0.1/include/jemalloc/internal/jemalloc_internal.h.in
|
||||
--- jemalloc-2.0.1/include/jemalloc/internal/jemalloc_internal.h.in.orig 2010-12-11 14:23:59.000000000 +0100
|
||||
+++ jemalloc-2.0.1/include/jemalloc/internal/jemalloc_internal.h.in 2010-12-11 14:24:04.000000000 +0100
|
||||
@@ -135,7 +135,7 @@ extern void (*JEMALLOC_P(malloc_message)
|
||||
#ifdef __powerpc__
|
||||
# define LG_QUANTUM 4
|
||||
#endif
|
||||
-#ifdef __s390x__
|
||||
+#ifdef __s390__
|
||||
# define LG_QUANTUM 4
|
||||
#endif
|
||||
|
24
jemalloc-2.1.0.no_pprof.patch
Normal file
24
jemalloc-2.1.0.no_pprof.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- Makefile.in.orig 2010-12-04 02:05:01.000000000 +0100
|
||||
+++ Makefile.in 2011-01-05 23:13:32.000000000 +0100
|
||||
@@ -42,7 +42,6 @@
|
||||
endif
|
||||
|
||||
# Lists of files.
|
||||
-BINS := @srcroot@bin/pprof
|
||||
CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \
|
||||
@objroot@include/jemalloc/jemalloc_defs@install_suffix@.h
|
||||
CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/base.c \
|
||||
@@ -123,13 +122,6 @@
|
||||
$(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@
|
||||
endif
|
||||
|
||||
-install_bin:
|
||||
- install -d $(BINDIR)
|
||||
- @for b in $(BINS); do \
|
||||
- echo "install -m 755 $$b $(BINDIR)"; \
|
||||
- install -m 755 $$b $(BINDIR); \
|
||||
-done
|
||||
-
|
||||
install_include:
|
||||
install -d $(INCLUDEDIR)/jemalloc
|
||||
@for h in $(CHDRS); do \
|
25
jemalloc-2.2.0.no_pprof.patch
Normal file
25
jemalloc-2.2.0.no_pprof.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -Naur ../jemalloc-2.2.0.orig/Makefile.in ./Makefile.in
|
||||
--- ../jemalloc-2.2.0.orig/Makefile.in 2011-03-23 01:03:58.000000000 +0100
|
||||
+++ ./Makefile.in 2011-03-28 23:56:21.000000000 +0200
|
||||
@@ -42,7 +42,6 @@
|
||||
endif
|
||||
|
||||
# Lists of files.
|
||||
-BINS := @srcroot@bin/pprof
|
||||
CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \
|
||||
@objroot@include/jemalloc/jemalloc_defs@install_suffix@.h
|
||||
CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/atomic.c \
|
||||
@@ -141,13 +140,6 @@
|
||||
$(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@
|
||||
endif
|
||||
|
||||
-install_bin:
|
||||
- install -d $(BINDIR)
|
||||
- @for b in $(BINS); do \
|
||||
- echo "install -m 755 $$b $(BINDIR)"; \
|
||||
- install -m 755 $$b $(BINDIR); \
|
||||
-done
|
||||
-
|
||||
install_include:
|
||||
install -d $(INCLUDEDIR)/jemalloc
|
||||
@for h in $(CHDRS); do \
|
24
jemalloc-2.2.2.no_pprof.patch
Normal file
24
jemalloc-2.2.2.no_pprof.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- Makefile.in.orig 2011-08-01 22:03:28.000000000 +0200
|
||||
+++ Makefile.in 2011-08-01 22:02:33.000000000 +0200
|
||||
@@ -42,7 +42,6 @@
|
||||
endif
|
||||
|
||||
# Lists of files.
|
||||
-BINS := @srcroot@bin/pprof
|
||||
CHDRS := @objroot@include/jemalloc/jemalloc@install_suffix@.h \
|
||||
@objroot@include/jemalloc/jemalloc_defs@install_suffix@.h
|
||||
CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/atomic.c \
|
||||
@@ -141,13 +140,6 @@
|
||||
$(CC) -o $@ $< -L@objroot@lib -ljemalloc@install_suffix@ -lpthread
|
||||
endif
|
||||
|
||||
-install_bin:
|
||||
- install -d $(BINDIR)
|
||||
- @for b in $(BINS); do \
|
||||
- echo "install -m 755 $$b $(BINDIR)"; \
|
||||
- install -m 755 $$b $(BINDIR); \
|
||||
-done
|
||||
-
|
||||
install_include:
|
||||
install -d $(INCLUDEDIR)/jemalloc
|
||||
@for h in $(CHDRS); do \
|
11
jemalloc-3.0.0-s390.patch
Normal file
11
jemalloc-3.0.0-s390.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- include/jemalloc/internal/jemalloc_internal.h.in.orig 2012-05-14 08:29:24.332065965 +0200
|
||||
+++ include/jemalloc/internal/jemalloc_internal.h.in 2012-05-14 08:29:39.483118492 +0200
|
||||
@@ -276,7 +276,7 @@
|
||||
# ifdef __powerpc__
|
||||
# define LG_QUANTUM 4
|
||||
# endif
|
||||
-# ifdef __s390x__
|
||||
+# ifdef __s390__
|
||||
# define LG_QUANTUM 4
|
||||
# endif
|
||||
# ifdef __SH4__
|
256
jemalloc-3.0.0.atomic_h_ppc_32bit_operations.patch
Normal file
256
jemalloc-3.0.0.atomic_h_ppc_32bit_operations.patch
Normal file
@ -0,0 +1,256 @@
|
||||
diff -Naur ../jemalloc-3.0.0.orig/COPYING.epel5-ppc ./COPYING.epel5-ppc
|
||||
--- ../jemalloc-3.0.0.orig/COPYING.epel5-ppc 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./COPYING.epel5-ppc 2012-05-18 16:21:31.869392165 +0200
|
||||
@@ -0,0 +1,215 @@
|
||||
+When using this jemalloc package with EPEL5 on ppc, please note that a
|
||||
+non-upstream patch has been added. This patch is covered by the Apache
|
||||
+2.0 License, which states that this work is
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+
|
||||
+For other platforms and operating systems, please ignore this file.
|
||||
+
|
||||
+The patch adds missing 32bit atomic operations that is missing from
|
||||
+RHEL5 and its derivates on ppc/ppc64. The code was fetched from the
|
||||
+Apache Portable Runtime project, http://apr.apache.org/
|
||||
+
|
||||
+
|
||||
+
|
||||
+Apache License
|
||||
+
|
||||
+Version 2.0, January 2004
|
||||
+
|
||||
+http://www.apache.org/licenses/
|
||||
+
|
||||
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
+
|
||||
+1. Definitions.
|
||||
+
|
||||
+"License" shall mean the terms and conditions for use, reproduction,
|
||||
+and distribution as defined by Sections 1 through 9 of this document.
|
||||
+
|
||||
+"Licensor" shall mean the copyright owner or entity authorized by the
|
||||
+copyright owner that is granting the License.
|
||||
+
|
||||
+"Legal Entity" shall mean the union of the acting entity and all other
|
||||
+entities that control, are controlled by, or are under common control
|
||||
+with that entity. For the purposes of this definition, "control" means
|
||||
+(i) the power, direct or indirect, to cause the direction or
|
||||
+management of such entity, whether by contract or otherwise, or (ii)
|
||||
+ownership of fifty percent (50%) or more of the outstanding shares, or
|
||||
+(iii) beneficial ownership of such entity.
|
||||
+
|
||||
+"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
+permissions granted by this License.
|
||||
+
|
||||
+"Source" form shall mean the preferred form for making modifications,
|
||||
+including but not limited to software source code, documentation
|
||||
+source, and configuration files.
|
||||
+
|
||||
+"Object" form shall mean any form resulting from mechanical
|
||||
+transformation or translation of a Source form, including but not
|
||||
+limited to compiled object code, generated documentation, and
|
||||
+conversions to other media types.
|
||||
+
|
||||
+"Work" shall mean the work of authorship, whether in Source or Object
|
||||
+form, made available under the License, as indicated by a copyright
|
||||
+notice that is included in or attached to the work (an example is
|
||||
+provided in the Appendix below).
|
||||
+
|
||||
+"Derivative Works" shall mean any work, whether in Source or Object
|
||||
+form, that is based on (or derived from) the Work and for which the
|
||||
+editorial revisions, annotations, elaborations, or other modifications
|
||||
+represent, as a whole, an original work of authorship. For the
|
||||
+purposes of this License, Derivative Works shall not include works
|
||||
+that remain separable from, or merely link (or bind by name) to the
|
||||
+interfaces of, the Work and Derivative Works thereof.
|
||||
+
|
||||
+"Contribution" shall mean any work of authorship, including the
|
||||
+original version of the Work and any modifications or additions to
|
||||
+that Work or Derivative Works thereof, that is intentionally submitted
|
||||
+to Licensor for inclusion in the Work by the copyright owner or by an
|
||||
+individual or Legal Entity authorized to submit on behalf of the
|
||||
+copyright owner. For the purposes of this definition, "submitted"
|
||||
+means any form of electronic, verbal, or written communication sent to
|
||||
+the Licensor or its representatives, including but not limited to
|
||||
+communication on electronic mailing lists, source code control
|
||||
+systems, and issue tracking systems that are managed by, or on behalf
|
||||
+of, the Licensor for the purpose of discussing and improving the Work,
|
||||
+but excluding communication that is conspicuously marked or otherwise
|
||||
+designated in writing by the copyright owner as "Not a Contribution."
|
||||
+
|
||||
+"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
+on behalf of whom a Contribution has been received by Licensor and
|
||||
+subsequently incorporated within the Work.
|
||||
+
|
||||
+2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
+this License, each Contributor hereby grants to You a perpetual,
|
||||
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
+copyright license to reproduce, prepare Derivative Works of, publicly
|
||||
+display, publicly perform, sublicense, and distribute the Work and
|
||||
+such Derivative Works in Source or Object form.
|
||||
+
|
||||
+3. Grant of Patent License. Subject to the terms and conditions of
|
||||
+this License, each Contributor hereby grants to You a perpetual,
|
||||
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except
|
||||
+as stated in this section) patent license to make, have made, use,
|
||||
+offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
+such license applies only to those patent claims licensable by such
|
||||
+Contributor that are necessarily infringed by their Contribution(s)
|
||||
+alone or by combination of their Contribution(s) with the Work to
|
||||
+which such Contribution(s) was submitted. If You institute patent
|
||||
+litigation against any entity (including a cross-claim or counterclaim
|
||||
+in a lawsuit) alleging that the Work or a Contribution incorporated
|
||||
+within the Work constitutes direct or contributory patent
|
||||
+infringement, then any patent licenses granted to You under this
|
||||
+License for that Work shall terminate as of the date such litigation
|
||||
+is filed.
|
||||
+
|
||||
+4. Redistribution. You may reproduce and distribute copies of the Work
|
||||
+or Derivative Works thereof in any medium, with or without
|
||||
+modifications, and in Source or Object form, provided that You meet
|
||||
+the following conditions:
|
||||
+
|
||||
+ You must give any other recipients of the Work or Derivative Works
|
||||
+ a copy of this License; and
|
||||
+
|
||||
+ You must cause any modified files to carry prominent notices
|
||||
+ stating that You changed the files; and
|
||||
+
|
||||
+ You must retain, in the Source form of any Derivative Works that
|
||||
+ You distribute, all copyright, patent, trademark, and attribution
|
||||
+ notices from the Source form of the Work, excluding those notices
|
||||
+ that do not pertain to any part of the Derivative Works; and
|
||||
+
|
||||
+ If the Work includes a "NOTICE" text file as part of its
|
||||
+ distribution, then any Derivative Works that You distribute must
|
||||
+ include a readable copy of the attribution notices contained
|
||||
+ within such NOTICE file, excluding those notices that do not
|
||||
+ pertain to any part of the Derivative Works, in at least one of
|
||||
+ the following places: within a NOTICE text file distributed as
|
||||
+ part of the Derivative Works; within the Source form or
|
||||
+ documentation, if provided along with the Derivative Works; or,
|
||||
+ within a display generated by the Derivative Works, if and
|
||||
+ wherever such third-party notices normally appear. The contents of
|
||||
+ the NOTICE file are for informational purposes only and do not
|
||||
+ modify the License. You may add Your own attribution notices
|
||||
+ within Derivative Works that You distribute, alongside or as an
|
||||
+ addendum to the NOTICE text from the Work, provided that such
|
||||
+ additional attribution notices cannot be construed as modifying
|
||||
+ the License. You may add Your own copyright statement to Your
|
||||
+ modifications and may provide additional or different license
|
||||
+ terms and conditions for use, reproduction, or distribution of
|
||||
+ Your modifications, or for any such Derivative Works as a whole,
|
||||
+ provided Your use, reproduction, and distribution of the Work
|
||||
+ otherwise complies with the conditions stated in this License.
|
||||
+
|
||||
+5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
+any Contribution intentionally submitted for inclusion in the Work by
|
||||
+You to the Licensor shall be under the terms and conditions of this
|
||||
+License, without any additional terms or conditions. Notwithstanding
|
||||
+the above, nothing herein shall supersede or modify the terms of any
|
||||
+separate license agreement you may have executed with Licensor
|
||||
+regarding such Contributions.
|
||||
+
|
||||
+6. Trademarks. This License does not grant permission to use the trade
|
||||
+names, trademarks, service marks, or product names of the Licensor,
|
||||
+except as required for reasonable and customary use in describing the
|
||||
+origin of the Work and reproducing the content of the NOTICE file.
|
||||
+
|
||||
+7. Disclaimer of Warranty. Unless required by applicable law or agreed
|
||||
+to in writing, Licensor provides the Work (and each Contributor
|
||||
+provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
+CONDITIONS OF ANY KIND, either express or implied, including, without
|
||||
+limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
+MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
|
||||
+responsible for determining the appropriateness of using or
|
||||
+redistributing the Work and assume any risks associated with Your
|
||||
+exercise of permissions under this License.
|
||||
+
|
||||
+8. Limitation of Liability. In no event and under no legal theory,
|
||||
+whether in tort (including negligence), contract, or otherwise, unless
|
||||
+required by applicable law (such as deliberate and grossly negligent
|
||||
+acts) or agreed to in writing, shall any Contributor be liable to You
|
||||
+for damages, including any direct, indirect, special, incidental, or
|
||||
+consequential damages of any character arising as a result of this
|
||||
+License or out of the use or inability to use the Work (including but
|
||||
+not limited to damages for loss of goodwill, work stoppage, computer
|
||||
+failure or malfunction, or any and all other commercial damages or
|
||||
+losses), even if such Contributor has been advised of the possibility
|
||||
+of such damages.
|
||||
+
|
||||
+9. Accepting Warranty or Additional Liability. While redistributing
|
||||
+the Work or Derivative Works thereof, You may choose to offer, and
|
||||
+charge a fee for, acceptance of support, warranty, indemnity, or other
|
||||
+liability obligations and/or rights consistent with this
|
||||
+License. However, in accepting such obligations, You may act only on
|
||||
+Your own behalf and on Your sole responsibility, not on behalf of any
|
||||
+other Contributor, and only if You agree to indemnify, defend, and
|
||||
+hold each Contributor harmless for any liability incurred by, or
|
||||
+claims asserted against, such Contributor by reason of your accepting
|
||||
+any such warranty or additional liability.
|
||||
+
|
||||
+END OF TERMS AND CONDITIONS
|
||||
+APPENDIX: How to apply the Apache License to your work
|
||||
+
|
||||
+To apply the Apache License to your work, attach the following
|
||||
+boilerplate notice, with the fields enclosed by brackets "[]" replaced
|
||||
+with your own identifying information. (Don't include the brackets!)
|
||||
+The text should be enclosed in the appropriate comment syntax for the
|
||||
+file format. We also recommend that a file or class name and
|
||||
+description of purpose be included on the same "printed page" as the
|
||||
+copyright notice for easier identification within third-party
|
||||
+archives.
|
||||
+
|
||||
+ Copyright [yyyy] [name of copyright owner]
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+
|
||||
diff -Naur ../jemalloc-3.0.0.orig/include/jemalloc/internal/atomic.h ./include/jemalloc/internal/atomic.h
|
||||
--- ../jemalloc-3.0.0.orig/include/jemalloc/internal/atomic.h 2012-05-12 02:50:38.000000000 +0200
|
||||
+++ ./include/jemalloc/internal/atomic.h 2012-05-18 15:55:34.457212405 +0200
|
||||
@@ -242,6 +242,33 @@
|
||||
|
||||
return (__sync_sub_and_fetch(p, x));
|
||||
}
|
||||
+#elif (defined(__ppc__) || defined(__PPC__))
|
||||
+// Code fetched from the boost library
|
||||
+//
|
||||
+JEMALLOC_INLINE uint32_t
|
||||
+atomic_add_uint32(uint32_t *p, uint32_t x)
|
||||
+{
|
||||
+ uint32_t prev, temp;
|
||||
+
|
||||
+ asm volatile ("0:\n\t" // retry local label
|
||||
+ "lwarx %0,0,%2\n\t" // load prev and reserve
|
||||
+ "add %1,%0,%3\n\t" // temp = prev + x
|
||||
+ "stwcx. %1,0,%2\n\t" // conditionally store
|
||||
+ "bne- 0b" // start over if we lost
|
||||
+ // the reservation
|
||||
+ //XXX find a cleaner way to define the temp
|
||||
+ //it's not an output
|
||||
+ : "=&r" (prev), "=&r" (temp) // output, temp
|
||||
+ : "b" (p), "r" (x) // inputs
|
||||
+ : "memory", "cc"); // clobbered
|
||||
+ return temp;
|
||||
+}
|
||||
+
|
||||
+JEMALLOC_INLINE uint32_t
|
||||
+atomic_sub_uint32(uint32_t *p, uint32_t x)
|
||||
+{
|
||||
+ return atomic_add_uint32(p, -x);
|
||||
+}
|
||||
#else
|
||||
# error "Missing implementation for 32-bit atomic operations"
|
||||
#endif
|
22
jemalloc-3.0.0.fixes_ptmalloc_lock_all_crash.patch
Normal file
22
jemalloc-3.0.0.fixes_ptmalloc_lock_all_crash.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From upstream git:
|
||||
http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git;a=patch;h=5c710cee783a44061fa2c467ffd8984b8047b90e
|
||||
|
||||
diff -Naur ../jemalloc-3.0.0.orig/src/jemalloc.c ./src/jemalloc.c
|
||||
--- ../jemalloc-3.0.0.orig/src/jemalloc.c 2012-05-12 02:50:38.000000000 +0200
|
||||
+++ ./src/jemalloc.c 2012-05-24 09:25:07.371417566 +0200
|
||||
@@ -1262,11 +1262,10 @@
|
||||
* passed an extra argument for the caller return address, which will be
|
||||
* ignored.
|
||||
*/
|
||||
-JEMALLOC_EXPORT void (* const __free_hook)(void *ptr) = je_free;
|
||||
-JEMALLOC_EXPORT void *(* const __malloc_hook)(size_t size) = je_malloc;
|
||||
-JEMALLOC_EXPORT void *(* const __realloc_hook)(void *ptr, size_t size) =
|
||||
- je_realloc;
|
||||
-JEMALLOC_EXPORT void *(* const __memalign_hook)(size_t alignment, size_t size) =
|
||||
+JEMALLOC_EXPORT void (* __free_hook)(void *ptr) = je_free;
|
||||
+JEMALLOC_EXPORT void *(* __malloc_hook)(size_t size) = je_malloc;
|
||||
+JEMALLOC_EXPORT void *(* __realloc_hook)(void *ptr, size_t size) = je_realloc;
|
||||
+JEMALLOC_EXPORT void *(* __memalign_hook)(size_t alignment, size_t size) =
|
||||
je_memalign;
|
||||
#endif
|
||||
|
11
jemalloc-3.0.0.no_pprof.patch
Normal file
11
jemalloc-3.0.0.no_pprof.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- Makefile.in.orig 2012-05-14 08:25:41.859295446 +0200
|
||||
+++ Makefile.in 2012-05-14 08:25:58.577353251 +0200
|
||||
@@ -69,7 +69,7 @@
|
||||
LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
|
||||
|
||||
# Lists of files.
|
||||
-BINS := $(srcroot)bin/pprof $(objroot)bin/jemalloc.sh
|
||||
+BINS := $(objroot)bin/jemalloc.sh
|
||||
CHDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h \
|
||||
$(objroot)include/jemalloc/jemalloc_defs$(install_suffix).h
|
||||
CSRCS := $(srcroot)src/jemalloc.c $(srcroot)src/arena.c $(srcroot)src/atomic.c \
|
@ -1,11 +0,0 @@
|
||||
--- configure.orig 2017-01-12 13:18:55.344548013 +0100
|
||||
+++ configure 2017-01-12 13:19:05.284128625 +0100
|
||||
@@ -8742,7 +8742,7 @@
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
- je_cv_thp=yes
|
||||
+ je_cv_thp=no
|
||||
else
|
||||
je_cv_thp=no
|
||||
fi
|
@ -1,13 +0,0 @@
|
||||
--- configure.orig 2017-12-14 12:15:32.517920736 +0100
|
||||
+++ configure 2017-12-14 12:16:22.608660037 +0100
|
||||
@@ -6865,10 +6865,6 @@
|
||||
fi
|
||||
;;
|
||||
powerpc*)
|
||||
- cat >>confdefs.h <<_ACEOF
|
||||
-#define HAVE_ALTIVEC
|
||||
-_ACEOF
|
||||
-
|
||||
CPU_SPINWAIT='__asm__ volatile("or 31,31,31")'
|
||||
;;
|
||||
*)
|
13
jemalloc-armv5-force-atomic.patch
Normal file
13
jemalloc-armv5-force-atomic.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- jemalloc-2.2.5/include/jemalloc/internal/atomic.h.orig 2012-04-21 10:50:06.000000000 -0400
|
||||
+++ jemalloc-2.2.5/include/jemalloc/internal/atomic.h 2012-04-21 10:50:21.000000000 -0400
|
||||
@@ -105,7 +105,9 @@
|
||||
|
||||
/******************************************************************************/
|
||||
/* 32-bit operations. */
|
||||
-#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
|
||||
+#if ( defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) \
|
||||
+ || defined(__ARM_ARCH_5T__) \
|
||||
+ || defined(__ARM_ARCH_5TE__) )
|
||||
JEMALLOC_INLINE uint32_t
|
||||
atomic_add_uint32(uint32_t *p, uint32_t x)
|
||||
{
|
238
jemalloc.spec
238
jemalloc.spec
@ -1,19 +1,22 @@
|
||||
Name: jemalloc
|
||||
Version: 5.2.1
|
||||
Version: 3.4.0
|
||||
|
||||
Release: 4%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: General-purpose scalable concurrent malloc implementation
|
||||
|
||||
Group: System Environment/Libraries
|
||||
License: BSD
|
||||
URL: http://www.canonware.com/jemalloc/
|
||||
Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2
|
||||
Source0: http://www.canonware.com/download/jemalloc/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: gcc
|
||||
# Remove pprof, as it already exists in google-perftools
|
||||
Patch0: jemalloc-3.0.0.no_pprof.patch
|
||||
# ARMv5tel has no atomic operations
|
||||
Patch2: jemalloc-armv5-force-atomic.patch
|
||||
# RHEL5/POWER has no atomic operations
|
||||
Patch3: jemalloc-3.0.0.atomic_h_ppc_32bit_operations.patch
|
||||
BuildRequires: /usr/bin/xsltproc
|
||||
BuildRequires: perl-generators
|
||||
%ifnarch s390 %{mips}
|
||||
BuildRequires: valgrind-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
General-purpose scalable concurrent malloc(3) implementation.
|
||||
@ -22,6 +25,7 @@ This distribution is the stand-alone "portable" implementation of %{name}.
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
@ -29,46 +33,17 @@ developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
|
||||
# Override PAGESIZE, bz #1545539
|
||||
%ifarch %ix86 %arm x86_64 s390x
|
||||
%define lg_page --with-lg-page=12
|
||||
%patch2 -p1 -b .armv5tel
|
||||
%ifarch ppc ppc64
|
||||
%if 0%{?rhel} == 5
|
||||
%patch3 -b .ppc
|
||||
%endif
|
||||
|
||||
%ifarch ppc64 ppc64le aarch64
|
||||
%define lg_page --with-lg-page=16
|
||||
%endif
|
||||
|
||||
# Disable thp on systems not supporting this for now
|
||||
%ifarch %ix86 %arm aarch64 s390x
|
||||
%define disable_thp --disable-thp
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
%ifarch %ix86
|
||||
%if 0%{?fedora} >= 21
|
||||
CFLAGS="%{optflags} -msse2"
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
export LDFLAGS="%{?__global_ldflags} -lrt"
|
||||
%endif
|
||||
|
||||
echo "For debugging package builders"
|
||||
echo "What is the pagesize?"
|
||||
getconf PAGESIZE
|
||||
|
||||
echo "What mm features are available?"
|
||||
ls /sys/kernel/mm
|
||||
ls /sys/kernel/mm/transparent_hugepage || true
|
||||
cat /sys/kernel/mm/transparent_hugepage/enabled || true
|
||||
|
||||
echo "What kernel version and config is this?"
|
||||
uname -a
|
||||
|
||||
%configure %{?disable_thp} %{?lg_page}
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
@ -86,182 +61,37 @@ rm %{buildroot}%{_datadir}/doc/%{name}/jemalloc.html
|
||||
find %{buildroot}%{_libdir}/ -name '*.a' -exec rm -vf {} ';'
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libjemalloc.so.*
|
||||
%{_bindir}/jemalloc.sh
|
||||
%doc COPYING README VERSION
|
||||
%doc doc/jemalloc.html
|
||||
%ifarch ppc ppc64
|
||||
%if 0%{?rhel} == 5
|
||||
%doc COPYING.epel5-ppc
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/jemalloc
|
||||
%{_bindir}/jemalloc-config
|
||||
%{_libdir}/pkgconfig/jemalloc.pc
|
||||
%{_bindir}/jeprof
|
||||
%{_libdir}/libjemalloc.so
|
||||
%{_mandir}/man3/jemalloc.3*
|
||||
|
||||
%ldconfig_scriptlets
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Aug 06 2019 Ingvar Hagelund <ingvar@redpill-linpro.com> - 5.2.1-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Wed Apr 03 2019 Ingvar Hagelund <ingvar@redpill-linpro.com> - 5.2.0-1
|
||||
- New upstream release
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Jul 18 2018 Joe Orton <jorton@redhat.com> - 5.1.0-3
|
||||
- move jemalloc.pc and jemalloc-config to -devel (#1593484)
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed May 09 2018 Ingvar Hagelund <ingvar@redpill-linpro.com> - 5.1.0-1
|
||||
- New upstream release
|
||||
- Removed patches merged upstream
|
||||
|
||||
* Thu Mar 08 2018 Ingvar Hagelund <ingvar@redpill-linpro.com> - 5.0.1-5
|
||||
- Actually, specify pagesizes according to arches, closes #1545539
|
||||
- Remove patch disabling thp as this is now handled by configure, see
|
||||
upstream issue 526
|
||||
|
||||
* Tue Mar 06 2018 Ingvar Hagelund <ingvar@redpill-linpro.com> - 5.0.1-4
|
||||
- Support different pagesizes, ie. build with --with-lg-page=16, closes #1545539
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.0.1-2
|
||||
- Switch to %%ldconfig_scriptlets
|
||||
|
||||
* Wed Dec 13 2017 Ingvar Hagelund <ingvar@redpill-linpro.com> - 5.0.1-1
|
||||
- New upstream release
|
||||
- Added patch for upstream issue #979 "Test suite segv on arm64"
|
||||
- Moved jeprof util to jemalloc-devel, to give less dependencies
|
||||
on the library package, closes bz #1519586
|
||||
- Respun the patch removing explicit altivec usage. Not all
|
||||
ppc64 have altive
|
||||
|
||||
* Wed Aug 16 2017 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.5.0-4
|
||||
- Rather use ifarch than checking builder kernel for thp support
|
||||
- Cleanup; removed unnecessary patch for atomic ops on arm, pulled el5 support,
|
||||
use ix86 macro for ifarch i386 and friends
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Wed Mar 01 2017 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.5.0-1
|
||||
- New upstream release
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Thu Jan 12 2017 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.4.0-2
|
||||
- Disable transparent hugepages on systems not supporting them
|
||||
|
||||
* Fri Dec 09 2016 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.4.0-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Nov 09 2016 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.3.1-1
|
||||
- New upstream release
|
||||
- Removed patches from upstream that are merged
|
||||
|
||||
* Tue Nov 01 2016 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.2.1-2
|
||||
- Fixes for upstream bug #392. Package will now build on el5/ppc,
|
||||
el5/i386 and el6/i386
|
||||
|
||||
* Tue Aug 23 2016 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.2.1-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Aug 11 2016 Michal Toman <mtoman@fedoraproject.org> - 4.1.1-2
|
||||
- No valgrind on MIPS (#1366685)
|
||||
|
||||
* Wed May 04 2016 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.1.1-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Feb 29 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 4.1.0-1
|
||||
- Update to 4.1.0 (#1312699)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Sat Oct 24 2015 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.0.4-1
|
||||
- New upstream release
|
||||
|
||||
* Fri Sep 25 2015 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.0.3-1
|
||||
- New upstream release
|
||||
- Removed oom test patch, it has been fixed upstream
|
||||
|
||||
* Thu Sep 24 2015 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.0.2-2
|
||||
- oom test also fails on 32bit ppc, so patch it out there as well
|
||||
|
||||
* Tue Sep 22 2015 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.0.2-1
|
||||
- New upstream release
|
||||
- Added a patch removing a non-critical test that fails on i386
|
||||
- Removed now included negative bitshift patch.
|
||||
|
||||
* Wed Aug 19 2015 Ingvar Hagelund <ingvar@redpill-linpro.com> - 4.0.0-1
|
||||
- New upstream release
|
||||
- Removed the no-pprof patch, as jemalloc now comes with its own prof variant
|
||||
- Removed atomic.h patch for armv5tel. jemalloc now provides a specific
|
||||
variant for armv5tel
|
||||
- Added a patch from upstream for errnous bitshift by negative amounts on pagesize >8KiB
|
||||
- Added -lrt to LDFLAGS for rhel<7
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Mon Aug 18 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.6.0-8
|
||||
- valgrind-devel is not available on s390, closes #1131014
|
||||
|
||||
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Fri Aug 15 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.6.0-6
|
||||
- bz #1106933 fix only for fedora 21 and above
|
||||
|
||||
* Fri Aug 15 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.6.0-5
|
||||
- Added valgrind-devel to BuildRequires, fixing bz #974270
|
||||
|
||||
* Fri Aug 15 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.6.0-4
|
||||
- Added an i686 build fixing bz #1106933
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Tue Apr 01 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.6.0-2
|
||||
- Patch that removes explicit altivec on el5/ppc
|
||||
|
||||
* Mon Mar 31 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.6.0-1
|
||||
- New upstream release. This release fixes a critical regression
|
||||
|
||||
* Fri Mar 28 2014 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.5.1-1
|
||||
- New upstream release
|
||||
- Updated nopprof patch to match new release
|
||||
- Fixed a few bogus changelog entries
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Fri Jun 07 2013 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.4.0-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Mar 11 2013 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.3.1-1
|
||||
* Wed Mar 11 2013 Ingvar Hagelund <ingvar@redpill-linpro.com> - 3.3.1-1
|
||||
- New upstream release
|
||||
- Dropped s390 patch, it's in upstream now.
|
||||
|
||||
@ -315,10 +145,10 @@ find %{buildroot}%{_libdir}/ -name '*.a' -exec rm -vf {} ';'
|
||||
- New upstream release, closes #727103
|
||||
- Updated no_pprof patch for 2.2.2
|
||||
|
||||
* Thu Mar 31 2011 Ingvar Hagelund <ingvar@redpill-linpro.com> - 2.2.1-1
|
||||
* Tue Mar 31 2011 Ingvar Hagelund <ingvar@redpill-linpro.com> - 2.2.1-1
|
||||
- New upstream release
|
||||
|
||||
* Sun Mar 27 2011 Ingvar Hagelund <ingvar@redpill-linpro.com> - 2.2.0-1
|
||||
* Tue Mar 27 2011 Ingvar Hagelund <ingvar@redpill-linpro.com> - 2.2.0-1
|
||||
- New upstream release
|
||||
- Updated no_pprof patch for 2.2.0
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
From 8cfc9dec37b312a2686f602bbcdd102ca07cca99 Mon Sep 17 00:00:00 2001
|
||||
From: David Goldblatt <davidgoldblatt@fb.com>
|
||||
Date: Fri, 29 Sep 2017 13:54:08 -0700
|
||||
Subject: [PATCH] ARM: Don't extend bit LG_VADDR to compute high address bits.
|
||||
|
||||
In userspace ARM on Linux, zero-ing the high bits is the correct way to do this.
|
||||
This doesn't fix the fact that we currently set LG_VADDR to 48 on ARM, when in
|
||||
fact larger virtual address sizes are coming soon. We'll cross that bridge when
|
||||
we come to it.
|
||||
---
|
||||
include/jemalloc/internal/rtree.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/include/jemalloc/internal/rtree.h b/include/jemalloc/internal/rtree.h
|
||||
index b5d4db39..4563db23 100644
|
||||
--- a/include/jemalloc/internal/rtree.h
|
||||
+++ b/include/jemalloc/internal/rtree.h
|
||||
@@ -178,9 +178,21 @@ rtree_leaf_elm_bits_read(tsdn_t *tsdn, rtree_t *rtree, rtree_leaf_elm_t *elm,
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE extent_t *
|
||||
rtree_leaf_elm_bits_extent_get(uintptr_t bits) {
|
||||
+# ifdef __aarch64__
|
||||
+ /*
|
||||
+ * aarch64 doesn't sign extend the highest virtual address bit to set
|
||||
+ * the higher ones. Instead, the high bits gets zeroed.
|
||||
+ */
|
||||
+ uintptr_t high_bit_mask = ((uintptr_t)1 << LG_VADDR) - 1;
|
||||
+ /* Mask off the slab bit. */
|
||||
+ uintptr_t low_bit_mask = ~(uintptr_t)1;
|
||||
+ uintptr_t mask = high_bit_mask & low_bit_mask;
|
||||
+ return (extent_t *)(bits & mask);
|
||||
+# else
|
||||
/* Restore sign-extended high bits, mask slab bit. */
|
||||
return (extent_t *)((uintptr_t)((intptr_t)(bits << RTREE_NHIB) >>
|
||||
RTREE_NHIB) & ~((uintptr_t)0x1));
|
||||
+# endif
|
||||
}
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE szind_t
|
Loading…
Reference in New Issue
Block a user