summaryrefslogtreecommitdiffstats
path: root/src/witness.c
Commit message (Collapse)AuthorAgeFilesLines
* Header refactoring: move assert.h out of the catch-allDavid Goldblatt2017-04-191-0/+1
|
* Header refactoring: move malloc_io.h out of the catchallDavid Goldblatt2017-04-191-0/+2
|
* Header refactoring: Split up jemalloc_internal.hDavid Goldblatt2017-04-111-1/+2
| | | | | | | | | | | | | | This is a biggy. jemalloc_internal.h has been doing multiple jobs for a while now: - The source of system-wide definitions. - The catch-all include file. - The module header file for jemalloc.c This commit splits up this functionality. The system-wide definitions responsibility has moved to jemalloc_preamble.h. The catch-all include file is now jemalloc_internal_includes.h. The module headers for jemalloc.c are now in jemalloc_internal_[externs|inlines|types].h, just as they are for the other modules.
* Bypass witness_fork in TSD when !config_debug.Qi Wang2017-04-071-0/+9
| | | | | With the tcache change, we plan to leave some blank space when !config_debug (unused tbins, witnesses) at the end of the tsd. Let's not touch the memory.
* Add witness_assert_depth[_to_rank]().Jason Evans2017-02-021-8/+9
| | | | | This makes it possible to make lock state assertions about precisely which locks are held.
* Replace tabs following #define with spaces.Jason Evans2017-01-211-9/+9
| | | | This resolves #564.
* Update brace style.Jason Evans2017-01-211-18/+9
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-6/+0
| | | | This resolves #535.
* Make tsd cleanup functions optional, remove noop cleanup functions.Jason Evans2016-06-061-7/+0
|
* Add rtree element witnesses.Jason Evans2016-06-031-1/+2
|
* Mangle tested functions as n_witness_* rather than witness_*_impl.Jason Evans2016-05-111-9/+8
|
* Optimize witness fast path.Jason Evans2016-05-111-118/+4
| | | | | | | | | | | Short-circuit commonly called witness functions so that they only execute in debug builds, and remove equivalent guards from mutex functions. This avoids pointless code execution in witness_assert_lockless(), which is typically called twice per allocation/deallocation function invocation. Inline commonly called witness functions so that optimized builds can completely remove calls as dead code.
* Resolve bootstrapping issues when embedded in FreeBSD libc.Jason Evans2016-05-111-13/+23
| | | | | | | | | | | | | b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online locking validator.) caused a broad propagation of tsd throughout the internal API, but tsd_fetch() was designed to fail prior to tsd bootstrapping. Fix this by splitting tsd_t into non-nullable tsd_t and nullable tsdn_t, and modifying all internal APIs that do not critically rely on tsd to take nullable pointers. Furthermore, add the tsd_booted_get() function so that tsdn_fetch() can probe whether tsd bootstrapping is complete and return NULL if not. All dangerous conversions of nullable pointers are tsdn_tsd() calls that assert-fail on invalid conversion.
* Fix witness/fork() interactions.Jason Evans2016-04-261-1/+13
| | | | | | Fix witness to clear its list of owned mutexes in the child if platform-specific malloc_mutex code re-initializes mutexes rather than unlocking them.
* Fix fork()-related lock rank ordering reversals.Jason Evans2016-04-261-2/+35
|
* Fix malloc_mutex_[un]lock() to conditionally check witness.Jason Evans2016-04-171-10/+0
| | | | Also remove tautological cassert(config_debug) calls.
* Add witness, a simple online locking validator.Jason Evans2016-04-141-0/+206
This resolves #358.