Module Name: src
Committed By: christos
Date: Mon Sep 23 17:53:42 UTC 2024
Modified Files:
src/external/bsd/jemalloc/dist/include/jemalloc/internal:
arena_externs.h atomic_c11.h edata.h ehooks.h hook.h hpa.h
jemalloc_internal_types.h mutex_prof.h ph.h prof_data.h
prof_externs.h prof_recent.h prof_sys.h safety_check.h san_bump.h
test_hooks.h tsd.h util.h witness.h
src/external/bsd/jemalloc/dist/src: ctl.c
src/external/bsd/jemalloc/include/jemalloc/internal: edata.h
jemalloc_internal_types.h ph.h util.h
src/external/bsd/jemalloc/lib: Makefile.inc
Log Message:
reduce differences with upstream, pass lint.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/edata.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ehooks.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/hook.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/hpa.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_data.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_recent.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_sys.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/safety_check.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/san_bump.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/test_hooks.h
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_types.h
\
src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_externs.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/tsd.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/util.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/jemalloc/dist/src/ctl.c
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/jemalloc/include/jemalloc/internal/edata.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h \
src/external/bsd/jemalloc/include/jemalloc/internal/ph.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/jemalloc/include/jemalloc/internal/util.h
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/jemalloc/lib/Makefile.inc
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.3 src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h:1.4
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h:1.3 Mon Sep 23 11:03:41 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_externs.h Mon Sep 23 13:53:41 2024
@@ -68,7 +68,7 @@ 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_prof_promote(tsdn_t *tsdn, void *ptr, size_t usize);
void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache,
bool slow_path);
void arena_slab_dalloc(tsdn_t *tsdn, arena_t *arena, edata_t *slab);
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.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h:1.2 Tue Mar 5 17:51:36 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/atomic_c11.h Mon Sep 23 13:53:41 2024
@@ -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*)(_Atomic void *)(_Atomic uintptr_t)(a); \
+ (atomic_##short_type##_t*)a; \
return atomic_load_explicit(a_nonconst, mo); \
} \
\
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/edata.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/edata.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/edata.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/edata.h:1.1.1.1 Mon Sep 23 10:59:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/edata.h Mon Sep 23 13:53:41 2024
@@ -692,7 +692,7 @@ edata_esnead_comp(const edata_t *a, cons
return ret;
}
-ph_proto(, edata_avail, edata_t)
-ph_proto(, edata_heap, edata_t)
+ph_proto(, edata_avail, edata_t);
+ph_proto(, edata_heap, edata_t);
#endif /* JEMALLOC_INTERNAL_EDATA_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ehooks.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ehooks.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ehooks.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ehooks.h:1.1.1.1 Mon Sep 23 10:59:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ehooks.h Mon Sep 23 13:53:41 2024
@@ -53,7 +53,7 @@ bool ehooks_default_purge_lazy_impl(void
#ifdef PAGES_CAN_PURGE_FORCED
bool ehooks_default_purge_forced_impl(void *addr, size_t offset, size_t length);
#endif
-bool ehooks_default_split_impl();
+bool ehooks_default_split_impl(void);
/*
* Merge is the only default extent hook we declare -- see the comment in
* ehooks_merge.
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/hook.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/hook.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/hook.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/hook.h:1.1.1.1 Mon Sep 23 10:59:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/hook.h Mon Sep 23 13:53:41 2024
@@ -143,7 +143,7 @@ struct hook_ralloc_args_s {
* Returns an opaque handle to be used when removing the hook. NULL means that
* we couldn't install the hook.
*/
-bool hook_boot();
+bool hook_boot(void);
void *hook_install(tsdn_t *tsdn, hooks_t *hooks);
/* Uninstalls the hook with the handle previously returned from hook_install. */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/hpa.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/hpa.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/hpa.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/hpa.h:1.1.1.1 Mon Sep 23 10:59:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/hpa.h Mon Sep 23 13:53:41 2024
@@ -148,7 +148,7 @@ struct hpa_shard_s {
* is not necessarily a guarantee that it backs its allocations by hugepages,
* just that it can function properly given the system it's running on.
*/
-bool hpa_supported();
+bool hpa_supported(void);
bool hpa_central_init(hpa_central_t *central, base_t *base, const hpa_hooks_t *hooks);
bool hpa_shard_init(hpa_shard_t *shard, hpa_central_t *central, emap_t *emap,
base_t *base, edata_cache_t *edata_cache, unsigned ind,
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_data.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_data.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_data.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_data.h:1.1.1.1 Mon Sep 23 10:59:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_data.h Mon Sep 23 13:53:41 2024
@@ -20,7 +20,7 @@ bool prof_data_init(tsd_t *tsd);
prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt);
char *prof_thread_name_alloc(tsd_t *tsd, const char *thread_name);
int prof_thread_name_set_impl(tsd_t *tsd, const char *thread_name);
-void prof_unbias_map_init();
+void prof_unbias_map_init(void);
void prof_dump_impl(tsd_t *tsd, write_cb_t *prof_dump_write, void *cbopaque,
prof_tdata_t *tdata, bool leakcheck);
prof_tdata_t * prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid,
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_recent.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_recent.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_recent.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_recent.h:1.1.1.1 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_recent.h Mon Sep 23 13:53:41 2024
@@ -7,7 +7,7 @@ extern malloc_mutex_t prof_recent_dump_m
bool prof_recent_alloc_prepare(tsd_t *tsd, prof_tctx_t *tctx);
void prof_recent_alloc(tsd_t *tsd, edata_t *edata, size_t size, size_t usize);
void prof_recent_alloc_reset(tsd_t *tsd, edata_t *edata);
-bool prof_recent_init();
+bool prof_recent_init(void);
void edata_prof_recent_alloc_init(edata_t *edata);
/* Used in unit tests. */
@@ -16,7 +16,7 @@ extern prof_recent_list_t prof_recent_al
edata_t *prof_recent_alloc_edata_get_no_lock_test(const prof_recent_t *node);
prof_recent_t *edata_prof_recent_alloc_get_no_lock_test(const edata_t *edata);
-ssize_t prof_recent_alloc_max_ctl_read();
+ssize_t prof_recent_alloc_max_ctl_read(void);
ssize_t prof_recent_alloc_max_ctl_write(tsd_t *tsd, ssize_t max);
void prof_recent_alloc_dump(tsd_t *tsd, write_cb_t *write_cb, void *cbopaque);
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_sys.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_sys.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_sys.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_sys.h:1.1.1.1 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_sys.h Mon Sep 23 13:53:41 2024
@@ -6,8 +6,8 @@ extern base_t *prof_base;
void bt_init(prof_bt_t *bt, void **vec);
void prof_backtrace(tsd_t *tsd, prof_bt_t *bt);
-void prof_hooks_init();
-void prof_unwind_init();
+void prof_hooks_init(void);
+void prof_unwind_init(void);
void prof_sys_thread_name_fetch(tsd_t *tsd);
int prof_getpid(void);
void prof_get_default_filename(tsdn_t *tsdn, char *filename, uint64_t ind);
@@ -24,7 +24,7 @@ typedef int (prof_dump_open_file_t)(cons
extern prof_dump_open_file_t *JET_MUTABLE prof_dump_open_file;
typedef ssize_t (prof_dump_write_file_t)(int, const void *, size_t);
extern prof_dump_write_file_t *JET_MUTABLE prof_dump_write_file;
-typedef int (prof_dump_open_maps_t)();
+typedef int (prof_dump_open_maps_t)(void);
extern prof_dump_open_maps_t *JET_MUTABLE prof_dump_open_maps;
#endif /* JEMALLOC_INTERNAL_PROF_SYS_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/safety_check.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/safety_check.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/safety_check.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/safety_check.h:1.1.1.1 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/safety_check.h Mon Sep 23 13:53:41 2024
@@ -22,7 +22,7 @@ JEMALLOC_ALWAYS_INLINE void
safety_check_verify_redzone(const void *ptr, size_t usize, size_t bumped_usize)
{
for (size_t i = usize; i < bumped_usize && i < usize + 32; ++i) {
- if (unlikely(*((unsigned char *)ptr + i) != 0xBC)) {
+ if (unlikely(*((const unsigned char *)ptr + i) != 0xBC)) {
safety_check_fail("Use after free error\n");
}
}
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/san_bump.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/san_bump.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/san_bump.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/san_bump.h:1.1.1.1 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/san_bump.h Mon Sep 23 13:53:41 2024
@@ -20,7 +20,7 @@ struct san_bump_alloc_s {
};
static inline bool
-san_bump_enabled() {
+san_bump_enabled(void) {
/*
* We enable san_bump allocator only when it's possible to break up a
* mapping and unmap a part of it (maps_coalesce). This is needed to
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/test_hooks.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/test_hooks.h:1.1.1.1 src/external/bsd/jemalloc/dist/include/jemalloc/internal/test_hooks.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/test_hooks.h:1.1.1.1 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/test_hooks.h Mon Sep 23 13:53:41 2024
@@ -1,8 +1,8 @@
#ifndef JEMALLOC_INTERNAL_TEST_HOOKS_H
#define JEMALLOC_INTERNAL_TEST_HOOKS_H
-extern JEMALLOC_EXPORT void (*test_hooks_arena_new_hook)();
-extern JEMALLOC_EXPORT void (*test_hooks_libc_hook)();
+extern JEMALLOC_EXPORT void (*test_hooks_arena_new_hook)(void);
+extern JEMALLOC_EXPORT void (*test_hooks_libc_hook)(void);
#if defined(JEMALLOC_JET) || defined(JEMALLOC_UNIT_TEST)
# define JEMALLOC_TEST_HOOK(fn, hook) ((void)(hook != NULL && (hook(), 0)), fn)
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_types.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_types.h:1.1.1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_types.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_types.h:1.1.1.2 Mon Sep 23 10:59:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/jemalloc_internal_types.h Mon Sep 23 13:53:41 2024
@@ -45,11 +45,11 @@ typedef enum malloc_init_e malloc_init_t
#define MALLOCX_ARENA_SHIFT 20
#define MALLOCX_TCACHE_SHIFT 8
#define MALLOCX_ARENA_MASK \
- (((1 << MALLOCX_ARENA_BITS) - 1) << MALLOCX_ARENA_SHIFT)
+ (((1U << MALLOCX_ARENA_BITS) - 1) << MALLOCX_ARENA_SHIFT)
/* NB: Arena index bias decreases the maximum number of arenas by 1. */
#define MALLOCX_ARENA_LIMIT ((1 << MALLOCX_ARENA_BITS) - 1)
#define MALLOCX_TCACHE_MASK \
- (((1 << MALLOCX_TCACHE_BITS) - 1) << MALLOCX_TCACHE_SHIFT)
+ (((1U << MALLOCX_TCACHE_BITS) - 1) << MALLOCX_TCACHE_SHIFT)
#define MALLOCX_TCACHE_MAX ((1 << MALLOCX_TCACHE_BITS) - 3)
#define MALLOCX_LG_ALIGN_MASK ((1 << MALLOCX_LG_ALIGN_BITS) - 1)
/* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_externs.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_externs.h:1.1.1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_externs.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_externs.h:1.1.1.2 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/prof_externs.h Mon Sep 23 13:53:41 2024
@@ -50,10 +50,10 @@ extern size_t lg_prof_sample;
extern bool prof_booted;
void prof_backtrace_hook_set(prof_backtrace_hook_t hook);
-prof_backtrace_hook_t prof_backtrace_hook_get();
+prof_backtrace_hook_t prof_backtrace_hook_get(void);
void prof_dump_hook_set(prof_dump_hook_t hook);
-prof_dump_hook_t prof_dump_hook_get();
+prof_dump_hook_t prof_dump_hook_get(void);
/* Functions only accessed in prof_inlines.h */
prof_tdata_t *prof_tdata_init(tsd_t *tsd);
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/tsd.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/tsd.h:1.1.1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/tsd.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/tsd.h:1.1.1.2 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/tsd.h Mon Sep 23 13:53:41 2024
@@ -121,6 +121,7 @@ typedef ql_elm(tsd_t) tsd_link_t;
/* tcache_slow */ TCACHE_SLOW_ZERO_INITIALIZER, \
/* rtree_ctx */ RTREE_CTX_INITIALIZER,
+
/* O(name, type, nullable type) */
#define TSD_DATA_FAST \
O(thread_allocated, uint64_t, uint64_t) \
@@ -175,7 +176,7 @@ void tsd_postfork_child(tsd_t *tsd);
*/
void tsd_global_slow_inc(tsdn_t *tsdn);
void tsd_global_slow_dec(tsdn_t *tsdn);
-bool tsd_global_slow();
+bool tsd_global_slow(void);
enum {
/* Common case --> jnz. */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/util.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/util.h:1.1.1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/util.h:1.2
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/util.h:1.1.1.2 Mon Sep 23 10:59:43 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/util.h Mon Sep 23 13:53:41 2024
@@ -84,6 +84,7 @@ util_prefetch_read(void *ptr) {
}
__builtin_prefetch(ptr, /* read or write */ 0, /* locality hint */ 3);
#else
+ /*LINTED*/
*(volatile char *)ptr;
#endif
}
@@ -100,6 +101,7 @@ util_prefetch_write(void *ptr) {
*/
__builtin_prefetch(ptr, 1, 3);
#else
+ /*LINTED*/
*(volatile char *)ptr;
#endif
}
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.4 src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.5
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h:1.4 Mon Sep 23 11:03:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/mutex_prof.h Mon Sep 23 13:53:41 2024
@@ -114,16 +114,4 @@ typedef struct {
uint64_t n_lock_ops;
} mutex_prof_data_t;
-#define MUTEX_PROF_DATA_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 = ATOMIC_INIT(0), \
- .n_owner_switches = 0, \
- .prev_owner = NULL, \
- .n_lock_ops = 0, \
- }
#endif /* JEMALLOC_INTERNAL_MUTEX_PROF_H */
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h:1.4 src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h:1.5
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h:1.4 Mon Sep 23 11:03:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/witness.h Mon Sep 23 13:53:41 2024
@@ -82,15 +82,9 @@ typedef enum witness_rank_e witness_rank
/* PER-WITNESS DATA */
/******************************************************************************/
#if defined(JEMALLOC_DEBUG)
-# define WITNESS_INITIALIZER(_field, _name, _rank) _field = { \
- .name = _name, \
- .rank = _rank, \
- .comp = NULL, \
- .opaque = NULL, \
- .link = { .qre_prev = NULL, .qre_next = NULL }, \
-},
+# define WITNESS_INITIALIZER(name, rank) {name, rank, NULL, NULL, {NULL, NULL}}
#else
-# define WITNESS_INITIALIZER(field, name, rank)
+# define WITNESS_INITIALIZER(name, rank)
#endif
typedef struct witness_s witness_t;
Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.6 src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.7
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h:1.6 Mon Sep 23 11:03:42 2024
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h Mon Sep 23 13:53:41 2024
@@ -445,7 +445,7 @@ typedef struct { \
\
typedef struct { \
ph_t ph; \
-} a_prefix##_t;
+} a_prefix##_t
/*
* The ph_proto() macro generates function prototypes that correspond to the
@@ -460,7 +460,7 @@ a_attr a_type *a_prefix##_any(a_prefix##
a_attr void a_prefix##_insert(a_prefix##_t *ph, a_type *phn); \
a_attr a_type *a_prefix##_remove_first(a_prefix##_t *ph); \
a_attr void a_prefix##_remove(a_prefix##_t *ph, a_type *phn); \
-a_attr a_type *a_prefix##_remove_any(a_prefix##_t *ph);
+a_attr a_type *a_prefix##_remove_any(a_prefix##_t *ph)
/* The ph_gen() macro generates a type-specific pairing heap implementation. */
#define ph_gen(a_attr, a_prefix, a_type, a_field, a_cmp) \
Index: src/external/bsd/jemalloc/dist/src/ctl.c
diff -u src/external/bsd/jemalloc/dist/src/ctl.c:1.4 src/external/bsd/jemalloc/dist/src/ctl.c:1.5
--- src/external/bsd/jemalloc/dist/src/ctl.c:1.4 Mon Sep 23 11:03:42 2024
+++ src/external/bsd/jemalloc/dist/src/ctl.c Mon Sep 23 13:53:41 2024
@@ -3723,17 +3723,17 @@ stats_arenas_i_lextents_j_index(tsdn_t *
}
CTL_RO_CGEN(config_stats, stats_arenas_i_extents_j_ndirty,
- arenas_i(mib[2])->astats->estats[mib[4]].ndirty, size_t);
+ arenas_i(mib[2])->astats->estats[mib[4]].ndirty, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_extents_j_nmuzzy,
- arenas_i(mib[2])->astats->estats[mib[4]].nmuzzy, size_t);
+ arenas_i(mib[2])->astats->estats[mib[4]].nmuzzy, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_extents_j_nretained,
- arenas_i(mib[2])->astats->estats[mib[4]].nretained, size_t);
+ arenas_i(mib[2])->astats->estats[mib[4]].nretained, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_extents_j_dirty_bytes,
- arenas_i(mib[2])->astats->estats[mib[4]].dirty_bytes, size_t);
+ arenas_i(mib[2])->astats->estats[mib[4]].dirty_bytes, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_extents_j_muzzy_bytes,
- arenas_i(mib[2])->astats->estats[mib[4]].muzzy_bytes, size_t);
+ arenas_i(mib[2])->astats->estats[mib[4]].muzzy_bytes, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_extents_j_retained_bytes,
- arenas_i(mib[2])->astats->estats[mib[4]].retained_bytes, size_t);
+ arenas_i(mib[2])->astats->estats[mib[4]].retained_bytes, size_t)
static const ctl_named_node_t *
stats_arenas_i_extents_j_index(tsdn_t *tsdn, const size_t *mib,
@@ -3745,71 +3745,71 @@ stats_arenas_i_extents_j_index(tsdn_t *t
}
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_npurge_passes,
- arenas_i(mib[2])->astats->hpastats.nonderived_stats.npurge_passes, uint64_t);
+ arenas_i(mib[2])->astats->hpastats.nonderived_stats.npurge_passes, uint64_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_npurges,
- arenas_i(mib[2])->astats->hpastats.nonderived_stats.npurges, uint64_t);
+ arenas_i(mib[2])->astats->hpastats.nonderived_stats.npurges, uint64_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nhugifies,
- arenas_i(mib[2])->astats->hpastats.nonderived_stats.nhugifies, uint64_t);
+ arenas_i(mib[2])->astats->hpastats.nonderived_stats.nhugifies, uint64_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_ndehugifies,
- arenas_i(mib[2])->astats->hpastats.nonderived_stats.ndehugifies, uint64_t);
+ arenas_i(mib[2])->astats->hpastats.nonderived_stats.ndehugifies, uint64_t)
/* Full, nonhuge */
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_full_slabs_npageslabs_nonhuge,
arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[0].npageslabs,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_full_slabs_nactive_nonhuge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[0].nactive, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[0].nactive, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_full_slabs_ndirty_nonhuge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[0].ndirty, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[0].ndirty, size_t)
/* Full, huge */
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_full_slabs_npageslabs_huge,
arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[1].npageslabs,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_full_slabs_nactive_huge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[1].nactive, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[1].nactive, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_full_slabs_ndirty_huge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[1].ndirty, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.full_slabs[1].ndirty, size_t)
/* Empty, nonhuge */
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_empty_slabs_npageslabs_nonhuge,
arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[0].npageslabs,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_empty_slabs_nactive_nonhuge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[0].nactive, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[0].nactive, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_empty_slabs_ndirty_nonhuge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[0].ndirty, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[0].ndirty, size_t)
/* Empty, huge */
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_empty_slabs_npageslabs_huge,
arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[1].npageslabs,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_empty_slabs_nactive_huge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[1].nactive, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[1].nactive, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_empty_slabs_ndirty_huge,
- arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[1].ndirty, size_t);
+ arenas_i(mib[2])->astats->hpastats.psset_stats.empty_slabs[1].ndirty, size_t)
/* Nonfull, nonhuge */
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nonfull_slabs_j_npageslabs_nonhuge,
arenas_i(mib[2])->astats->hpastats.psset_stats.nonfull_slabs[mib[5]][0].npageslabs,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nonfull_slabs_j_nactive_nonhuge,
arenas_i(mib[2])->astats->hpastats.psset_stats.nonfull_slabs[mib[5]][0].nactive,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nonfull_slabs_j_ndirty_nonhuge,
arenas_i(mib[2])->astats->hpastats.psset_stats.nonfull_slabs[mib[5]][0].ndirty,
- size_t);
+ size_t)
/* Nonfull, huge */
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nonfull_slabs_j_npageslabs_huge,
arenas_i(mib[2])->astats->hpastats.psset_stats.nonfull_slabs[mib[5]][1].npageslabs,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nonfull_slabs_j_nactive_huge,
arenas_i(mib[2])->astats->hpastats.psset_stats.nonfull_slabs[mib[5]][1].nactive,
- size_t);
+ size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_hpa_shard_nonfull_slabs_j_ndirty_huge,
arenas_i(mib[2])->astats->hpastats.psset_stats.nonfull_slabs[mib[5]][1].ndirty,
- size_t);
+ size_t)
static const ctl_named_node_t *
stats_arenas_i_hpa_shard_nonfull_slabs_j_index(tsdn_t *tsdn, const size_t *mib,
Index: src/external/bsd/jemalloc/include/jemalloc/internal/edata.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/edata.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/edata.h:1.2
--- src/external/bsd/jemalloc/include/jemalloc/internal/edata.h:1.1 Mon Sep 23 11:03:44 2024
+++ src/external/bsd/jemalloc/include/jemalloc/internal/edata.h Mon Sep 23 13:53:42 2024
@@ -692,7 +692,7 @@ edata_esnead_comp(const edata_t *a, cons
return ret;
}
-ph_proto(, edata_avail, edata_t)
-ph_proto(, edata_heap, edata_t)
+ph_proto(, edata_avail, edata_t);
+ph_proto(, edata_heap, edata_t);
#endif /* JEMALLOC_INTERNAL_EDATA_H */
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.5 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.6
--- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h:1.5 Mon Sep 23 11:03:45 2024
+++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h Mon Sep 23 13:53:42 2024
@@ -45,11 +45,11 @@ typedef enum malloc_init_e malloc_init_t
#define MALLOCX_ARENA_SHIFT 20
#define MALLOCX_TCACHE_SHIFT 8
#define MALLOCX_ARENA_MASK \
- (((1 << MALLOCX_ARENA_BITS) - 1) << MALLOCX_ARENA_SHIFT)
+ (((1U << MALLOCX_ARENA_BITS) - 1) << MALLOCX_ARENA_SHIFT)
/* NB: Arena index bias decreases the maximum number of arenas by 1. */
#define MALLOCX_ARENA_LIMIT ((1 << MALLOCX_ARENA_BITS) - 1)
#define MALLOCX_TCACHE_MASK \
- (((1 << MALLOCX_TCACHE_BITS) - 1) << MALLOCX_TCACHE_SHIFT)
+ (((1U << MALLOCX_TCACHE_BITS) - 1) << MALLOCX_TCACHE_SHIFT)
#define MALLOCX_TCACHE_MAX ((1 << MALLOCX_TCACHE_BITS) - 3)
#define MALLOCX_LG_ALIGN_MASK ((1 << MALLOCX_LG_ALIGN_BITS) - 1)
/* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */
Index: src/external/bsd/jemalloc/include/jemalloc/internal/ph.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/ph.h:1.5 src/external/bsd/jemalloc/include/jemalloc/internal/ph.h:1.6
--- src/external/bsd/jemalloc/include/jemalloc/internal/ph.h:1.5 Mon Sep 23 11:03:45 2024
+++ src/external/bsd/jemalloc/include/jemalloc/internal/ph.h Mon Sep 23 13:53:42 2024
@@ -445,7 +445,7 @@ typedef struct { \
\
typedef struct { \
ph_t ph; \
-} a_prefix##_t;
+} a_prefix##_t
/*
* The ph_proto() macro generates function prototypes that correspond to the
@@ -460,7 +460,7 @@ a_attr a_type *a_prefix##_any(a_prefix##
a_attr void a_prefix##_insert(a_prefix##_t *ph, a_type *phn); \
a_attr a_type *a_prefix##_remove_first(a_prefix##_t *ph); \
a_attr void a_prefix##_remove(a_prefix##_t *ph, a_type *phn); \
-a_attr a_type *a_prefix##_remove_any(a_prefix##_t *ph);
+a_attr a_type *a_prefix##_remove_any(a_prefix##_t *ph)
/* The ph_gen() macro generates a type-specific pairing heap implementation. */
#define ph_gen(a_attr, a_prefix, a_type, a_field, a_cmp) \
Index: src/external/bsd/jemalloc/include/jemalloc/internal/util.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/util.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/util.h:1.3
--- src/external/bsd/jemalloc/include/jemalloc/internal/util.h:1.2 Mon Sep 23 11:03:47 2024
+++ src/external/bsd/jemalloc/include/jemalloc/internal/util.h Mon Sep 23 13:53:42 2024
@@ -84,6 +84,7 @@ util_prefetch_read(void *ptr) {
}
__builtin_prefetch(ptr, /* read or write */ 0, /* locality hint */ 3);
#else
+ /*LINTED*/
*(volatile char *)ptr;
#endif
}
@@ -100,6 +101,7 @@ util_prefetch_write(void *ptr) {
*/
__builtin_prefetch(ptr, 1, 3);
#else
+ /*LINTED*/
*(volatile char *)ptr;
#endif
}
Index: src/external/bsd/jemalloc/lib/Makefile.inc
diff -u src/external/bsd/jemalloc/lib/Makefile.inc:1.17 src/external/bsd/jemalloc/lib/Makefile.inc:1.18
--- src/external/bsd/jemalloc/lib/Makefile.inc:1.17 Mon Sep 23 11:03:47 2024
+++ src/external/bsd/jemalloc/lib/Makefile.inc Mon Sep 23 13:53:42 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.17 2024/09/23 15:03:47 christos Exp $
+# $NetBSD: Makefile.inc,v 1.18 2024/09/23 17:53:42 christos Exp $
JEMALLOC:=${.PARSEDIR}/..
@@ -78,3 +78,20 @@ SRCS+=${JEMALLOC_SRCS}
jemalloc.d jemalloc.pico jemalloc.o jemalloc.ln jemalloc.po jemalloc.go: \
${JEMALLOC}/dist/src/jemalloc.c
+
+# jemalloc
+.for i in ${JEMALLOC_SRCS}
+LINTFLAGS.${i} += -X 86,89,117,132,161,191,193,207,217,226,261
+.endfor
+
+LINTFLAGS.arena.c += -X 298
+LINTFLAGS.ckh.c += -X 239
+LINTFLAGS.ctl.c += -X 135,239,298
+LINTFLAGS.extent.c += -X 239
+LINTFLAGS.jemalloc.c += -X 236 # XXX: lint bug, it is a constructor
+LINTFLAGS.pages.c += -X 298
+LINTFLAGS.rtree.c += -X 239
+LINTFLAGS.sc.c += -X 119,239
+LINTFLAGS.stats.c += -X 42,135,239,247
+LINTFLAGS.tcache.c += -X 239,309
+LINTFLAGS.thread_event.c += -X 239