David Goldblatt
eaed1e39be
Add sized-delete size-checking functionality.
...
The existing checks are good at finding such issues (on tcache flush), but not
so good at pinpointing them. Debug mode can find them, but sometimes debug mode
slows down a program so much that hard-to-hit bugs can take a long time to
crash.
This commit adds functionality to keep programs mostly on their fast paths,
while also checking every sized delete argument they get.
2020-08-05 19:34:05 -07:00
David Goldblatt
81c2f841e5
Add a simple utility to detect profiling bias.
2020-08-05 18:33:55 -07:00
Yinan Zhang
e032a1a1de
Add a stress test for batch allocation
2020-08-03 09:36:40 -07:00
Yinan Zhang
978f830ee3
Add batch allocation API
2020-07-31 09:16:50 -07:00
David Goldblatt
ceee823519
Add flat_bitmap.
...
The flat_bitmap module offers an extended API, at the cost of decreased
performance in the case of very large bitmaps.
2020-07-30 15:25:23 -07:00
David Goldblatt
7efcb946c4
PAC: Add an init function.
2020-07-09 13:41:04 -07:00
Yinan Zhang
03ae509f32
Create prof_sys module for reading system thread name
2020-06-29 14:27:50 -07:00
Yinan Zhang
5d292b5660
Push error handling logic out of core dumping logic
2020-06-29 14:27:50 -07:00
Yinan Zhang
d8cea87562
Move size inspections to test/analyze
2020-06-26 09:45:28 -07:00
Yinan Zhang
537a4bedb4
Add a tool to examine random number distributions
2020-06-26 09:45:28 -07:00
Yinan Zhang
d460333efb
Improve naming for prof system thread name option
2020-06-24 14:32:01 -07:00
Yinan Zhang
092fcac0b4
Remove unnecessary source files
2020-06-19 12:15:44 -07:00
David Goldblatt
d82a164d0d
Add thread.peak.[read|reset] mallctls.
...
These can be used to track net allocator activity on a per-thread basis.
2020-06-11 13:54:22 -07:00
David Goldblatt
fe7108305a
Add peak_t, for tracking allocator net max.
2020-06-11 13:54:22 -07:00
David Goldblatt
17a64fe91c
Add a small program to print data structure sizes.
2020-06-11 08:13:38 -07:00
David Goldblatt
97b7a9cf77
Add a fill/flush microbenchmark.
2020-05-16 13:34:23 -07:00
David Goldblatt
2c09d43494
Add a benchmark of large allocations.
2020-05-04 12:36:45 -07:00
David Goldblatt
26e9a3103d
PA: Simple decay test.
2020-04-10 13:12:47 -07:00
David Goldblatt
f29f6090f5
PA: Add pa_extra.c and put PA forking there.
2020-04-10 13:12:47 -07:00
David Goldblatt
48a2cd6d79
Decay: Add a (mostly stub) test case.
2020-04-10 13:12:47 -07:00
David Goldblatt
bf55e58e63
Rename test/unit/decay -> test/unit/arena_decay.
...
This is really more of an end-to-end test at the arena level; it's not just of
the decay code in particular any more.
2020-04-10 13:12:47 -07:00
David Goldblatt
4d090d23f1
Decay: Introduce a stub .c file.
2020-04-10 13:12:47 -07:00
David Goldblatt
12be9f5727
Add a stub PA module -- a page allocator.
2020-04-10 13:12:47 -07:00
David T. Goldblatt
d936b46d3a
Add malloc_conf_2_conf_harder
...
This comes in handy when you're just a user of a canary system who wants to
change settings set by the configuration system itself.
2020-03-31 06:25:08 -07:00
Yinan Zhang
2256ef8961
Add option to fetch system thread name on each prof sample
2020-03-24 21:39:57 -07:00
David Goldblatt
734109d9c2
Edata cache: add a unit test.
2020-03-12 11:58:09 -07:00
David Goldblatt
909c501b07
Cache_bin: Shouldn't know about tcache.
...
Instead, have it take the cache_bin_info_ts to use by pointer. While we're
here, add a src file for the cache bin.
2020-03-12 11:54:19 -07:00
David Goldblatt
01f255161c
Add emap, for tracking extent locking.
2020-02-17 10:50:51 -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
a72ea0db60
Restructure and correct sleep utility for testing
2020-01-21 16:51:26 -08:00
Yinan Zhang
6d8e616902
Make buffered writer an independent module
2020-01-10 11:59:02 -08:00
Yinan Zhang
9a60cf54ec
Last-N profiling mode
2019-12-30 15:58:57 -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
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
7859184179
Pull out edata_t caching into its own module.
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
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
ba8b9ecbcb
Add ehooks module
2019-12-20 10:18:40 -08:00
Qi Wang
9c59abe42a
Fix a typo in Makefile.
2019-11-11 12:17:08 -08:00
Yinan Zhang
152c0ef954
Build a general purpose thread event handler
2019-11-04 11:15:50 -08:00
David T. Goldblatt
de81a4eada
Add stats counters for number of zero reallocs
2019-10-29 17:48:44 -07:00
David T. Goldblatt
9cfa805947
Realloc: Make behavior of realloc(ptr, 0) configurable.
2019-10-29 17:48:44 -07:00
David T. Goldblatt
e6180fe1b4
Eset: Add a source file.
...
This will let us move extents_* functions over one by one.
2019-09-23 23:06:27 -07:00
David T. Goldblatt
723ccc6c27
Extents: Split out extent struct.
2019-09-23 23:06:27 -07:00
Qi Wang
7599c82d48
Redesign the cache bin metadata for fast path.
...
Implement the pointer-based metadata for tcache bins --
- 3 pointers are maintained to represent each bin;
- 2 of the pointers are compressed on 64-bit;
- is_full / is_empty done through pointer comparison;
Comparing to the previous counter based design --
- fast-path speed up ~15% in benchmarks
- direct pointer comparison and de-reference
- no need to access tcache_bin_info in common case
2019-08-19 12:21:44 -07:00
Yinan Zhang
7fc6b1b259
Add buffered writer
...
The buffered writer adopts a signature identical to `write_cb`,
so that it can be plugged into anywhere `write_cb` appears.
2019-08-09 09:44:29 -07:00
Yinan Zhang
07ce2434bf
Refactor profiling
...
Refactored core profiling codebase into two logical parts:
(a) `prof_data.c`: core internal data structure managing & dumping;
(b) `prof.c`: mutexes & outward-facing APIs.
Some internal functions had to be exposed out, but there are not
that many of them if the modularization is (hopefully) clean enough.
2019-08-07 19:48:28 -07:00
Yinan Zhang
56126d0d2d
Refactor prof log
...
Prof logging is conceptually seperate from core profiling, so
split it out as a module of its own. There are a few internal
functions that had to be exposed but I think it is a fair trade-off.
2019-08-07 13:53:45 -07:00