summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/nstime.h
Commit message (Collapse)AuthorAgeFilesLines
* Add background thread related stats.Qi Wang2017-05-231-0/+2
|
* Stop depending on JEMALLOC_N() for function interception during testing.Jason Evans2017-05-121-20/+16
| | | | | | Instead, always define function pointers for interceptable functions, but mark them const unless testing, so that the compiler can optimize out the pointer dereferences.
* Header refactoring: unify nstime.h and move it out of the catch-allDavid Goldblatt2017-04-191-0/+36
|
* Break up headers into constituent partsDavid Goldblatt2017-01-121-48/+0
| | | | | | | | | | This is part of a broader change to make header files better represent the dependencies between one another (see https://github.com/jemalloc/jemalloc/issues/533). It breaks up component headers into smaller parts that can be made to have a simpler dependency graph. For the autogenerated headers (smoothstep.h and size_classes.h), no splitting was necessary, so I didn't add support to emit multiple headers.
* Do not advance decay epoch when time goes backwards.Jason Evans2016-10-111-0/+3
| | | | | | Instead, move the epoch backward in time. Additionally, add nstime_monotonic() and use it in debug builds to assert that time only goes backward if nstime_update() is using a non-monotonic time source.
* Refine nstime_update().Jason Evans2016-10-101-3/+0
| | | | | | | | | | | | | | | | | | | | | Add missing #include <time.h>. The critical time facilities appear to have been transitively included via unistd.h and sys/time.h, but in principle this omission was capable of having caused clock_gettime(CLOCK_MONOTONIC, ...) to have been overlooked in favor of gettimeofday(), which in turn could cause spurious non-monotonic time updates. Refactor nstime_get() out of nstime_update() and add configure tests for all variants. Add CLOCK_MONOTONIC_RAW support (Linux-specific) and mach_absolute_time() support (OS X-specific). Do not fall back to clock_gettime(CLOCK_REALTIME, ...). This was a fragile Linux-specific workaround, which we're unlikely to use at all now that clock_gettime(CLOCK_MONOTONIC_RAW, ...) is supported, and if we have no choice besides non-monotonic clocks, gettimeofday() is only incrementally worse.
* Fix style nits.Jason Evans2016-04-171-1/+1
|
* Avoid a potential innocuous compiler warning.Jason Evans2016-03-031-1/+1
| | | | | | | Add a cast to avoid comparing a ssize_t value to a uint64_t value that is always larger than a 32-bit ssize_t. This silences an innocuous compiler warning from e.g. gcc 4.2.1 about the comparison always having the same result.
* Refactor time_* into nstime_*.Jason Evans2016-02-221-0/+48
Use a single uint64_t in nstime_t to store nanoseconds rather than using struct timespec. This reduces fragility around conversions between long and uint64_t, especially missing casts that only cause problems on 32-bit platforms.