summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-02-18jemalloc: remove THP supportPark Ju Hyung
This is not explored on Android properly and no one should use it until proper scientific testing. Moreover, THP is broken with all recent Qualcomm devices due to speculative page faults. Change-Id: I1c1e4f296c7895f5288cdb816f42340ea85826b4 Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
2021-10-11Regenerate configs for 5.2.1 updateDanny Lin
Change-Id: I3774ce46655d526e1aea2741711d96ec2613f977
2021-10-11Merge tag '5.2.1' into HEADDanny Lin
Release Change-Id: I269b861cb81499b78f13dc2e88827f13ef5a207d
2019-07-25Lower nthreads in test/unit/retained on 32-bit to avoid OOM.Qi Wang
2019-07-23Implement retain on Windows.Qi Wang
The VirtualAlloc and VirtualFree APIs are different because MEM_DECOMMIT cannot be used across multiple VirtualAlloc regions. To properly support decommit, only allow merge / split within the same region -- this is done by tracking the "is_head" state of extents and not merging cross-region. Add a new state is_head (only relevant for retain && !maps_coalesce), which is true for the first extent in each VirtualAlloc region. Determine if two extents can be merged based on the head state, and use serial numbers for sanity checks.
2019-07-18Fix posix_memalign with input size 0.Qi Wang
Return a valid pointer instead of failed assertion.
2019-05-22Add confirm_conf optionYinan Zhang
If the confirm_conf option is set, when the program starts, each of the four malloc_conf strings will be printed, and each option will be printed when being set.
2019-05-21Improve memory utilization testsYinan Zhang
Added tests for large size classes and expanded the tests to cover wider range of allocation sizes.
2019-04-29Add nonfull_slabs to bin_stats_t.Doron Roberts-Kedes
When config_stats is enabled track the size of bin->slabs_nonfull in the new nonfull_slabs counter in bin_stats_t. This metric should be useful for establishing an upper ceiling on the savings possible by meshing.
2019-04-15Safety checks: Add a redzoning feature.David Goldblatt
2019-04-10Separate tests for extent utilization APIYinan Zhang
As title.
2019-04-05Fix test/unit/prof_logQi Wang
Compiler optimizations may produce traces more than expected. Instead verify the lower bound only.
2019-04-04Add memory utilization analytics to mallctlYinan Zhang
The analytics tool is put under experimental.utilization namespace in mallctl. Input is one pointer or an array of pointers and the output is a list of memory utilization statistics.
2019-04-02Fix the binshard unit test.Qi Wang
The test attempts to trigger usage of multiple sharded bins, which percpu_arena makes it less reliable.
2019-03-14Eagerly purge oversized merged extents.Qi Wang
This change improves memory usage slightly, at virtually no CPU cost.
2019-01-25Rename huge_threshold to oversize_threshold.Qi Wang
The keyword huge tend to remind people of huge pages which is not relevent to the feature.
2019-01-24Explicitly use arena 0 in alignment and OOM tests.Qi Wang
This helps us avoid issues with size based routing (i.e. the huge_threshold feature).
2019-01-16Un-experimental the huge_threshold feature.Qi Wang
2018-12-18Add unit test for producer-consumer pattern.Qi Wang
2018-12-03Add unit test for sharded bins.Qi Wang
2018-12-03Add stats for arenas.bin.i.nshards.Qi Wang
2018-11-14Deprecate OSSpinLock.Qi Wang
2018-10-17add test for zero-sized alloc and aligned allocDave Watson
2018-10-17Make `smallocx` symbol name depend on the `JEMALLOC_VERSION_GID`gnzlbg
This comments concatenates the `JEMALLOC_VERSION_GID` to the `smallocx` symbol name, such that the symbol ends up exported as `smallocx_{git_hash}`.
2018-10-17Hide smallocx even when enabled from the library APIgnzlbg
The experimental `smallocx` API is not exposed via header files, requiring the users to peek at `jemalloc`'s source code to manually add the external declarations to their own programs. This should reinforce that `smallocx` is experimental, and that `jemalloc` does not offer any kind of backwards compatiblity or ABI gurantees for it.
2018-10-17Adapts mallocx integration tests for smallocxgnzlbg
2018-09-06Add bp file and generated files.Christopher Ferris
This does not add any android specific changes. Those will come in a follow-up cl. Test: Builds, and all unit tests pass on a hikey. Change-Id: Ibac11b324afeac93a0c93d19689be48458d56f56
2018-08-09Add hook microbenchmark.David Goldblatt
2018-08-01Add unit tests for loggingTyler Etzel
2018-08-01Small refactoring of emitterTyler Etzel
- Make API more clear for using as standalone json emitter - Support cases that weren't possible before, e.g. - emitting primitive values in an array - emitting nested arrays
2018-07-23SC: Remove global data.David Goldblatt
The global data is mostly only used at initialization, or for easy access to values we could compute statically. Instead of consuming that space (and risking TLB misses), we can just pass around a pointer to stack data during bootstrapping.
2018-07-12SC: Make some key size classes static.David Goldblatt
The largest small class, smallest large class, and largest large class may all be needed down fast paths; to avoid the risk of touching another cache line, we can make them available as constants.
2018-07-12Add MALLOC_CONF parsing for dynamic slab sizes.David T. Goldblatt
This actually enables us to change the values.
2018-07-12SC: Add page customization functionality.David T. Goldblatt
2018-07-12Add lg_ceil to bit_util.David Goldblatt
Also, add the bit_util test back to the Makefile.
2018-07-12Hide size class computation behind a layer of indirection.David Goldblatt
This class removes almost all the dependencies on size_classes.h, accessing the data there only via the new module sc.h, which does not depend on any configuration options. In a subsequent commit, we'll remove the configure-time size class computations, doing them at boot time, instead.
2018-07-09Clean compilation -Wextragnzlbg
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-06-29Rename huge_threshold to experimental, and tweak documentation.Qi Wang
2018-06-29Add unit test for opt.huge_threshold.Qi Wang
2018-06-29Add ctl and stats for opt.huge_threshold.Qi Wang
2018-06-29Implement huge arena: opt.huge_threshold.Qi Wang
The feature allows using a dedicated arena for huge allocations. We want the addtional arena to separate huge allocation because: 1) mixing small extents with huge ones causes fragmentation over the long run (this feature reduces VM size significantly); 2) with many arenas, huge extents rarely get reused across threads; and 3) huge allocations happen way less frequently, therefore no concerns for lock contention.
2018-06-26Add test for remote deallocation.Qi Wang
2018-05-18Hooks: Protect against reentrancy.David Goldblatt
Previously, we made the user deal with this themselves, but that's not good enough; if hooks may allocate, we should test the allocation pathways down hooks. If we're doing that, we might as well actually implement the protection for the user.
2018-05-18Tests: Shouldn't be able to change global slowness.David Goldblatt
This can help ensure that we don't leave slowness changes behind in case of resource exhaustion.
2018-05-18Hooks: Add a hook exhaustion test.David Goldblatt
When we run out of space in which to store hooks, we should return EAGAIN from the mallctl, but not otherwise misbehave.
2018-05-18Mallctl: Add experimental.hooks.[install|remove].David Goldblatt
2018-05-18Hooks: move the "extra" pointer into the hook_t itself.David Goldblatt
This simplifies the mallctl call to install a hook, which should only take a single argument.
2018-05-18Hooks: hook the realloc pathways that move/expand.David Goldblatt
2018-05-18Hooks: hook the realloc paths that act as pure malloc/free.David Goldblatt
2018-05-18Hooks: hook the pure-expand function.David Goldblatt