CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 14 18:59:37 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal:
arena_externs.h arena_inlines_a.h arena_inlines_b.h
atomic_gcc_atomic.h prof_inlines_a.h prof_inlines_b.h

Log Message:
Sync with installed versions.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_b.h \

src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_gcc_atomic.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_a.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_b.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/dist/include/jemalloc/internal/arena_externs.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h:1.1.1.1	Mon Mar  4 12:10:22 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h	Thu Mar 14 14:59:37 2019
@@ -56,8 +56,8 @@ void *arena_malloc_hard(tsdn_t *tsdn, ar
 szind_t ind, bool zero);
 void *arena_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize,
 size_t alignment, bool zero, tcache_t *tcache);
-void arena_prof_promote(tsdn_t *tsdn, const void *ptr, size_t usize);
-void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache,
+JEMALLOC_NORETURN void arena_prof_promote(tsdn_t *tsdn, const void *ptr, size_t usize);
+JEMALLOC_NORETURN void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache,
 bool slow_path);
 void arena_dalloc_bin_junked_locked(tsdn_t *tsdn, arena_t *arena,
 extent_t *extent, void *ptr);
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h:1.1.1.1	Mon Mar  4 12:10:22 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h	Thu Mar 14 14:59:37 2019
@@ -32,7 +32,7 @@ arena_prof_accum(tsdn_t *tsdn, arena_t *
 	return prof_accum_add(tsdn, >prof_accum, accumbytes);
 }
 
-static inline void
+static JEMALLOC_NORETURN inline void
 percpu_arena_update(tsd_t *tsd, unsigned cpu) {
 	assert(have_percpu_arena);
 	arena_t *oldarena = tsd_arena_get(tsd);
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_b.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_b.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_b.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_b.h:1.1.1.1	Mon Mar  4 12:10:22 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_b.h	Thu Mar 14 14:59:37 2019
@@ -27,7 +27,7 @@ arena_prof_tctx_get(tsdn_t *tsdn, const 
 	return (prof_tctx_t *)(uintptr_t)1U;
 }
 
-JEMALLOC_ALWAYS_INLINE void
+JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void
 arena_prof_tctx_set(tsdn_t *tsdn, const void *ptr, UNUSED size_t usize,
 alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) {
 	cassert(config_prof);
@@ -46,7 +46,7 @@ arena_prof_tctx_set(tsdn_t *tsdn, const 
 	}
 }
 
-static inline void
+static JEMALLOC_NORETURN inline void
 arena_prof_tctx_reset(tsdn_t *tsdn, const void *ptr, UNUSED prof_tctx_t *tctx) {
 	cassert(config_prof);
 	assert(ptr != NULL);
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_gcc_atomic.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_gcc_atomic.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_gcc_atomic.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_gcc_atomic.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_gcc_atomic.h	Thu Mar 14 14:59:37 2019
@@ -36,8 +36,7 @@ atomic_fence(atomic_memory_order_t mo) {
 	__atomic_thread_fence(atomic_enum_to_builtin(mo));
 }
 
-#define JEMALLOC_GENERATE_ATOMICS(type, short_type,			\
-/* unused */ lg_size)		\
+#define JEMALLOC_GENERATE_ATOMICS(type, short_type, lg_size)		\
 typedef struct {			\
 	type repr;			\
 } atomic_##short_type##_t;		\
@@ -85,8 +84,7 @@ atomic_compare_exchange_strong_##short_t
 }
 
 
-#define JEMALLOC_GENERATE_INT_ATOMICS(type, short_type,			\
-/* unused */ lg_size)		\
+#define 

CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  5 22:51:36 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: atomic_c11.h
mutex.h nstime.h witness.h

Log Message:
Sync with installed files.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/atomic_c11.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h	Tue Mar  5 17:51:36 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);			\
 }	\
 	\

Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h:1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h:1.2	Mon Mar  4 12:24:02 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h	Tue Mar  5 17:51:36 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,25 +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/dist/include/jemalloc/internal/nstime.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h:1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h:1.2	Mon Mar  4 12:23:10 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h	Tue Mar  5 17:51:36 2019
@@ -3,13 +3,12 @@
 
 /* Maximum supported number of seconds (~584 years). */
 #define NSTIME_SEC_MAX KQU(18446744072)
