Qi Wang
c6bfe55857
Update the tsd description.
2020-02-04 13:07:05 -08:00
Qi Wang
e896522616
Abbreviate thread-event to te.
2020-02-04 13:07:05 -08:00
Qi Wang
5e500523a0
Remove thread_event_boot().
2020-02-04 00:18:15 -08:00
Qi Wang
97dd79db6c
Implement deallocation events.
...
Make the event module to accept two event types, and pass around the event
context. Use bytes-based events to trigger tcache GC on deallocation, and get
rid of the tcache ticker.
2020-02-04 00:18:15 -08:00
Qi Wang
974222c626
Add safety check on sdallocx slow / sampled path.
2020-01-31 00:04:22 -08:00
Qi Wang
88d9eca848
Enforce page alignment for sampled allocations.
...
This allows sampled allocations to be checked through alignment, therefore
enable sized deallocation regardless of cache_oblivious.
2020-01-31 00:04:22 -08:00
Qi Wang
0f552ed673
Don't purge huge extents when decay is off.
2020-01-30 14:40:38 -08:00
Qi Wang
38a48e5741
Set reentrancy to 1 for tsd_state_purgatory.
...
Reentrancy is already set for other non-nominal tsd states (reincarnated and
minimal_initialized). Add purgatory to be safe and consistent.
2020-01-30 13:55:20 -08:00
Qi Wang
88b0e03a4e
Implement opt.stats_interval and the _opts options.
...
Add options stats_interval and stats_interval_opts to allow interval based stats
printing. This provides an easy way to collect stats without code changes,
because opt.stats_print may not work (some binaries never exit).
2020-01-29 09:57:55 -08:00
Qi Wang
d71a145ec1
Chagne prof_accum_t to counter_accum_t for general purpose.
2020-01-29 09:57:55 -08:00
Yinan Zhang
f81341a48b
Fallback to unbuffered printing if OOM
2020-01-21 17:09:44 -08:00
David Goldblatt
bd3be8e0b1
Remove commit parameter to ecache functions.
...
No caller ever wants uncommitted memory.
2020-01-17 10:54:56 -08:00
Qi Wang
dab81bd315
Rework and fix the assertions on malloc fastpath.
...
The first half of the malloc fastpath may execute before malloc_init. Make the
assertions work in that case.
2020-01-14 15:00:41 -08:00
Yinan Zhang
2b604a3016
Record request size in prof recent entries
2020-01-10 12:01:01 -08:00
Yinan Zhang
40a391408c
Define constructor for buffered writer argument
2020-01-10 11:59:02 -08:00
Yinan Zhang
6d8e616902
Make buffered writer an independent module
2020-01-10 11:59:02 -08:00
Yinan Zhang
6b6b4709b3
Unify buffered writer naming
2020-01-09 14:31:31 -08:00
Yinan Zhang
9a60cf54ec
Last-N profiling mode
2019-12-30 15:58:57 -08:00
Yinan Zhang
7a27a05940
Delete tdata states used for cleanup
2019-12-30 15:58:57 -08:00
Yinan Zhang
e98ddf7987
Fix unlikely condition in arena_prof_info_get()
2019-12-30 15:58:57 -08:00
Yinan Zhang
3fa142cf39
Remove _externs from prof internal header names
2019-12-23 11:14:15 -08:00
Yinan Zhang
112dc36dd5
Handle log_mtx during forking
2019-12-20 17:17:48 -08:00
Yinan Zhang
ea42174d07
Refactor profiling headers
2019-12-20 17:17:48 -08:00
David Goldblatt
6342da0970
Ehooks: Further optimize default merge case.
...
This avoids the cost of an iealloc in cases where the user uses the default
merge hook without using the default extent hooks.
2019-12-20 10:18:40 -08:00
David Goldblatt
e210ccc57e
Move extent2 -> extent.
...
Eventually, we may fully break off the extent module; but not for some time. If
it's going to live on in a non-transitory state, it might as well have the nicer
name.
2019-12-20 10:18:40 -08:00
David Goldblatt
2f4fa80414
Rename extents -> ecache.
2019-12-20 10:18:40 -08:00
David Goldblatt
56cc56b692
Break extent split dependence on arena.
2019-12-20 10:18:40 -08:00
David Goldblatt
0aa9769fb0
Break commit functions' arena dependence
2019-12-20 10:18:40 -08:00
David Goldblatt
576d7047ab
Ecache: Should know its arena_ind.
...
What we call an arena_ind is really the index associated with some particular
set of ehooks; the arena is just the user-visible portion of that. Making this
explicit, and reframing checks in terms of that, makes the code simpler and
cleaner, and helps us avoid passing the arena itself all throughout extent code.
This lets us put back an arena-specific assert.
2019-12-20 10:18:40 -08:00
David Goldblatt
372042a082
Remove merge dependence on the arena.
2019-12-20 10:18:40 -08:00
David Goldblatt
9cad5639ff
Ehooks: remove arena_ind parameter.
...
This lives within the ehooks_t now, so that callers don't need to know it.
2019-12-20 10:18:40 -08:00
David Goldblatt
57fe99d4be
Move relevant index into the ehooks_t itself.
...
It's always passed into the ehooks; keeping it colocated lets us avoid passing
the arena everywhere.
2019-12-20 10:18:40 -08:00
David Goldblatt
c792f3e4ab
edata_cache: Remember the associated base_t.
...
This will save us some trouble down the line when we stop passing arena pointers
everywhere; we won't have to pass around a base_t pointer either.
2019-12-20 10:18:40 -08:00
David Goldblatt
ae23e5f426
Unify extent_alloc_wrapper with the other wrappers.
...
Previously, it was really more like extents_alloc (it looks in an ecache for an
extent to reuse as its primary allocation pathway). Make that pathway more
explciitly like extents_alloc, and rename extent_alloc_wrapper_hard accordingly.
2019-12-20 10:18:40 -08:00
David Goldblatt
d8b0b66c6c
Put extent_state_t into ecache as well as eset.
2019-12-20 10:18:40 -08:00
David Goldblatt
98eb40e563
Move delay_coalesce from the eset to the ecache.
2019-12-20 10:18:40 -08:00
David Goldblatt
bb70df8e5b
Extent refactor: Introduce ecache module.
...
This will eventually completely wrap the eset, and handle concurrency,
allocation, and deallocation. For now, we only pull out the mutex from the
eset.
2019-12-20 10:18:40 -08:00
David Goldblatt
0704516245
Ehooks: Add head tracking.
2019-12-20 10:18:40 -08:00
David Goldblatt
09475bf8ac
extent_may_dalloc -> ehooks_dalloc_will_fail
2019-12-20 10:18:40 -08:00
David Goldblatt
7859184179
Pull out edata_t caching into its own module.
2019-12-20 10:18:40 -08:00
David Goldblatt
a7862df616
Rename extent_t to edata_t.
...
This frees us up from the unfortunate extent/extent2 naming collision.
2019-12-20 10:18:40 -08:00
David Goldblatt
865debda22
Rename extent.h -> edata.h.
...
This name is slightly pithier; a full-on rename will come shortly.
2019-12-20 10:18:40 -08:00
David Goldblatt
a738a66b5c
Ehooks: Add some debug zero and addr checks.
...
These help make sure that the ehooks return properly zeroed memory when required
to.
2019-12-20 10:18:40 -08:00
David Goldblatt
4b2e5ee8b9
Ehooks: Add a "zero" ehook.
...
This is the first API expansion. It lets the hooks pick where and how to purge
within themselves.
2019-12-20 10:18:40 -08:00
David Goldblatt
403f2d1664
Extents: Split out introspection functionality.
...
This isn't really part of the core extent allocation facilities. Especially as
this module grows, having it in its own place may come in handy.
2019-12-20 10:18:40 -08:00
David Goldblatt
92a511d385
Make extent module hermetic.
...
In the form of extent2.h. The naming leaves something to be desired, but I'll
leave that for a later diff.
2019-12-20 10:18:40 -08:00
David Goldblatt
39fdc690a0
Ehooks comments and cleanup.
2019-12-20 10:18:40 -08:00
David Goldblatt
c8dae890c8
Extent -> Ehooks: Move over default hooks.
2019-12-20 10:18:40 -08:00
David Goldblatt
2fe5108263
Extent -> Ehooks: Move merge hook.
2019-12-20 10:18:40 -08:00
David Goldblatt
1fff4d2ee3
Extent -> Ehooks: Move split hook.
2019-12-20 10:18:40 -08:00