summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Delay background_thread_ctl_init to right before thread creation.Qi Wang2017-10-062-4/+6
| | | | | | | | | | ctl_init sets isthreaded, which means it should be done without holding any locks.
| * Enable a0 metadata thp on the 3rd base block.Qi Wang2017-10-051-21/+64
| | | | | | | | | | | | Since we allocate rtree nodes from a0's base, it's pushed to over 1 block on initialization right away, which makes the auto thp mode less effective on a0. We change a0 to make the switch on the 3rd block instead.
| * Power: disable the CPU_SPINWAIT macro.David Goldblatt2017-10-054-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting from https://github.com/jemalloc/jemalloc/issues/761 : [...] reading the Power ISA documentation[1], the assembly in [the CPU_SPINWAIT macro] isn't correct anyway (as @marxin points out): the setting of the program-priority register is "sticky", and we never undo the lowering. We could do something similar, but given that we don't have testing here in the first place, I'm inclined to simply not try. I'll put something up reverting the problematic commit tomorrow. [1] Book II, chapter 3 of the 2.07B or 3.0B ISA documents.
| * Use ph instead of rb tree for extents_avail_Dave Watson2017-10-043-17/+14
| | | | | | | | | | | | | | | | | | | | There does not seem to be any overlap between usage of extent_avail and extent_heap, so we can use the same hook. The only remaining usage of rb trees is in the profiling code, which has some 'interesting' iteration constraints. Fixes #888
| * Logging: capitalize log macro.David Goldblatt2017-10-033-70/+61
| | | | | | | | Dodge a name-conflict with the math.h logarithm function. D'oh.
| * ARM: Don't extend bit LG_VADDR to compute high address bits.David Goldblatt2017-10-021-0/+12
| | | | | | | | | | | | | | In userspace ARM on Linux, zero-ing the high bits is the correct way to do this. This doesn't fix the fact that we currently set LG_VADDR to 48 on ARM, when in fact larger virtual address sizes are coming soon. We'll cross that bridge when we come to it.
| * Add runtime detection of lazy purging support.Qi Wang2017-09-271-0/+24
| | | | | | | | | | | | It's possible to build with lazy purge enabled but depoly to systems without such support. In this case, rely on the boot time detection instead of keep making unnecessary madvise calls (which all returns EINVAL).
| * Avoid left shift by negative values.Qi Wang2017-09-251-2/+2
| | | | | | | | Fix warnings on -Wshift-negative-value.
| * Add "falls through" comment explicitly.Qi Wang2017-09-251-14/+14
| | | | | | | | Fix warnings by -Wimplicit-fallthrough.
| * dumpbin doesn't exist in mingwTamir Duberstein2017-09-211-1/+7
| |
| * Allow toolchain to determine nmTamir Duberstein2017-09-211-1/+6
| |
| * whitespaceTamir Duberstein2017-09-211-7/+7
| |
| * Put static keyword first.Qi Wang2017-09-211-1/+1
| | | | | | | | Fix a warning by -Wold-style-declaration.
| * Add missing field in initializer for rtree cache.Qi Wang2017-09-211-1/+1
| | | | | | | | Fix a warning by -Wmissing-field-initializers.
| * Force Ubuntu "precise" for Travis CI builds.David Goldblatt2017-09-201-0/+1
| | | | | | | | | | | | | | | | We've been seeing strange errors in jemalloc_cpp.cpp since Travis upgraded from precise to trusty as their default CI environment (seeming to stem from some the new clang version finding the headers for an old version of libstdc++. In the long run we'll have to deal with this "for real", but at that point we may have a better C++ story in general, making it a moot point.
| * Clear cache bin ql postfork.Qi Wang2017-09-121-0/+7
| | | | | | | | | | This fixes a regression in 9c05490, which introduced the new cache bin ql. The list needs to be cleaned up after fork, same as tcache_ql.
| * Fix huge page test in test/unit/pages.Qi Wang2017-09-121-5/+7
| | | | | | | | | | Huge pages could be disabled even if the kernel header has MAD_HUGEPAGE defined. Guard the huge pagetest with runtime detection.
| * Fix a link for dirty_decay_ms in manual.Qi Wang2017-09-111-1/+1
| |
| * Relax constraints on reentrancy for extent hooks.Qi Wang2017-08-312-1/+13
| | | | | | | | | | | | If we guarantee no malloc activity in extent hooks, it's possible to make customized hooks working on arena 0. Remove the non-a0 assertion to enable such use cases.
| * Add stats for metadata_thp.Qi Wang2017-08-3010-21/+125
| | | | | | | | Report number of THPs used in arena and aggregated stats.
| * Change opt.metadata_thp to [disabled,auto,always].Qi Wang2017-08-3010-25/+84
| | | | | | | | | | | | | | | | To avoid the high RSS caused by THP + low usage arena (i.e. THP becomes a significant percentage), added a new "auto" option which will only start using THP after a base allocator used up the first THP region. Starting from the second hugepage (in a single arena), "auto" behaves the same as "always", i.e. madvise hugepage right away.
| * Document the ialloc function abbreviations.David Goldblatt2017-08-172-1/+19
| | | | | | | | | | In the jemalloc_internal_inlines files, we have a lot of somewhat terse function names. This commit adds some documentation to aid in translation.
| * Make arena stats collection go through cache bins.David Goldblatt2017-08-175-17/+84
| | | | | | | | | | | | This eliminates the need for the arena stats code to "know" about tcaches; all that it needs is a cache_bin_array_descriptor_t to tell it where to find cache_bins whose stats it should aggregate.
| * Pull out caching for a bin into its own file.David Goldblatt2017-08-1711-139/+148
| | | | | | | | | | | | This is the first step towards breaking up the tcache and arena (since they interact primarily at the bin level). It should also make a future arena caching implementation more straightforward.
| * Add missing mallctl unit test for abort_conf.Qi Wang2017-08-121-0/+1
| | | | | | | | The abort_conf option was missed from test/unit/mallctl.
| * Add support for m68k, nios2, SH3 architecturesFaidon Liambotis2017-08-111-1/+8
| | | | | | | | | | Add minimum alignment for three more architectures, as requested by Debian users or porters (see Debian bugs #807554, #816236, #863424).
| * Fix support for GNU/kFreeBSDFaidon Liambotis2017-08-111-1/+10
| | | | | | | | | | | | | | | | | | | | | | The configure.ac seciton right now is the same for Linux and kFreeBSD, which results into an incorrect configuration of e.g. defining JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY instead of FreeBSD's JEMALLOC_SYSCTL_VM_OVERCOMMIT. GNU/kFreeBSD is really a glibc + FreeBSD kernel system, so it needs its own entry which has a mixture of configuration options from Linux and FreeBSD.
| * Fix test/unit/pages.Qi Wang2017-08-113-7/+15
| | | | | | | | | | | | As part of the metadata_thp support, We now have a separate swtich (JEMALLOC_HAVE_MADVISE_HUGE) for MADV_HUGEPAGE availability. Use that instead of JEMALLOC_THP (which doesn't guard pages_huge anymore) in tests.
| * Implement opt.metadata_thpQi Wang2017-08-1112-17/+118
| | | | | | | | | | This option enables transparent huge page for base allocators (require MADV_HUGEPAGE support).
| * Filter out "void *newImpl" in prof output.Qi Wang2017-08-081-0/+1
| |
| * Remove external linkage for spin_adaptiveRyan Libby2017-08-085-16/+1
| | | | | | | | | | | | | | The external linkage for spin_adaptive was not used, and the inline declaration of spin_adaptive that was used caused a probem on FreeBSD where CPU_SPINWAIT is implemented as a call to a static procedure for x86 architectures.
| * Only read szind if ptr is not paged aligned in sdallocx.Qi Wang2017-07-311-2/+22
| | | | | | | | | | | | If ptr is not page aligned, we know the allocation was not sampled. In this case use the size passed into sdallocx directly w/o accessing rtree. This improve sdallocx efficiency in the common case (not sampled && small allocation).
| * Remove a redundant '--with-malloc-conf=tcache:false' from gen_run_tests.pyDavid Goldblatt2017-07-311-1/+0
| | | | | | | | This is already tested via its inclusion in possible_malloc_conf_opts.
| * Bypass extent_alloc_wrapper_hard for no_move_expand.Qi Wang2017-07-311-0/+9
| | | | | | | | | | | | When retain is enabled, we should not attempt mmap for in-place expansion (large_ralloc_no_move), because it's virtually impossible to succeed, and causes unnecessary syscalls (which can cause lock contention under load).
| * Filter out "newImpl" from profiling output.Qi Wang2017-07-281-0/+1
| |
| * Only run test/integration/sdallocx non-reentrantly.David Goldblatt2017-07-241-1/+1
| | | | | | | | | | This is a temporary workaround until we add some beefier CI machines. Right now, we're seeing too many OOMs for this to be useful.
| * Logging: log using the log var names directly.David Goldblatt2017-07-243-155/+51
| | | | | | | | | | | | | | | | | | | | | | Currently we have to log by writing something like: static log_var_t log_a_b_c = LOG_VAR_INIT("a.b.c"); log (log_a_b_c, "msg"); This is sort of annoying. Let's just write: log("a.b.c", "msg");
| * Split out cold code path in newImplQinfan Wu2017-07-241-7/+16
| | | | | | | | | | I noticed that the whole newImpl is inlined. Since OOM handling code is rarely executed, we should only inline the hot path.
| * Logging: allow logging with empty varargs.David Goldblatt2017-07-227-17/+65
| | | | | | | | | | | | Currently, the log macro requires at least one argument after the format string, because of the way the preprocessor handles varargs macros. We can hide some of that irritation by pushing the extra arguments into a varargs function.
| * Validates fd before calling fcntlY. T. Chung2017-07-222-4/+12
| |
| * Add entry and exit logging to all core functions.David T. Goldblatt2017-07-212-1/+204
| | | | | | | | I.e. mallloc, free, the allocx API, the posix extensions.
| * Add a logging facility.David T. Goldblatt2017-07-218-0/+396
| | | | | | | | | | This sets up a hierarchical logging facility, so that we can add logging statements liberally, and turn them on in a fine-grained manner.
| * Fall back to FD_CLOEXEC when O_CLOEXEC is unavailable.Y. T. Chung2017-07-202-5/+28
| | | | | | | | | | | | | | Older Linux systems don't have O_CLOEXEC. If that's the case, we fcntl immediately after open, to minimize the length of the racy period in which an operation in another thread can leak a file descriptor to a child.
| * Add a test of behavior under multi-threaded forking.David Goldblatt2017-07-111-21/+87
| | | | | | | | | | | | Forking a multithreaded process is dangerous but allowed, so long as the child only executes async-signal-safe functions (e.g. exec). Add a test to ensure that we don't break this behavior.
| * Fix deadlock in multithreaded fork in OS X.David Goldblatt2017-07-111-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OS X, we rely on the zone machinery to call our prefork and postfork handlers. In zone_force_unlock, we call jemalloc_postfork_child, reinitializing all our mutexes regardless of state, since the mutex implementation will assert if the tid of the unlocker is different from that of the locker. This has the effect of unlocking the mutexes, but also fails to wake any threads waiting on them in the parent. To fix this, we track whether or not we're the parent or child after the fork, and unlock or reinit as appropriate. This resolves #895.
| * Fix a typo.Jason Evans2017-07-031-1/+1
| |
* | Allow toolchain to determine nmTamir Duberstein2017-07-061-1/+6
| |
* | dumpbin doesn't exist in mingwTamir Duberstein2017-07-061-1/+7
| |
* | whitespaceTamir Duberstein2017-07-061-7/+7
|/
* Merge branch 'dev'5.0.1Jason Evans2017-07-0223-134/+395
|\