server-skynet-source-3rd-je.../include/jemalloc/internal
gnzlbg 3d29d11ac2 Clean compilation -Wextra
Before this commit jemalloc produced many warnings when compiled with -Wextra
with both Clang and GCC. This commit fixes the issues raised by these warnings
or suppresses them if they were spurious at least for the Clang and GCC
versions covered by CI.

This commit:

* adds `JEMALLOC_DIAGNOSTIC` macros: `JEMALLOC_DIAGNOSTIC_{PUSH,POP}` are
  used to modify the stack of enabled diagnostics. The
  `JEMALLOC_DIAGNOSTIC_IGNORE_...` macros are used to ignore a concrete
  diagnostic.

* adds `JEMALLOC_FALLTHROUGH` macro to explicitly state that falling
  through `case` labels in a `switch` statement is intended

* Removes all UNUSED annotations on function parameters. The warning
  -Wunused-parameter is now disabled globally in
  `jemalloc_internal_macros.h` for all translation units that include
  that header. It is never re-enabled since that header cannot be
  included by users.

* locally suppresses some -Wextra diagnostics:

  * `-Wmissing-field-initializer` is buggy in older Clang and GCC versions,
    where it does not understanding that, in C, `= {0}` is a common C idiom
    to initialize a struct to zero

  * `-Wtype-bounds` is suppressed in a particular situation where a generic
    macro, used in multiple different places, compares an unsigned integer for
    smaller than zero, which is always true.

  * `-Walloc-larger-than-size=` diagnostics warn when an allocation function is
    called with a size that is too large (out-of-range). These are suppressed in
    the parts of the tests where `jemalloc` explicitly does this to test that the
    allocation functions fail properly.

* adds a new CI build bot that runs the log unit test on CI.

