CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: rin Date: Wed Dec 16 01:20:19 UTC 2020 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Correct and extend comments on VA for alpha. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.13 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.14 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.13 Thu Jun 4 00:45:32 2020 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Wed Dec 16 01:20:19 2020 @@ -48,7 +48,14 @@ #ifdef _LP64 /* XXX: I will take care of this later */ # ifdef __alpha__ -# define LG_VADDR 43 /* bit 42 indicates direct map, 42--63 are same */ +/* + * Bit 42 indicates kernel space. Bits 42--63 must be same. For user space, + * VA can be regarded to have 43 significant bits with sign-extension to + * 64 bits. ``Negative'' addresses are not used in this case. Alternatively, + * VA can also be regarded to have 42 significant bits with zero-extension. + * See rtree_leaf_elm_bits_extent_get() in rtree.h for more details. + */ +# define LG_VADDR 43 # else # define LG_VADDR 48 # endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: joerg Date: Tue Apr 21 22:27:09 UTC 2020 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Drop obsolete special case for clang/ppc. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.11 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.12 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.11 Fri Aug 9 08:10:39 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Tue Apr 21 22:27:09 2020 @@ -156,15 +156,7 @@ /* Non-empty if the tls_model attribute is supported. */ #if !defined(__vax__) && !defined(__mc68010__) -# if defined(__clang__) && defined(__ppc__) && defined(__pic__) -/* - * XXX: In pic mode clang generates PPC32_GOT instead of PPC32_PICGOT for - * tls model initial-exec. It shouldn't; see PPCISelLowering.h - */ -# define JEMALLOC_TLS_MODEL __attribute__((tls_model("global-dynamic"))) -# else # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) -# endif #endif /*
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: kamil Date: Fri Feb 14 01:52:35 UTC 2020 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: hash.h Log Message: Fix undefined behavior in hash.h (jemalloc) Cherry-pick upstream patch: Fix Undefined Behavior in hash.h hash.h:200:27, left shift of 250 by 24 places cannot be represented in type 'int' https://github.com/jemalloc/jemalloc/commit/7fd22f7b2ea5ce2540563ece8e2d30a5316ac857 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/jemalloc/include/jemalloc/internal/hash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/hash.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/hash.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/hash.h:1.3 --- src/external/bsd/jemalloc/include/jemalloc/internal/hash.h:1.2 Mon Mar 4 20:21:18 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/hash.h Fri Feb 14 01:52:35 2020 @@ -183,21 +183,21 @@ hash_x86_128(const void *key, const int k4 *= c4; k4 = hash_rotl_32(k4, 18); k4 *= c1; h4 ^= k4; /*FALLTHROUGH*/ - case 12: k3 ^= tail[11] << 24; /*FALLTHROUGH*/ + case 12: k3 ^= (uint32_t)tail[11] << 24; /*FALLTHROUGH*/ case 11: k3 ^= tail[10] << 16; /*FALLTHROUGH*/ case 10: k3 ^= tail[ 9] << 8; /*FALLTHROUGH*/ case 9: k3 ^= tail[ 8] << 0; k3 *= c3; k3 = hash_rotl_32(k3, 17); k3 *= c4; h3 ^= k3; /*FALLTHROUGH*/ - case 8: k2 ^= tail[ 7] << 24; /*FALLTHROUGH*/ + case 8: k2 ^= (uint32_t)tail[ 7] << 24; /*FALLTHROUGH*/ case 7: k2 ^= tail[ 6] << 16; /*FALLTHROUGH*/ case 6: k2 ^= tail[ 5] << 8; /*FALLTHROUGH*/ case 5: k2 ^= tail[ 4] << 0; k2 *= c2; k2 = hash_rotl_32(k2, 16); k2 *= c3; h2 ^= k2; /*FALLTHROUGH*/ - case 4: k1 ^= tail[ 3] << 24; /*FALLTHROUGH*/ + case 4: k1 ^= (uint32_t)tail[ 3] << 24; /*FALLTHROUGH*/ case 3: k1 ^= tail[ 2] << 16; /*FALLTHROUGH*/ case 2: k1 ^= tail[ 1] << 8; /*FALLTHROUGH*/ case 1: k1 ^= tail[ 0] << 0;
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Sun May 5 18:14:19 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: PR/54133: Sevan Janiyan: Binaries fail to execute Prefer MAX_PAGE_SHIFT over PAGE_SHIFT To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.8 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.9 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.8 Fri Apr 26 19:57:00 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Sun May 5 14:14:19 2019 @@ -202,10 +202,10 @@ /* One page is 2^LG_PAGE bytes. */ #include -#if defined(PAGE_SHIFT) -#define LG_PAGE PAGE_SHIFT -#elif defined(MAX_PAGE_SHIFT) +#if defined(MAX_PAGE_SHIFT) #define LG_PAGE MAX_PAGE_SHIFT +#elif defined(PAGE_SHIFT) +#define LG_PAGE PAGE_SHIFT #else #error "PAGE_SHIFT is not defined" #endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Fri Apr 26 23:57:00 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Back to using MAX_PAGE_SHIFT To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.7 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.8 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.7 Thu Apr 18 12:44:25 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Fri Apr 26 19:57:00 2019 @@ -204,8 +204,8 @@ #include #if defined(PAGE_SHIFT) #define LG_PAGE PAGE_SHIFT -#elif defined(MIN_PAGE_SHIFT) -#define LG_PAGE MIN_PAGE_SHIFT +#elif defined(MAX_PAGE_SHIFT) +#define LG_PAGE MAX_PAGE_SHIFT #else #error "PAGE_SHIFT is not defined" #endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Thu Apr 18 16:44:26 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: no tls for sun2 either. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.6 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.7 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.6 Tue Apr 9 13:00:38 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Thu Apr 18 12:44:25 2019 @@ -151,7 +151,7 @@ /* #undef JEMALLOC_MUTEX_INIT_CB */ /* Non-empty if the tls_model attribute is supported. */ -#ifndef __vax__ +#if !defined(__vax__) && !defined(__mc68010__) #define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif @@ -235,7 +235,7 @@ /* #undef JEMALLOC_RETAIN */ /* TLS is used to map arenas and magazine caches to threads. */ -#ifndef __vax__ +#if !defined(__vax__) && !defined(__mc68010__) #define JEMALLOC_TLS #endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Sun Apr 14 19:13:18 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: tsd_malloc_thread_cleanup.h tsd_tls.h Log Message: Declare the tls model in external declarations. Pointed out by joerg. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h \ src/external/bsd/jemalloc/include/jemalloc/internal/tsd_tls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h Sun Apr 14 15:13:17 2019 @@ -3,8 +3,8 @@ #endif #define JEMALLOC_INTERNAL_TSD_MALLOC_THREAD_CLEANUP_H -extern __thread tsd_t tsd_tls; -extern __thread bool tsd_initialized; +extern __thread tsd_t JEMALLOC_TLS_MODEL tsd_tls; +extern __thread bool JEMALLOC_TLS_MODEL tsd_initialized; extern bool tsd_booted; /* Initialization/cleanup. */ Index: src/external/bsd/jemalloc/include/jemalloc/internal/tsd_tls.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/tsd_tls.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/tsd_tls.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/tsd_tls.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/tsd_tls.h Sun Apr 14 15:13:17 2019 @@ -3,7 +3,7 @@ #endif #define JEMALLOC_INTERNAL_TSD_TLS_H -extern __thread tsd_t tsd_tls; +extern __thread tsd_t JEMALLOC_TLS_MODEL tsd_tls; extern pthread_key_t tsd_tsd; extern bool tsd_booted;
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Tue Apr 9 17:00:38 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Use MIN_PAGE_SHIFT if PAGE_SHIFT is not available instead of MAX_PAGE_SHIFT. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.5 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.6 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.5 Tue Apr 2 17:19:20 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Tue Apr 9 13:00:38 2019 @@ -204,8 +204,8 @@ #include #if defined(PAGE_SHIFT) #define LG_PAGE PAGE_SHIFT -#elif defined(MAX_PAGE_SHIFT) -#define LG_PAGE MAX_PAGE_SHIFT +#elif defined(MIN_PAGE_SHIFT) +#define LG_PAGE MIN_PAGE_SHIFT #else #error "PAGE_SHIFT is not defined" #endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Tue Apr 2 21:19:20 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Vax ain't having any of that newfangled TLS crap (yet). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.4 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.5 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.4 Fri Mar 29 09:04:00 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Tue Apr 2 17:19:20 2019 @@ -151,7 +151,9 @@ /* #undef JEMALLOC_MUTEX_INIT_CB */ /* Non-empty if the tls_model attribute is supported. */ +#ifndef __vax__ #define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) +#endif /* * JEMALLOC_DEBUG enables assertions and other sanity checks, and disables @@ -233,7 +235,9 @@ /* #undef JEMALLOC_RETAIN */ /* TLS is used to map arenas and magazine caches to threads. */ +#ifndef __vax__ #define JEMALLOC_TLS +#endif /* * Used to mark unreachable code to quiet "end of non-void" compiler warnings.
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Fri Mar 29 13:04:01 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: there is no elifdef To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.3 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.4 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.3 Fri Mar 29 08:50:30 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Fri Mar 29 09:04:00 2019 @@ -200,9 +200,9 @@ /* One page is 2^LG_PAGE bytes. */ #include -#ifdef PAGE_SHIFT +#if defined(PAGE_SHIFT) #define LG_PAGE PAGE_SHIFT -#elifdef MAX_PAGE_SHIFT +#elif defined(MAX_PAGE_SHIFT) #define LG_PAGE MAX_PAGE_SHIFT #else #error "PAGE_SHIFT is not defined"
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Fri Mar 29 12:50:30 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Change strategy: instead of always defining PAGE_SHIFT in vmparam.h, fail back to using MAX_PAGE_SHIFT. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.3 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.2 Tue Mar 5 17:39:21 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Fri Mar 29 08:50:30 2019 @@ -200,7 +200,13 @@ /* One page is 2^LG_PAGE bytes. */ #include +#ifdef PAGE_SHIFT #define LG_PAGE PAGE_SHIFT +#elifdef MAX_PAGE_SHIFT +#define LG_PAGE MAX_PAGE_SHIFT +#else +#error "PAGE_SHIFT is not defined" +#endif /* * One huge page is 2^LG_HUGEPAGE bytes. Note that this is defined even if the
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Thu Mar 28 11:56:56 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: size_classes.h Log Message: Add 2K page size tables (sun2) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.3 src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.4 --- src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.3 Wed Mar 27 12:16:14 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Thu Mar 28 07:56:56 2019 @@ -4165,6 +4165,470 @@ #define LARGE_MAXCLASS size_t)1) << 62) + (((size_t)3) << 60)) #endif +#if (LG_SIZEOF_PTR == 2 && LG_TINY_MIN == 3 && LG_QUANTUM == 3 && LG_PAGE == 11) +#define SIZE_CLASSES \ + /* index, lg_grp, lg_delta, ndelta, psz, bin, pgs, lg_delta_lookup */ \ +SC( 0, 3,3, 0, no, yes, 1, 3) \ +SC( 1, 3,3, 1, no, yes, 1, 3) \ +SC( 2, 3,3, 2, no, yes, 3, 3) \ +SC( 3, 3,3, 3, no, yes, 1, 3) \ + \ +SC( 4, 5,3, 1, no, yes, 5, 3) \ +SC( 5, 5,3, 2, no, yes, 3, 3) \ +SC( 6, 5,3, 3, no, yes, 7, 3) \ +SC( 7, 5,3, 4, no, yes, 1, 3) \ + \ +SC( 8, 6,4, 1, no, yes, 5, 4) \ +SC( 9, 6,4, 2, no, yes, 3, 4) \ +SC( 10, 6,4, 3, no, yes, 7, 4) \ +SC( 11, 6,4, 4, no, yes, 1, 4) \ + \ +SC( 12, 7,5, 1, no, yes, 5, 5) \ +SC( 13, 7,5, 2, no, yes, 3, 5) \ +SC( 14, 7,5, 3, no, yes, 7, 5) \ +SC( 15, 7,5, 4, no, yes, 1, 5) \ + \ +SC( 16, 8,6, 1, no, yes, 5, 6) \ +SC( 17, 8,6, 2, no, yes, 3, 6) \ +SC( 18, 8,6, 3, no, yes, 7, 6) \ +SC( 19, 8,6, 4, no, yes, 1, 6) \ + \ +SC( 20, 9,7, 1, no, yes, 5, 7) \ +SC( 21, 9,7, 2, no, yes, 3, 7) \ +SC( 22, 9,7, 3, no, yes, 7, 7) \ +SC( 23, 9,7, 4, no, yes, 1, 7) \ + \ +SC( 24, 10,8, 1, no, yes, 5, 8) \ +SC( 25, 10,8, 2, no, yes, 3, 8) \ +SC( 26, 10,8, 3, no, yes, 7, 8) \ +SC( 27, 10,8, 4, yes, yes, 1, 8) \ + \ +SC( 28, 11,9, 1, no, yes, 5, 9) \ +SC( 29, 11,9, 2, no, yes, 3, 9) \ +SC( 30, 11,9, 3, no, yes, 7, 9) \ +SC( 31, 11,9, 4, yes, yes, 2, 9) \ + \ +SC( 32, 12, 10, 1, no, yes, 5, no) \ +SC( 33, 12, 10, 2, yes, yes, 3, no) \ +SC( 34, 12, 10, 3, no, yes, 7, no) \ +SC( 35, 12, 10, 4, yes, no, 0, no) \ + \ +SC( 36, 13, 11, 1, yes, no, 0, no) \ +SC( 37, 13, 11, 2, yes, no, 0, no) \ +SC( 38, 13, 11, 3, yes, no, 0, no) \ +SC( 39, 13, 11, 4, yes, no, 0, no) \ + \ +SC( 40, 14, 12, 1, yes, no, 0, no) \ +SC( 41, 14, 12, 2, yes, no, 0, no) \ +SC( 42, 14, 12, 3, yes, no, 0, no) \ +SC( 43, 14, 12, 4, yes, no, 0, no) \ + \ +SC( 44, 15, 13, 1, yes, no, 0, no) \ +SC( 45, 15, 13, 2, yes, no, 0, no) \ +SC( 46, 15, 13, 3, yes, no, 0, no) \ +SC( 47, 15, 13, 4, yes, no, 0, no) \ + \ +SC( 48, 16, 14, 1, yes, no, 0, no) \ +SC( 49, 16, 14, 2, yes, no, 0, no) \ +SC( 50, 16, 14, 3, yes, no, 0, no) \ +SC( 51, 16,
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Wed Mar 27 17:02:20 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_types.h Log Message: alignment for sh3 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.3 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.4 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.3 Wed Mar 27 11:33:52 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Wed Mar 27 13:02:20 2019 @@ -97,6 +97,9 @@ typedef int malloc_cpuid_t; # if defined(__riscv) || defined(__riscv__) #define LG_QUANTUM 4 # endif +# ifdef __sh3__ +#define LG_QUANTUM 3 +# endif # ifdef __s390__ #define LG_QUANTUM 4 # endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Wed Mar 27 16:16:14 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: size_classes.h Log Message: add tables for 16K page sizes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.3 --- src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.2 Thu Mar 21 05:42:44 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Wed Mar 27 12:16:14 2019 @@ -2789,6 +2789,1382 @@ #define LARGE_MAXCLASS size_t)1) << 62) + (((size_t)3) << 60)) #endif +#if (LG_SIZEOF_PTR == 2 && LG_TINY_MIN == 3 && LG_QUANTUM == 3 && LG_PAGE == 14) +#define SIZE_CLASSES \ + /* index, lg_grp, lg_delta, ndelta, psz, bin, pgs, lg_delta_lookup */ \ +SC( 0, 3,3, 0, no, yes, 1, 3) \ +SC( 1, 3,3, 1, no, yes, 1, 3) \ +SC( 2, 3,3, 2, no, yes, 3, 3) \ +SC( 3, 3,3, 3, no, yes, 1, 3) \ + \ +SC( 4, 5,3, 1, no, yes, 5, 3) \ +SC( 5, 5,3, 2, no, yes, 3, 3) \ +SC( 6, 5,3, 3, no, yes, 7, 3) \ +SC( 7, 5,3, 4, no, yes, 1, 3) \ + \ +SC( 8, 6,4, 1, no, yes, 5, 4) \ +SC( 9, 6,4, 2, no, yes, 3, 4) \ +SC( 10, 6,4, 3, no, yes, 7, 4) \ +SC( 11, 6,4, 4, no, yes, 1, 4) \ + \ +SC( 12, 7,5, 1, no, yes, 5, 5) \ +SC( 13, 7,5, 2, no, yes, 3, 5) \ +SC( 14, 7,5, 3, no, yes, 7, 5) \ +SC( 15, 7,5, 4, no, yes, 1, 5) \ + \ +SC( 16, 8,6, 1, no, yes, 5, 6) \ +SC( 17, 8,6, 2, no, yes, 3, 6) \ +SC( 18, 8,6, 3, no, yes, 7, 6) \ +SC( 19, 8,6, 4, no, yes, 1, 6) \ + \ +SC( 20, 9,7, 1, no, yes, 5, 7) \ +SC( 21, 9,7, 2, no, yes, 3, 7) \ +SC( 22, 9,7, 3, no, yes, 7, 7) \ +SC( 23, 9,7, 4, no, yes, 1, 7) \ + \ +SC( 24, 10,8, 1, no, yes, 5, 8) \ +SC( 25, 10,8, 2, no, yes, 3, 8) \ +SC( 26, 10,8, 3, no, yes, 7, 8) \ +SC( 27, 10,8, 4, no, yes, 1, 8) \ + \ +SC( 28, 11,9, 1, no, yes, 5, 9) \ +SC( 29, 11,9, 2, no, yes, 3, 9) \ +SC( 30, 11,9, 3, no, yes, 7, 9) \ +SC( 31, 11,9, 4, no, yes, 1, 9) \ + \ +SC( 32, 12, 10, 1, no, yes, 5, no) \ +SC( 33, 12, 10, 2, no, yes, 3, no) \ +SC( 34, 12, 10, 3, no, yes, 7, no) \ +SC( 35, 12, 10, 4, no, yes, 1, no) \ + \ +SC( 36, 13, 11, 1, no, yes, 5, no) \ +SC( 37, 13, 11, 2, no, yes, 3, no) \ +SC( 38, 13, 11, 3, no, yes, 7, no) \ +SC( 39, 13, 11, 4, yes, yes, 1, no) \ + \ +SC( 40, 14, 12, 1, no, yes, 5, no) \ +SC( 41, 14, 12, 2, no, yes, 3, no) \ +SC( 42, 14, 12, 3, no, yes, 7, no) \ +SC( 43, 14, 12, 4, yes, yes, 2, no) \ + \ +SC( 44, 15, 13, 1, no, yes, 5, no) \ +SC( 45, 15, 13, 2, yes, yes, 3, no) \ +SC( 46, 15, 13, 3, no, yes, 7, no) \ +SC( 47, 15, 13, 4, yes, no, 0, no) \ + \ +SC( 48, 16, 14, 1, yes, no, 0, no) \ +SC( 49, 16, 14, 2, yes, no, 0, no) \ +SC( 50, 16, 14, 3, yes, no, 0, no) \ +SC( 51, 16,
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Wed Mar 27 15:33:52 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_types.h Log Message: vaxinate! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.3 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.2 Wed Mar 27 08:38:31 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Wed Mar 27 11:33:52 2019 @@ -110,6 +110,9 @@ typedef int malloc_cpuid_t; # ifdef __le32__ #define LG_QUANTUM 4 # endif +# ifdef __vax__ +#define LG_QUANTUM 4 +# endif # ifndef LG_QUANTUM #error "Unknown minimum alignment for architecture; specify via " "--with-lg-quantum"
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: martin Date: Wed Mar 27 12:38:31 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_types.h Log Message: LG_QUANTUM is 4 for both sparc and sparc64 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.1 Mon Mar 4 17:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Wed Mar 27 12:38:31 2019 @@ -64,7 +64,7 @@ typedef int malloc_cpuid_t; # ifdef __alpha__ #define LG_QUANTUM 4 # endif -# if (defined(__sparc64__) || defined(__sparcv9) || defined(__sparc_v9__)) +# ifdef __sparc__ #define LG_QUANTUM 4 # endif # if (defined(__amd64__) || defined(__x86_64__) || defined(_M_X64))
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: martin Date: Thu Mar 21 09:42:44 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: size_classes.h Log Message: Add size variants for architectures with PGSHIFT = 13 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.1 Mon Mar 4 17:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Thu Mar 21 09:42:44 2019 @@ -1413,6 +1413,1382 @@ #define LARGE_MAXCLASS size_t)1) << 62) + (((size_t)3) << 60)) #endif +#if (LG_SIZEOF_PTR == 2 && LG_TINY_MIN == 3 && LG_QUANTUM == 3 && LG_PAGE == 13) +#define SIZE_CLASSES \ + /* index, lg_grp, lg_delta, ndelta, psz, bin, pgs, lg_delta_lookup */ \ +SC( 0, 3,3, 0, no, yes, 1, 3) \ +SC( 1, 3,3, 1, no, yes, 1, 3) \ +SC( 2, 3,3, 2, no, yes, 3, 3) \ +SC( 3, 3,3, 3, no, yes, 1, 3) \ + \ +SC( 4, 5,3, 1, no, yes, 5, 3) \ +SC( 5, 5,3, 2, no, yes, 3, 3) \ +SC( 6, 5,3, 3, no, yes, 7, 3) \ +SC( 7, 5,3, 4, no, yes, 1, 3) \ + \ +SC( 8, 6,4, 1, no, yes, 5, 4) \ +SC( 9, 6,4, 2, no, yes, 3, 4) \ +SC( 10, 6,4, 3, no, yes, 7, 4) \ +SC( 11, 6,4, 4, no, yes, 1, 4) \ + \ +SC( 12, 7,5, 1, no, yes, 5, 5) \ +SC( 13, 7,5, 2, no, yes, 3, 5) \ +SC( 14, 7,5, 3, no, yes, 7, 5) \ +SC( 15, 7,5, 4, no, yes, 1, 5) \ + \ +SC( 16, 8,6, 1, no, yes, 5, 6) \ +SC( 17, 8,6, 2, no, yes, 3, 6) \ +SC( 18, 8,6, 3, no, yes, 7, 6) \ +SC( 19, 8,6, 4, no, yes, 1, 6) \ + \ +SC( 20, 9,7, 1, no, yes, 5, 7) \ +SC( 21, 9,7, 2, no, yes, 3, 7) \ +SC( 22, 9,7, 3, no, yes, 7, 7) \ +SC( 23, 9,7, 4, no, yes, 1, 7) \ + \ +SC( 24, 10,8, 1, no, yes, 5, 8) \ +SC( 25, 10,8, 2, no, yes, 3, 8) \ +SC( 26, 10,8, 3, no, yes, 7, 8) \ +SC( 27, 10,8, 4, no, yes, 1, 8) \ + \ +SC( 28, 11,9, 1, no, yes, 5, 9) \ +SC( 29, 11,9, 2, no, yes, 3, 9) \ +SC( 30, 11,9, 3, no, yes, 7, 9) \ +SC( 31, 11,9, 4, no, yes, 1, 9) \ + \ +SC( 32, 12, 10, 1, no, yes, 5, no) \ +SC( 33, 12, 10, 2, no, yes, 3, no) \ +SC( 34, 12, 10, 3, no, yes, 7, no) \ +SC( 35, 12, 10, 4, yes, yes, 1, no) \ + \ +SC( 36, 13, 11, 1, no, yes, 5, no) \ +SC( 37, 13, 11, 2, no, yes, 3, no) \ +SC( 38, 13, 11, 3, no, yes, 7, no) \ +SC( 39, 13, 11, 4, yes, yes, 2, no) \ + \ +SC( 40, 14, 12, 1, no, yes, 5, no) \ +SC( 41, 14, 12, 2, yes, yes, 3, no) \ +SC( 42, 14, 12, 3, no, yes, 7, no) \ +SC( 43, 14, 12, 4, yes, no, 0, no) \ + \ +SC( 44, 15, 13, 1, yes, no, 0, no) \ +SC( 45, 15, 13, 2, yes, no, 0, no) \ +SC( 46, 15, 13, 3, yes, no, 0, no) \ +SC( 47, 15, 13, 4, yes, no, 0, no) \ + \ +SC( 48, 16, 14, 1, yes, no, 0, no) \ +SC( 49, 16, 14, 2, yes, no, 0, no) \ +SC( 50, 16, 14, 3, yes, no, 0, no) \
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Sun Mar 10 21:52:00 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: prof_inlines_a.h Log Message: one more noreturn To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_a.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_a.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_a.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_a.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_a.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_a.h Sun Mar 10 17:52:00 2019 @@ -41,7 +41,7 @@ prof_accum_add(tsdn_t *tsdn, prof_accum_ return overflow; } -static inline void +static JEMALLOC_NORETURN inline void prof_accum_cancel(tsdn_t *tsdn, prof_accum_t *prof_accum, size_t usize) { cassert(config_prof);
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Tue Mar 5 22:45:11 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: mutex.h witness.h Log Message: Fix debugging compilation To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/witness.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h:1.3 --- src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h:1.2 Mon Mar 4 14:16:31 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h Tue Mar 5 17:45:11 2019 @@ -61,6 +61,9 @@ struct malloc_mutex_s { #if defined(JEMALLOC_DEBUG) witness_t witness; malloc_mutex_lock_order_t lock_order; +#define LOCK_ORDER_INITIALIZER(field, a) field = a, +#else +#define LOCK_ORDER_INITIALIZER(field, a) #endif }; @@ -97,24 +100,35 @@ struct malloc_mutex_s { #ifdef _WIN32 # define MALLOC_MUTEX_INITIALIZER #elif (defined(JEMALLOC_OS_UNFAIR_LOCK)) -# define MALLOC_MUTEX_INITIALIZER \ - {{{MUTEX_PROF_DATA_INITIALIZER, OS_UNFAIR_LOCK_INIT}}, \ - WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} +# define MALLOC_MUTEX_INITIALIZER {{{ \ + .prof_data = MUTEX_PROF_DATA_INITIALIZER, \ + .lock = OS_UNFAIR_LOCK_INIT, \ + }},\ + WITNESS_INITIALIZER(.witness, "mutex", WITNESS_RANK_OMIT) \ + LOCK_ORDER_INITIALIZER(.lock_order, malloc_mutex_rank_exclusive)} #elif (defined(JEMALLOC_OSSPIN)) -# define MALLOC_MUTEX_INITIALIZER \ - {{{MUTEX_PROF_DATA_INITIALIZER, 0}},\ - WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} +# define MALLOC_MUTEX_INITIALIZER {{{ \ + .prof_data = MUTEX_PROF_DATA_INITIALIZER, \ + .lock = 0, \ + }},\ + WITNESS_INITIALIZER(.witness, "mutex", WITNESS_RANK_OMIT) \ + LOCK_ORDER_INITIALIZER(.lock_order, malloc_mutex_rank_exclusive)} #elif (defined(JEMALLOC_MUTEX_INIT_CB)) -# define MALLOC_MUTEX_INITIALIZER \ - {{{MUTEX_PROF_DATA_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, NULL}}, \ - WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} +# define MALLOC_MUTEX_INITIALIZER {{{ \ + .prof_data = MUTEX_PROF_DATA_INITIALIZER, \ + .lock = PTHREAD_MUTEX_INITIALIZER,\ + .postponed_next = NULL, \ + }}, \ + WITNESS_INITIALIZER(.witness, "mutex", WITNESS_RANK_OMIT) \ + LOCK_ORDER_INITIALIZER(.lock_order, malloc_mutex_rank_exclusive)} #else #define MALLOC_MUTEX_TYPE PTHREAD_MUTEX_DEFAULT -#define MALLOC_MUTEX_INITIALIZER {{{ \ - .prof_data = MUTEX_PROF_DATA_INITIALIZER, \ - .lock = PTHREAD_MUTEX_INITIALIZER, \ - }}, \ -WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} +#define MALLOC_MUTEX_INITIALIZER {{{ \ + .prof_data = MUTEX_PROF_DATA_INITIALIZER, \ + .lock = PTHREAD_MUTEX_INITIALIZER, \ + }},\ +WITNESS_INITIALIZER(.witness, "mutex", WITNESS_RANK_OMIT) \ + LOCK_ORDER_INITIALIZER(.lock_order, malloc_mutex_rank_exclusive)} #endif #ifdef JEMALLOC_LAZY_LOCK Index: src/external/bsd/jemalloc/include/jemalloc/internal/witness.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/witness.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/witness.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/witness.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/witness.h Tue Mar 5 17:45:11 2019 @@ -65,15 +65,15 @@ /* PER-WITNESS DATA */ /**/ #if defined(JEMALLOC_DEBUG) -# define WITNESS_INITIALIZER(_name, _rank) { \ +# define WITNESS_INITIALIZER(_field, _name, _rank) _field = { \ .name = _name, \ .rank = _rank, \ .comp = NULL, \ .opaque = NULL, \ .link = { .qre_prev = NULL, .qre_next = NULL }, \ -} +}, #else -# define WITNESS_INITIALIZER(name, rank) +# define WITNESS_INITIALIZER(field, name, rank) #endif typedef struct witness_s witness_t;
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Tue Mar 5 22:39:21 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: jemalloc_internal_defs.h Log Message: Add some XXX for things I need to fix later, and fix some of the hard-coding. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Tue Mar 5 17:39:21 2019 @@ -33,9 +33,12 @@ * Hyper-threaded CPUs may need a special instruction inside spin loops in * order to yield to another virtual CPU. */ +#ifdef __x86_64__ +/* XXX: I will take care of this later */ #define CPU_SPINWAIT __asm__ volatile("pause") /* 1 if CPU_SPINWAIT is defined, 0 otherwise. */ #define HAVE_CPU_SPINWAIT 1 +#endif /* * Number of significant bits in virtual addresses. This may be less than the @@ -43,6 +46,7 @@ * bits are the same as bit 47. */ #ifdef _LP64 +/* XXX: I will take care of this later */ #define LG_VADDR 48 #else #define LG_VADDR 32 @@ -195,7 +199,8 @@ /* #undef LG_QUANTUM */ /* One page is 2^LG_PAGE bytes. */ -#define LG_PAGE 12 +#include +#define LG_PAGE PAGE_SHIFT /* * One huge page is 2^LG_HUGEPAGE bytes. Note that this is defined even if the @@ -311,7 +316,10 @@ #define JEMALLOC_HAS_RESTRICT 1 /* For use by hash code. */ -/* #undef JEMALLOC_BIG_ENDIAN */ +#include +#if _BYTE_ORDER == _BIG_ENDIAN +#define JEMALLOC_BIG_ENDIAN 1 +#endif /* sizeof(int) == 2^LG_SIZEOF_INT. */ #define LG_SIZEOF_INT 2
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Tue Mar 5 22:37:39 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: atomic_c11.h Log Message: fix const cast with custom "unconst" To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/atomic_c11.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/atomic_c11.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/atomic_c11.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/atomic_c11.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/atomic_c11.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/atomic_c11.h Tue Mar 5 17:37:39 2019 @@ -27,7 +27,7 @@ atomic_load_##short_type(const atomic_## * convenient for our purposes. This cast is a workaround. \ */\ atomic_##short_type##_t* a_nonconst =\ - (atomic_##short_type##_t*)a;\ + (atomic_##short_type##_t*)(_Atomic void *)(_Atomic uintptr_t)(a); \ return atomic_load_explicit(a_nonconst, mo); \ } \ \
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Mon Mar 4 20:21:18 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: hash.h Log Message: Add fallthough comments. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/hash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/hash.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/hash.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/hash.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/hash.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/hash.h Mon Mar 4 15:21:18 2019 @@ -177,26 +177,29 @@ hash_x86_128(const void *key, const int uint32_t k4 = 0; switch (len & 15) { - case 15: k4 ^= tail[14] << 16; - case 14: k4 ^= tail[13] << 8; + case 15: k4 ^= tail[14] << 16; /*FALLTHROUGH*/ + case 14: k4 ^= tail[13] << 8; /*FALLTHROUGH*/ case 13: k4 ^= tail[12] << 0; k4 *= c4; k4 = hash_rotl_32(k4, 18); k4 *= c1; h4 ^= k4; + /*FALLTHROUGH*/ - case 12: k3 ^= tail[11] << 24; - case 11: k3 ^= tail[10] << 16; - case 10: k3 ^= tail[ 9] << 8; + case 12: k3 ^= tail[11] << 24; /*FALLTHROUGH*/ + case 11: k3 ^= tail[10] << 16; /*FALLTHROUGH*/ + case 10: k3 ^= tail[ 9] << 8; /*FALLTHROUGH*/ case 9: k3 ^= tail[ 8] << 0; - k3 *= c3; k3 = hash_rotl_32(k3, 17); k3 *= c4; h3 ^= k3; + k3 *= c3; k3 = hash_rotl_32(k3, 17); k3 *= c4; h3 ^= k3; + /*FALLTHROUGH*/ - case 8: k2 ^= tail[ 7] << 24; - case 7: k2 ^= tail[ 6] << 16; - case 6: k2 ^= tail[ 5] << 8; + case 8: k2 ^= tail[ 7] << 24; /*FALLTHROUGH*/ + case 7: k2 ^= tail[ 6] << 16; /*FALLTHROUGH*/ + case 6: k2 ^= tail[ 5] << 8; /*FALLTHROUGH*/ case 5: k2 ^= tail[ 4] << 0; k2 *= c2; k2 = hash_rotl_32(k2, 16); k2 *= c3; h2 ^= k2; + /*FALLTHROUGH*/ - case 4: k1 ^= tail[ 3] << 24; - case 3: k1 ^= tail[ 2] << 16; - case 2: k1 ^= tail[ 1] << 8; + case 4: k1 ^= tail[ 3] << 24; /*FALLTHROUGH*/ + case 3: k1 ^= tail[ 2] << 16; /*FALLTHROUGH*/ + case 2: k1 ^= tail[ 1] << 8; /*FALLTHROUGH*/ case 1: k1 ^= tail[ 0] << 0; k1 *= c1; k1 = hash_rotl_32(k1, 15); k1 *= c2; h1 ^= k1; }
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Mon Mar 4 19:40:57 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: emitter.h Log Message: use __format_arg__ to check arguments... To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/emitter.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/emitter.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/emitter.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/emitter.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/emitter.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/emitter.h Mon Mar 4 14:40:57 2019 @@ -115,10 +115,11 @@ emitter_table_printf(emitter_t *emitter, } } -static inline void +static inline const char * __attribute__((__format_arg__(3))) emitter_gen_fmt(char *out_fmt, size_t out_size, const char *fmt_specifier, emitter_justify_t justify, int width) { size_t written; + fmt_specifier++; if (justify == emitter_justify_none) { written = malloc_snprintf(out_fmt, out_size, "%%%s", fmt_specifier); @@ -131,6 +132,7 @@ emitter_gen_fmt(char *out_fmt, size_t ou } /* Only happens in case of bad format string, which *we* choose. */ assert(written < out_size); + return out_fmt; } /* @@ -156,26 +158,27 @@ emitter_print_value(emitter_t *emitter, char buf[BUF_SIZE]; #define EMIT_SIMPLE(type, format) \ - emitter_gen_fmt(fmt, FMT_SIZE, format, justify, width); \ - emitter_printf(emitter, fmt, *(const type *)value); \ + emitter_printf(emitter, \ + emitter_gen_fmt(fmt, FMT_SIZE, format, justify, width), \ + *(const type *)value); switch (value_type) { case emitter_type_bool: - emitter_gen_fmt(fmt, FMT_SIZE, "s", justify, width); - emitter_printf(emitter, fmt, *(const bool *)value ? - "true" : "false"); + emitter_printf(emitter, + emitter_gen_fmt(fmt, FMT_SIZE, "%s", justify, width), + *(const bool *)value ? "true" : "false"); break; case emitter_type_int: - EMIT_SIMPLE(int, "d") + EMIT_SIMPLE(int, "%d") break; case emitter_type_unsigned: - EMIT_SIMPLE(unsigned, "u") + EMIT_SIMPLE(unsigned, "%u") break; case emitter_type_ssize: - EMIT_SIMPLE(ssize_t, "zd") + EMIT_SIMPLE(ssize_t, "%zd") break; case emitter_type_size: - EMIT_SIMPLE(size_t, "zu") + EMIT_SIMPLE(size_t, "%zu") break; case emitter_type_string: str_written = malloc_snprintf(buf, BUF_SIZE, "\"%s\"", @@ -185,17 +188,17 @@ emitter_print_value(emitter_t *emitter, * anywhere near the fmt size. */ assert(str_written < BUF_SIZE); - emitter_gen_fmt(fmt, FMT_SIZE, "s", justify, width); - emitter_printf(emitter, fmt, buf); + emitter_printf(emitter, + emitter_gen_fmt(fmt, FMT_SIZE, "%s", justify, width), buf); break; case emitter_type_uint32: - EMIT_SIMPLE(uint32_t, FMTu32) + EMIT_SIMPLE(uint32_t, "%" FMTu32) break; case emitter_type_uint64: - EMIT_SIMPLE(uint64_t, FMTu64) + EMIT_SIMPLE(uint64_t, "%" FMTu64) break; case emitter_type_title: - EMIT_SIMPLE(char *const, "s"); + EMIT_SIMPLE(char *const, "%s"); break; default: unreachable();
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Mon Mar 4 19:16:31 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: mutex.h Log Message: Put back braces. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/mutex.h Mon Mar 4 14:16:31 2019 @@ -110,10 +110,10 @@ struct malloc_mutex_s { WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} #else #define MALLOC_MUTEX_TYPE PTHREAD_MUTEX_DEFAULT -#define MALLOC_MUTEX_INITIALIZER {{ \ +#define MALLOC_MUTEX_INITIALIZER {{{ \ .prof_data = MUTEX_PROF_DATA_INITIALIZER, \ .lock = PTHREAD_MUTEX_INITIALIZER, \ - }, \ + }}, \ WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} #endif
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Mon Mar 4 19:16:10 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: mutex_prof.h Log Message: use ATOMIC_INIT() To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/mutex_prof.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/mutex_prof.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/mutex_prof.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/mutex_prof.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/mutex_prof.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/mutex_prof.h Mon Mar 4 14:16:10 2019 @@ -103,7 +103,7 @@ typedef struct { .n_wait_times = 0, \ .n_spin_acquired = 0, \ .max_n_thds = 0, \ - .n_waiting_thds = 0, \ + .n_waiting_thds = ATOMIC_INIT(0), \ .n_owner_switches = 0, \ .prev_owner = NULL, \ .n_lock_ops = 0, \