Module Name: src Committed By: christos Date: Sun Mar 10 19:32:56 UTC 2019
Modified Files: src/external/bsd/jemalloc/include/jemalloc: jemalloc.h src/external/bsd/jemalloc/include/jemalloc/internal: arena_externs.h arena_inlines_a.h arena_inlines_b.h atomic_gcc_atomic.h prof_inlines_b.h Log Message: Add noreturn for the benefit of clang To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/jemalloc/include/jemalloc/jemalloc.h cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h \ src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h \ src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h \ src/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h \ src/external/bsd/jemalloc/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/include/jemalloc/jemalloc.h diff -u src/external/bsd/jemalloc/include/jemalloc/jemalloc.h:1.4 src/external/bsd/jemalloc/include/jemalloc/jemalloc.h:1.5 --- src/external/bsd/jemalloc/include/jemalloc/jemalloc.h:1.4 Sun Mar 10 11:45:26 2019 +++ src/external/bsd/jemalloc/include/jemalloc/jemalloc.h Sun Mar 10 15:32:56 2019 @@ -169,6 +169,7 @@ extern "C" { #if defined(_MSC_VER) # define JEMALLOC_ATTR(s) # define JEMALLOC_ALIGNED(s) __declspec(align(s)) +# define JEMALLOC_NORETURN # define JEMALLOC_ALLOC_SIZE(s) # define JEMALLOC_ALLOC_SIZE2(s1, s2) # ifndef JEMALLOC_EXPORT @@ -195,6 +196,7 @@ extern "C" { #elif defined(JEMALLOC_HAVE_ATTR) # define JEMALLOC_ATTR(s) __attribute__((s)) # define JEMALLOC_ALIGNED(s) JEMALLOC_ATTR(aligned(s)) +# define JEMALLOC_NORETURN JEMALLOC_ATTR(__noreturn__) # ifdef JEMALLOC_HAVE_ATTR_ALLOC_SIZE # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s)) # define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2)) Index: src/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/arena_externs.h Sun Mar 10 15:32:56 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/include/jemalloc/internal/arena_inlines_a.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h Sun Mar 10 15:32:56 2019 @@ -32,7 +32,7 @@ arena_prof_accum(tsdn_t *tsdn, arena_t * return prof_accum_add(tsdn, &arena->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/include/jemalloc/internal/arena_inlines_b.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_b.h Sun Mar 10 15:32:56 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/include/jemalloc/internal/atomic_gcc_atomic.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h Sun Mar 10 15:32:56 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 JEMALLOC_GENERATE_INT_ATOMICS(type, short_type, lg_size) \ JEMALLOC_GENERATE_ATOMICS(type, short_type, /* unused */ lg_size) \ \ ATOMIC_INLINE type \ Index: src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h:1.2 --- src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h:1.1 Mon Mar 4 12:25:09 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/prof_inlines_b.h Sun Mar 10 15:32:56 2019 @@ -44,7 +44,7 @@ prof_tctx_get(tsdn_t *tsdn, const void * return arena_prof_tctx_get(tsdn, ptr, alloc_ctx); } -JEMALLOC_ALWAYS_INLINE void +JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void prof_tctx_set(tsdn_t *tsdn, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) { cassert(config_prof); @@ -53,7 +53,7 @@ prof_tctx_set(tsdn_t *tsdn, const void * arena_prof_tctx_set(tsdn, ptr, usize, alloc_ctx, tctx); } -JEMALLOC_ALWAYS_INLINE void +JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void prof_tctx_reset(tsdn_t *tsdn, const void *ptr, prof_tctx_t *tctx) { cassert(config_prof); assert(ptr != NULL); @@ -118,7 +118,7 @@ prof_alloc_prep(tsd_t *tsd, size_t usize return ret; } -JEMALLOC_ALWAYS_INLINE void +JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void prof_malloc(tsdn_t *tsdn, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) { cassert(config_prof); @@ -133,7 +133,7 @@ prof_malloc(tsdn_t *tsdn, const void *pt } } -JEMALLOC_ALWAYS_INLINE void +JEMALLOC_NORETURN 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, prof_tctx_t *old_tctx) { @@ -191,7 +191,7 @@ prof_realloc(tsd_t *tsd, const void *ptr } } -JEMALLOC_ALWAYS_INLINE void +JEMALLOC_NORETURN JEMALLOC_ALWAYS_INLINE void prof_free(tsd_t *tsd, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx) { prof_tctx_t *tctx = prof_tctx_get(tsd_tsdn(tsd), ptr, alloc_ctx);