Closes #1196 .
2018-07-09 21:40:42 -07:00
..
arena_externs.h Implement huge arena: opt.huge_threshold. 2018-06-29 10:35:02 -07:00
arena_inlines_a.h Control idump and gdump with prof_active. 2018-04-09 16:35:14 -07:00
arena_inlines_b.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
arena_stats.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
arena_structs_a.h Header refactoring: bitmap - unify and remove from catchall. 2017-04-24 10:33:21 -07:00
arena_structs_b.h Split up and standardize naming of stats code. 2017-12-18 16:29:10 -08:00
arena_types.h Implement huge arena: opt.huge_threshold. 2018-06-29 10:35:02 -07:00
assert.h Disentangle assert and util 2017-03-06 15:08:43 -08:00
atomic_c11.h Introduce a backport of C11 atomics 2017-03-03 13:40:59 -08:00
atomic_gcc_atomic.h Insert not_reached after an exhaustive switch 2017-03-06 15:08:43 -08:00
atomic_gcc_sync.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
atomic_msvc.h Introduce a backport of C11 atomics 2017-03-03 13:40:59 -08:00
atomic.h TSD: Make all state access happen through a function. 2018-05-18 11:43:03 -07:00
background_thread_externs.h Fall back to the default pthread_create if RTLD_NEXT fails. 2018-06-28 13:18:21 -07:00
background_thread_inlines.h Fix background thread index issues with max_background_threads. 2018-05-15 12:25:23 -07:00
background_thread_structs.h background_thread: add max thread count config 2018-04-10 14:01:45 -07:00
base_externs.h Add stats for metadata_thp. 2017-08-30 16:47:32 -07:00
base_inlines.h Change opt.metadata_thp to [disabled,auto,always]. 2017-08-30 16:47:32 -07:00
base_structs.h Fix base allocator THP auto mode locking and stats. 2017-11-09 16:14:12 -08:00
base_types.h metadata_thp: auto mode adjustment for a0. 2017-11-01 13:52:06 -07:00
bin_stats.h Split up and standardize naming of stats code. 2017-12-18 16:29:10 -08:00
bin.h Split up and standardize naming of stats code. 2017-12-18 16:29:10 -08:00
bit_util.h Disentangle assert and util 2017-03-06 15:08:43 -08:00
bitmap.h Avoid compiler warnings on Windows. 2017-05-11 18:06:20 -07:00
cache_bin.h Rename cache_alloc_easy to cache_bin_alloc_easy. 2017-12-18 16:29:10 -08:00
ckh.h Header refactoring: tsd - cleanup and dependency breaking. 2017-05-01 10:49:56 -07:00
ctl.h Split up and standardize naming of stats code. 2017-12-18 16:29:10 -08:00
div.h Add the div module, which allows fast division by dynamic values. 2017-12-21 14:25:43 -08:00
emitter.h Avoid a printf format specifier warning. 2018-04-16 11:07:51 -07:00
extent_dss.h Header refactoring: unify and de-catchall extent_dss. 2017-05-31 13:08:45 -07:00
extent_externs.h Over purge by 1 extent always. 2017-12-18 12:57:07 -08:00
extent_inlines.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
extent_mmap.h Header refactoring: unify and de-catchall extent_mmap module. 2017-05-31 13:08:45 -07:00
extent_structs.h extent_t bitpacking logic refactoring 2018-01-04 11:11:04 -08:00
extent_types.h Add opt.lg_extent_max_active_fit 2017-11-16 15:32:02 -08:00
hash.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
hook.h Hooks: Protect against reentrancy. 2018-05-18 11:43:03 -07:00
jemalloc_internal_decls.h Make generated headers usable in both x86 and x64 mode in Visual Studio 2018-01-30 13:11:41 -08:00
jemalloc_internal_defs.h.in Modify configure to determine return value of strerror_r. 2018-01-10 21:01:18 -08:00
jemalloc_internal_externs.h Refactor arena_is_auto. 2018-06-29 10:35:02 -07:00
jemalloc_internal_includes.h Header refactoring: unify and de-catchall mutex_pool. 2017-05-31 13:08:45 -07:00
jemalloc_internal_inlines_a.h TSD: Make all state access happen through a function. 2018-05-18 11:43:03 -07:00
jemalloc_internal_inlines_b.h Refactor arena_is_auto. 2018-06-29 10:35:02 -07:00
jemalloc_internal_inlines_c.h Optimize ixalloc by avoiding a size lookup. 2018-06-05 21:03:51 -07:00
jemalloc_internal_macros.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
jemalloc_internal_types.h Also use __riscv to detect builds for RISC-V CPUs. 2017-12-09 10:10:42 -08:00
jemalloc_preamble.h.in Rename hooks module to test_hooks. 2018-05-18 11:43:03 -07:00
large_externs.h Hooks: hook the realloc pathways that move/expand. 2018-05-18 11:43:03 -07:00
log.h Logging: capitalize log macro. 2017-10-02 20:44:43 -07:00
malloc_io.h Fix type warning on Windows. 2018-04-09 16:50:30 -07:00
mutex_pool.h Header refactoring: unify and de-catchall mutex_pool. 2017-05-31 13:08:45 -07:00
mutex_prof.h Stats printing: Move global mutex stats to use emitter. 2018-03-09 11:47:17 -08:00
mutex.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
nstime.h Add background thread related stats. 2017-05-23 12:26:20 -07:00
pages.h Add opt.thp which allows explicit hugepage usage. 2018-03-08 13:08:06 -08:00
ph.h Add any() and remove_any() to ph. 2017-03-07 10:25:33 -08:00
private_namespace.sh Automatically generate private symbol name mangling macros. 2017-05-11 23:06:54 -07:00
private_symbols.sh Automatically generate private symbol name mangling macros. 2017-05-11 23:06:54 -07:00
prng.h Header refactoring: prng module - remove from the catchall and unify. 2017-04-24 10:33:21 -07:00
prof_externs.h Header refactoring: unify and de-catchall mutex module 2017-05-24 15:27:30 -07:00
prof_inlines_a.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
prof_inlines_b.h Control idump and gdump with prof_active. 2018-04-09 16:35:14 -07:00
prof_structs.h Header refactoring: unify and de-catchall mutex module 2017-05-24 15:27:30 -07:00
prof_types.h Convert arena->prof_accumbytes synchronization to atomics. 2017-02-16 09:39:46 -08:00
public_namespace.sh Replace tabs following #define with spaces. 2017-01-20 21:45:53 -08:00
public_unnamespace.sh Fix name mangling for stress tests. 2014-01-16 17:38:01 -08:00
ql.h Header refactoring: break out qr.h dependencies 2017-04-11 11:52:30 -07:00
qr.h Replace tabs following #define with spaces. 2017-01-20 21:45:53 -08:00
rb.h Header refactoring: break out rb.h dependencies 2017-04-11 11:52:30 -07:00
rtree_tsd.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
rtree.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
seq.h Add the Seq module, a simple seqlock implementation. 2018-05-18 11:43:03 -07:00
size_classes.sh Header refactoring: Pull size helpers out of jemalloc module. 2017-05-31 13:08:45 -07:00
smoothstep.h Cleanup smoothstep.sh / .h. 2017-05-25 16:52:10 -07:00
smoothstep.sh Cleanup smoothstep.sh / .h. 2017-05-25 16:52:10 -07:00
spin.h Power: disable the CPU_SPINWAIT macro. 2017-10-04 18:37:23 -07:00
stats.h Split up and standardize naming of stats code. 2017-12-18 16:29:10 -08:00
sz.h Avoid left shift by negative values. 2017-09-25 15:38:58 -07:00
tcache_externs.h Pull out caching for a bin into its own file. 2017-08-16 17:48:44 -07:00
tcache_inlines.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
tcache_structs.h Move tsd link and in_hook after tcache. 2018-06-27 13:39:02 -07:00
tcache_types.h Pull out caching for a bin into its own file. 2017-08-16 17:48:44 -07:00
test_hooks.h Rename hooks module to test_hooks. 2018-05-18 11:43:03 -07:00
ticker.h Tweak the ticker paths to help GCC generate better code. 2018-02-21 16:04:23 -08:00
tsd_generic.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
tsd_malloc_thread_cleanup.h Header refactoring: tsd - cleanup and dependency breaking. 2017-05-01 10:49:56 -07:00
tsd_tls.h Clean compilation -Wextra 2018-07-09 21:40:42 -07:00
tsd_types.h Header refactoring: tsd - cleanup and dependency breaking. 2017-05-01 10:49:56 -07:00
tsd_win.h Header refactoring: tsd - cleanup and dependency breaking. 2017-05-01 10:49:56 -07:00
tsd.h Move tsd link and in_hook after tcache. 2018-06-27 13:39:02 -07:00
util.h Remove --disable-cc-silence. 2017-04-24 15:02:45 -07:00
witness.h Add "hook" module. 2018-05-18 11:43:03 -07:00