Commit Graph

4 Commits

Author SHA1 Message Date
Johannes Weiss 3a2fc0d39b
alloc tests: implement malloc_zone_* (#1569)
Motivation:

The Swift runtime is now using malloc_zone_*, we need to implement
replacements for these too. This is just a first pass, eventually, we
should implement _all_ replacements as `malloc_zone_memalign` which is
powerful enough to implement all others.

Modifications:

Provide new replacements.

Result:

Alloc tests work again on macOS.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-06-26 11:04:37 +01:00
Johannes Weiss 9480c27148 malloc-aggregation.d: don't forget posix_memalign (#785)
Motivation:

When counting the number of allocations it's important not to forget an
allocation function that Swift uses.

Modifications:

add posix_memalign to dev/malloc-aggregation.d

Result:

malloc aggregations accurate with recent Swift versions
2019-01-29 11:23:42 +00:00
Johannes Weiß ec47847b4b add other memory allocation functions (#366)
Motivation:

The dtrace scripts dev/malloc-aggregation.d was missing a bunch of more
rarely used memory allocation functions.

Modifications:

Added the more rarely used functions.

Result:

Better output when using dev/malloc-aggregation.d
2018-04-27 10:29:25 +01:00
Johannes Weiß 5599bfe4c8 add useful dtrace scripts to debug allocations (#352)
Motivation:

dtrace is extrmely useful when debugging allocation related issues. This
adds two scripts that have helped me many times.

Modifications:

- `dev/malloc-aggregation.d` which prints an aggregation of all
  stacks that have allocated
- `dev/boxed-existentials.d` which live prints all allocations of boxed
  existentials

Result:

sharing debugging tools is great
2018-04-25 15:23:09 +01:00