Yinan Zhang
09eda2c9b6
Add unit tests for usize in prof recent records
2020-09-09 13:31:35 -07:00
David Goldblatt
131b1b5338
Rename ecache_grow -> geom_grow.
...
We're about to start using it outside of the ecaches, in the HPA central
allocator.
2020-08-19 16:53:21 -07:00
David Goldblatt
b399463fba
flat_bitmap unit test: Silence a warning.
2020-08-17 12:50:27 -07:00
David Goldblatt
b0ffa39cac
Mallctl stress test: fix a type.
...
The mallctlbymib_long helper was copy-pasted from mallctlbymib_short, and
incorrectly used its output variable (a char *) rather than the output variable
of the mallctl call it was using (a uint64_t), causing breakages when
sizeof(char *) differed from sizeof(uint64_t).
2020-08-17 12:50:14 -07:00
David Goldblatt
753bbf1849
Benchmarks: Also print ns / iter.
...
This is often what we really care about. It's not easy to do the division
mentally in all cases.
2020-08-13 10:03:15 -07:00
David Goldblatt
7b187360e9
IO: Support 0-padding for unsigned numbers.
2020-08-13 10:03:15 -07:00
David Goldblatt
32d4673221
Add a mallctl speed stress test.
2020-08-13 10:03:15 -07:00
Yinan Zhang
8f9e958e1e
Add alignment stress test for rallocx
2020-08-11 11:56:43 -07:00
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
f6cf5eb388
Add mallctl for batch allocation API
2020-07-31 09:16:50 -07:00
Yinan Zhang
978f830ee3
Add batch allocation API
2020-07-31 09:16:50 -07:00
David Goldblatt
ddb8dc4ad0
FB: Add range iteration support.
2020-07-30 15:25:23 -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
7fde6ac490
Nbits: Add a couple more interesting sizes.
...
Previously, all tests with more than two levels came in powers of 2. It's
usefule to check cases where we have a partially filled group at above the
second level.
2020-07-30 15:25:23 -07:00
David Goldblatt
efeab1f498
bitset test: Pull NBITS_TAB into its own file.
2020-07-30 15:25:23 -07:00
David Goldblatt
22da836094
bit_util: Add fls_ functions; "find last set".
...
These simplify a lot of the bit_util module, which had grown bits and pieces of
this functionality across a variety of places over the years.
While we're here, kill off BIT_UTIL_INLINE and don't do reentrancy testing for
bit_util.
2020-07-30 15:25:23 -07:00
David Goldblatt
1ed0288d9c
bit_util: Change ffs functions indexing.
...
Making these 0-based instead of 1-based makes calling code simpler and will be
more consistent with functions introduced in subsequent diffs.
2020-07-30 15:25:23 -07:00
David Goldblatt
471eb5913c
PAC: Move in decay rate setting.
2020-07-09 13:41:04 -07:00
David Goldblatt
6a2774719f
PA->PAC: Move in decay functions.
2020-07-09 13:41:04 -07:00
David Goldblatt
7391382349
PA->PAC: Move in stats.
2020-07-09 13:41:04 -07:00
David Goldblatt
db211eefbf
PAC: Move in decay.
2020-07-09 13:41:04 -07:00
David Goldblatt
c81e389996
PAC: Move in ecache_grow.
2020-07-09 13:41:04 -07:00
David Goldblatt
777b0ba965
Add PAC: Page allocator classic.
...
For now, this is just a stub containing the ecaches, with no surrounding code
changed. Eventually all the core allocator bits will be moved in, in the
subsequent stack of commits.
2020-07-09 13:41:04 -07:00
Yinan Zhang
c2e7a06392
No need to intercept prof_dump_header() in tests
2020-06-29 14:27:50 -07:00
Yinan Zhang
f58ebdff7a
Generalize prof_cnt_all() for testing
2020-06-29 14:27:50 -07:00
Yinan Zhang
d4259ea53b
Simplify signatures for prof dump functions
2020-06-29 14:27:50 -07:00
Yinan Zhang
1f5fe3a3e3
Pass write callback explicitly in prof_data
2020-06-29 14:27:50 -07:00
Yinan Zhang
4736fb4fc9
Move file handling logic in prof_data to prof_sys
2020-06-29 14:27:50 -07:00
Yinan Zhang
03ae509f32
Create prof_sys module for reading system thread name
2020-06-29 14:27:50 -07:00
Yinan Zhang
8118056c03
Expose prof_data testing internals only in prof tests
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
f307b25804
Only replace the dump file opening function in test
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
b7858abfc0
Expose prof testing internal functions
2020-06-19 09:16:51 -07:00
David Goldblatt
7e09a57b39
stress/sizes: Fix an off-by-one issue.
...
Algorithmically, a size greater than 1024 ZB could access one-past-the-end of
the sizes array. This couldn't really happen since SIZE_MAX is less than 1024
ZB on all platforms we support (and we pick the arguments to this function to be
reasonable anyways), but it's not like there's any reason *not* to fix it,
either.
2020-06-16 10:34:19 -07:00
David Goldblatt
dcfa6fd507
stress/sizes: Add a couple more types.
2020-06-16 10:34:19 -07:00
Jon Haslam
4aea743279
High Resolution Timestamps for Profiling
2020-06-15 12:12:49 -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
Yinan Zhang
857ebd3daf
Make edata pointer on prof recent record an atomic fence
2020-06-09 17:03:05 -07:00
Yinan Zhang
b8bdea6b26
Fix: prof_recent_alloc_max_ctl_read() does not take tsd
2020-06-09 17:03:05 -07:00
David Goldblatt
d338dd45d7
Tcache: Make incremental gc bytes configurable.
2020-05-16 13:34:23 -07:00
David Goldblatt
181093173d
Tcache: make slot sizing configurable.
2020-05-16 13:34:23 -07:00
David Goldblatt
97b7a9cf77
Add a fill/flush microbenchmark.
2020-05-16 13:34:23 -07:00
David Goldblatt
eda9c2858f
Edata: zero stack edatas before initializing.
...
This avoids some UB. No compilers take advantage of it for now, but no sense in
tempting fate.
2020-05-14 10:30:20 -07:00