-#define NSTIME_INITIALIZER { .ns = 0 }
+#define 

CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:22:04 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: hash.h

Log Message:
Add FALLTHROUGH comments.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/hash.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h:1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h:1.2	Mon Mar  4 15:04:09 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h	Mon Mar  4 15:22:04 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/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:06:50 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: assert.h
ctl.h log.h ql.h qr.h rb.h rtree.h

Log Message:
add constcond


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/qr.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/rb.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/rtree.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/dist/include/jemalloc/internal/assert.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/assert.h	Mon Mar  4 15:06:50 2019
@@ -13,7 +13,7 @@
 		__FILE__, __LINE__, #e);\
 		abort();		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 #endif
 
 #ifndef not_reached
@@ -25,7 +25,7 @@
 		abort();		\
 	}\
 	unreachable();			\
-} while (0)
+} while (/*CONSTCOND*/0)
 #endif
 
 #ifndef not_implemented
@@ -35,7 +35,7 @@
 		__FILE__, __LINE__);\
 		abort();		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 #endif
 
 #ifndef assert_not_implemented
@@ -43,7 +43,7 @@
 	if (unlikely(config_debug && !(e))) {\
 		not_implemented();	\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 #endif
 
 /* Use to assert a particular configuration, e.g., cassert(config_debug). */
@@ -52,5 +52,5 @@
 	if (unlikely(!(c))) {		\
 		not_reached();		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 #endif
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ctl.h	Mon Mar  4 15:06:50 2019
@@ -109,7 +109,7 @@ void ctl_postfork_child(tsdn_t *tsdn);
 		name);		\
 		abort();		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define xmallctlnametomib(name, mibp, miblenp) do {			\
 	if (je_mallctlnametomib(name, mibp, miblenp) != 0) {		\
@@ -117,7 +117,7 @@ void ctl_postfork_child(tsdn_t *tsdn);
 		"xmallctlnametomib(\"%s\", ...)\n", name);		\
 		abort();		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define xmallctlbymib(mib, miblen, oldp, oldlenp, newp, newlen) do {	\
 	if (je_mallctlbymib(mib, miblen, oldp, oldlenp, newp,		\
@@ -126,6 +126,6 @@ void ctl_postfork_child(tsdn_t *tsdn);
 		": Failure in xmallctlbymib()\n");	\
 		abort();		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #endif /* JEMALLOC_INTERNAL_CTL_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/log.h	Mon Mar  4 15:06:50 2019
@@ -110,6 +110,6 @@ do {	\
 	log_do_begin(log_var)		\
 		log_impl_varargs((log_var).name, __VA_ARGS__);		\
 	log_do_end(log_var)		\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #endif /* JEMALLOC_INTERNAL_LOG_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ql.h	Mon Mar  4 15:06:50 2019
@@ -16,7 +16,7 @@ struct {\
 /* List functions. */
 #define ql_new(a_head) do {		\
 	(a_head)->qlh_first = NULL;	\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define ql_elm_new(a_elm, a_field) qr_new((a_elm), a_field)
 
@@ -39,7 +39,7 @@ struct {\
 	if (ql_first(a_head) == (a_qlelm)) {\
 		ql_first(a_head) = (a_elm);\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define ql_after_insert(a_qlelm, a_elm, a_field)			\
 	qr_after_insert((a_qlelm), (a_elm), a_field)
@@ -49,14 +49,14 @@ struct {\
 		

CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:06:31 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: ph.h

Log Message:
- fix shadowing
- add constcond


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.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/dist/include/jemalloc/internal/ph.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h	Mon Mar  4 15:06:31 2019
@@ -34,19 +34,19 @@ struct {\
 	(a_phn->a_field.phn_lchild)
 #define phn_lchild_set(a_type, a_field, a_phn, a_lchild) do {		\
 	a_phn->a_field.phn_lchild = a_lchild;\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define phn_next_get(a_type, a_field, a_phn)\
 	(a_phn->a_field.phn_next)
 #define phn_prev_set(a_type, a_field, a_phn, a_prev) do {		\
 	a_phn->a_field.phn_prev = a_prev;\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define phn_prev_get(a_type, a_field, a_phn)\
 	(a_phn->a_field.phn_prev)
 #define phn_next_set(a_type, a_field, a_phn, a_next) do {		\
 	a_phn->a_field.phn_next = a_next;\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define phn_merge_ordered(a_type, a_field, a_phn0, a_phn1, a_cmp) do {	\
 	a_type *phn0child;		\
@@ -62,7 +62,7 @@ struct {\
 		phn_prev_set(a_type, a_field, phn0child, a_phn1);	\
 	}\
 	phn_lchild_set(a_type, a_field, a_phn0, a_phn1);		\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define phn_merge(a_type, a_field, a_phn0, a_phn1, a_cmp, r_phn) do {	\
 	if (a_phn0 == NULL) {		\
@@ -78,7 +78,7 @@ struct {\
 		a_cmp);		\
 		r_phn = a_phn1;		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define ph_merge_siblings(a_type, a_field, a_phn, a_cmp, r_phn) do {	\
 	a_type *head = NULL;		\
@@ -165,20 +165,20 @@ struct {\
 		}			\
 	}\
 	r_phn = phn0;			\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define ph_merge_aux(a_type, a_field, a_ph, a_cmp) do {			\
-	a_type *phn = phn_next_get(a_type, a_field, a_ph->ph_root);	\
-	if (phn != NULL) {		\
+	a_type *_phn = phn_next_get(a_type, a_field, a_ph->ph_root);	\
+	if (_phn != NULL) {		\
 		phn_prev_set(a_type, a_field, a_ph->ph_root, NULL);	\
 		phn_next_set(a_type, a_field, a_ph->ph_root, NULL);	\
-		phn_prev_set(a_type, a_field, phn, NULL);		\
-		ph_merge_siblings(a_type, a_field, phn, a_cmp, phn);	\
-		assert(phn_next_get(a_type, a_field, phn) == NULL);	\
-		phn_merge(a_type, a_field, a_ph->ph_root, phn, a_cmp,	\
+		phn_prev_set(a_type, a_field, _phn, NULL);		\
+		ph_merge_siblings(a_type, a_field, _phn, a_cmp, _phn);	\
+		assert(phn_next_get(a_type, a_field, _phn) == NULL);	\
+		phn_merge(a_type, a_field, a_ph->ph_root, _phn, a_cmp,	\
 		a_ph->ph_root);	\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 #define ph_merge_children(a_type, a_field, a_phn, a_cmp, r_phn) do {	\
 	a_type *lchild = phn_lchild_get(a_type, a_field, a_phn);	\
@@ -188,7 +188,7 @@ struct {\
 		ph_merge_siblings(a_type, a_field, lchild, a_cmp,	\
 		r_phn);		\
 	}\
-} while (0)
+} while (/*CONSTCOND*/0)
 
 /*
  * The ph_proto() macro generates function prototypes that correspond to the



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:06:11 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: mutex_prof.h

Log Message:
Adjust to new names


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/mutex_prof.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.2	Mon Mar  4 12:23:37 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h	Mon Mar  4 15:06:11 2019
@@ -96,17 +96,16 @@ typedef struct {
 	uint64_t		n_lock_ops;
 } mutex_prof_data_t;
 
-#define MUTEX_PROF_DATA_ZERO_INITIALIZER \
+#define MUTEX_PROF_DATA_INITIALIZER \
 	{ \
-		.tot_wait_time = NSTIME_ZERO_INITIALIZER, \
-		.max_wait_time = NSTIME_ZERO_INITIALIZER, \
+		.tot_wait_time = NSTIME_INITIALIZER, \
+		.max_wait_time = NSTIME_INITIALIZER, \
 		.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, \
 	}
-
 #endif /* JEMALLOC_INTERNAL_MUTEX_PROF_H */



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:05:19 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: malloc_io.h

Log Message:
adjust prototype


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/malloc_io.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/dist/include/jemalloc/internal/malloc_io.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/malloc_io.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/malloc_io.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/malloc_io.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/malloc_io.h	Mon Mar  4 15:05:19 2019
@@ -41,7 +41,7 @@
 #define MALLOC_PRINTF_BUFSIZE	4096
 
 int buferror(int err, char *buf, size_t buflen);
-uintmax_t malloc_strtoumax(const char *restrict nptr, char **restrict endptr,
+uintmax_t malloc_strtoumax(const char *restrict nptr, const char **restrict endptr,
 int base);
 void malloc_write(const char *s);
 



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:05:01 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal:
jemalloc_internal_inlines_a.h

Log Message:
use UNCONST


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_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/dist/include/jemalloc/internal/jemalloc_internal_inlines_a.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_inlines_a.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_inlines_a.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_inlines_a.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_inlines_a.h	Mon Mar  4 15:05:01 2019
@@ -89,7 +89,7 @@ arena_get(tsdn_t *tsdn, unsigned ind, bo
 	if (unlikely(ret == NULL)) {
 		if (init_if_missing) {
 			ret = arena_init(tsdn, ind,
-			(extent_hooks_t *)_hooks_default);
+			(extent_hooks_t *)__UNCONST(_hooks_default));
 		}
 	}
 	return ret;



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:04:43 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: hooks.h

Log Message:
fix prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/hooks.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/dist/include/jemalloc/internal/hooks.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/hooks.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/hooks.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/hooks.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/hooks.h	Mon Mar  4 15:04:43 2019
@@ -1,8 +1,8 @@
 #ifndef JEMALLOC_INTERNAL_HOOKS_H
 #define JEMALLOC_INTERNAL_HOOKS_H
 
-extern JEMALLOC_EXPORT void (*hooks_arena_new_hook)();
-extern JEMALLOC_EXPORT void (*hooks_libc_hook)();
+extern JEMALLOC_EXPORT void (*hooks_arena_new_hook)(void);
+extern JEMALLOC_EXPORT void (*hooks_libc_hook)(void);
 
 #define JEMALLOC_HOOK(fn, hook) ((void)(hook != NULL && (hook(), 0)), fn)
 



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:04:30 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal:
extent_externs.h

Log Message:
fix incorrect macro use


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/extent_externs.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/dist/include/jemalloc/internal/extent_externs.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/extent_externs.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/extent_externs.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/extent_externs.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/extent_externs.h	Mon Mar  4 15:04:30 2019
@@ -24,7 +24,7 @@ size_t extent_size_quantize_floor(size_t
 size_t extent_size_quantize_ceil(size_t size);
 #endif
 
-rb_proto(, extent_avail_, extent_tree_t, extent_t)
+ph_proto(, extent_avail_, extent_tree_t, extent_t)
 ph_proto(, extent_heap_, extent_heap_t, extent_t)
 
 bool extents_init(tsdn_t *tsdn, extents_t *extents, extent_state_t state,



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:04:09 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: hash.h

Log Message:
fix const hash


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/hash.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/hash.h	Mon Mar  4 15:04:09 2019
@@ -27,7 +27,7 @@ hash_get_block_32(const uint32_t *p, int
 	if (unlikely((uintptr_t)p & (sizeof(uint32_t)-1)) != 0) {
 		uint32_t ret;
 
-		memcpy(, (uint8_t *)(p + i), sizeof(uint32_t));
+		memcpy(, (const uint8_t *)(p + i), sizeof(uint32_t));
 		return ret;
 	}
 
@@ -40,7 +40,7 @@ hash_get_block_64(const uint64_t *p, int
 	if (unlikely((uintptr_t)p & (sizeof(uint64_t)-1)) != 0) {
 		uint64_t ret;
 
-		memcpy(, (uint8_t *)(p + i), sizeof(uint64_t));
+		memcpy(, (const uint8_t *)(p + i), sizeof(uint64_t));
 		return ret;
 	}
 



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:03:53 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: bit_util.h

Log Message:
remove unused line


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/bit_util.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/dist/include/jemalloc/internal/bit_util.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/bit_util.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/bit_util.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/bit_util.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/bit_util.h	Mon Mar  4 15:03:53 2019
@@ -58,7 +58,6 @@ ffs_u32(uint32_t bitmap) {
 #else
 #error No implementation for 32-bit ffs()
 #endif
-	return ffs_u(bitmap);
 }
 
 BIT_UTIL_INLINE uint64_t



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:03:00 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal:
prof_inlines_b.h

Log Message:
fix shadowing


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_b.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/dist/include/jemalloc/internal/prof_inlines_b.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_b.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_b.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_b.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_inlines_b.h	Mon Mar  4 15:03:00 2019
@@ -99,14 +99,14 @@ prof_sample_accum_update(tsd_t *tsd, siz
 }
 
 JEMALLOC_ALWAYS_INLINE prof_tctx_t *
-prof_alloc_prep(tsd_t *tsd, size_t usize, bool prof_active, bool update) {
+prof_alloc_prep(tsd_t *tsd, size_t usize, bool _prof_active, bool update) {
 	prof_tctx_t *ret;
 	prof_tdata_t *tdata;
 	prof_bt_t bt;
 
 	assert(usize == sz_s2u(usize));
 
-	if (!prof_active || likely(prof_sample_accum_update(tsd, usize, update,
+	if (!_prof_active || likely(prof_sample_accum_update(tsd, usize, update,
 	))) {
 		ret = (prof_tctx_t *)(uintptr_t)1U;
 	} else {
@@ -135,14 +135,14 @@ prof_malloc(tsdn_t *tsdn, const void *pt
 
 JEMALLOC_ALWAYS_INLINE void
 prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
-bool prof_active, bool updated, const void *old_ptr, size_t old_usize,
+bool _prof_active, bool updated, const void *old_ptr, size_t old_usize,
 prof_tctx_t *old_tctx) {
 	bool sampled, old_sampled, moved;
 
 	cassert(config_prof);
 	assert(ptr != NULL || (uintptr_t)tctx <= (uintptr_t)1U);
 
-	if (prof_active && !updated && ptr != NULL) {
+	if (_prof_active && !updated && ptr != NULL) {
 		assert(usize == isalloc(tsd_tsdn(tsd), ptr));
 		if (prof_sample_accum_update(tsd, usize, true, NULL)) {
 			/*



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:02:18 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: spin.h

Log Message:
fix prototype


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/spin.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/dist/include/jemalloc/internal/spin.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/spin.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/spin.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/spin.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/spin.h	Mon Mar  4 15:02:18 2019
@@ -8,7 +8,7 @@ typedef struct {
 } spin_t;
 
 static inline void
-spin_cpu_spinwait() {
+spin_cpu_spinwait(void) {
 #  if HAVE_CPU_SPINWAIT
 	CPU_SPINWAIT;
 #  else



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:01:59 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: witness.h

Log Message:
use c99 initializers


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/witness.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h	Mon Mar  4 15:01:59 2019
@@ -65,7 +65,13 @@
 /* PER-WITNESS DATA */
 /**/
 #if defined(JEMALLOC_DEBUG)
-#  define WITNESS_INITIALIZER(name, rank) {name, rank, NULL, NULL, {NULL, NULL}}
+#  define WITNESS_INITIALIZER(_name, _rank) { \
+	.name = _name, \
+	.rank = _rank, \
+	.comp = NULL, \
+	.opaque = NULL, \
+	.link = { .qre_prev = NULL, .qre_next = NULL }, \
+}
 #else
 #  define WITNESS_INITIALIZER(name, rank)
 #endif



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 20:01:42 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: emitter.h

Log Message:
use __format_arg__ to check format arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/emitter.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/emitter.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/emitter.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/emitter.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/emitter.h	Mon Mar  4 15:01:42 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/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 17:24:03 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: mutex.h

Log Message:
use c99 initializers


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/mutex.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex.h	Mon Mar  4 12:24:02 2019
@@ -94,28 +94,27 @@ struct malloc_mutex_s {
 #define MALLOC_MUTEX_TRYLOCK(m) (pthread_mutex_trylock(&(m)->lock) != 0)
 #endif
 
-#define LOCK_PROF_DATA_INITIALIZER	\
-{NSTIME_ZERO_INITIALIZER, NSTIME_ZERO_INITIALIZER, 0, 0, 0,		\
-	ATOMIC_INIT(0), 0, NULL, 0}
-
 #ifdef _WIN32
 #  define MALLOC_MUTEX_INITIALIZER
 #elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
 #  define MALLOC_MUTEX_INITIALIZER	\
- {{{LOCK_PROF_DATA_INITIALIZER, OS_UNFAIR_LOCK_INIT}},		\
+ {{{MUTEX_PROF_DATA_INITIALIZER, OS_UNFAIR_LOCK_INIT}},		\
   WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)}
 #elif (defined(JEMALLOC_OSSPIN))
 #  define MALLOC_MUTEX_INITIALIZER	\
- {{{LOCK_PROF_DATA_INITIALIZER, 0}},\
+ {{{MUTEX_PROF_DATA_INITIALIZER, 0}},\
   WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)}
 #elif (defined(JEMALLOC_MUTEX_INIT_CB))
 #  define MALLOC_MUTEX_INITIALIZER	\
- {{{LOCK_PROF_DATA_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, NULL}},	\
+ {{{MUTEX_PROF_DATA_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, NULL}},	\
   WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)}
 #else
 #define MALLOC_MUTEX_TYPE PTHREAD_MUTEX_DEFAULT
 #define MALLOC_MUTEX_INITIALIZER	\
-   {{{LOCK_PROF_DATA_INITIALIZER, PTHREAD_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/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 17:23:37 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: mutex_prof.h

Log Message:
Add a c99 initializer


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/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/dist/include/jemalloc/internal/mutex_prof.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h	Mon Mar  4 12:23:37 2019
@@ -96,4 +96,17 @@ typedef struct {
 	uint64_t		n_lock_ops;
 } mutex_prof_data_t;
 
+#define MUTEX_PROF_DATA_ZERO_INITIALIZER \
+	{ \
+		.tot_wait_time = NSTIME_ZERO_INITIALIZER, \
+		.max_wait_time = NSTIME_ZERO_INITIALIZER, \
+		.n_wait_times = 0, \
+		.n_spin_acquired = 0, \
+		.max_n_thds = 0, \
+		.n_waiting_thds = 0, \
+		.n_owner_switches = 0, \
+		.prev_owner = NULL, \
+		.n_lock_ops = 0, \
+	}
+
 #endif /* JEMALLOC_INTERNAL_MUTEX_PROF_H */



CVS commit: src/external/bsd/jemalloc/dist/include/jemalloc/internal

2019-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 17:23:10 UTC 2019

Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal: nstime.h

Log Message:
use c99 initializers


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.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/dist/include/jemalloc/internal/nstime.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h:1.1.1.1	Mon Mar  4 12:10:23 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/nstime.h	Mon Mar  4 12:23:10 2019
@@ -3,12 +3,13 @@
 
 /* Maximum supported number of seconds (~584 years). */
 #define NSTIME_SEC_MAX KQU(18446744072)
-#define NSTIME_ZERO_INITIALIZER {0}
+#define NSTIME_INITIALIZER { .ns = 0 }
 
 typedef struct {
 	uint64_t ns;
 } nstime_t;
 
+
 void nstime_init(nstime_t *time, uint64_t ns);
 void nstime_init2(nstime_t *time, uint64_t sec, uint64_t nsec);
 uint64_t nstime_ns(const nstime_t *time);