Yinan Zhang
4736fb4fc9
Move file handling logic in prof_data to prof_sys
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
f307b25804
Only replace the dump file opening function in test
2020-06-29 14:27:50 -07:00
Yinan Zhang
21dfa4300d
Change assert_* to expect_* in tests
...
```
grep -Irl assert_ test/ | xargs sed -i \
's/witness_assert/witness_do_not_replace/g';
grep -Irl assert_ test/ | xargs sed -i \
's/malloc_mutex_assert_owner/malloc_mutex_do_not_replace_owner/g';
grep -Ir assert_ test/ | grep -o "[_a-zA-Z]*assert_[_a-zA-Z]*" | \
grep -v "^assert_"; # confirm no output
grep -Irl assert_ test/ | xargs sed -i 's/assert_/expect_/g';
grep -Irl witness_do_not_replace test/ | xargs sed -i \
's/witness_do_not_replace/witness_assert/g';
grep -Irl malloc_mutex_do_not_replace_owner test/ | xargs sed -i \
's/malloc_mutex_do_not_replace_owner/malloc_mutex_assert_owner/g';
```
2020-02-19 16:03:16 -08:00
David Goldblatt
0a0fcd3e6a
Add hooking functionality
...
This allows us to hook chosen functions and do interesting things there (in
particular: reentrancy checking).
2017-04-07 14:10:27 -07:00
Jason Evans
de49674fbd
Use MALLOC_CONF rather than malloc_conf for tests.
...
malloc_conf does not reliably work with MSVC, which complains of
"inconsistent dll linkage", i.e. its inability to support the
application overriding malloc_conf when dynamically linking/loading.
Work around this limitation by adding test harness support for per test
shell script sourcing, and converting all tests to use MALLOC_CONF
instead of malloc_conf.
2017-02-23 08:57:02 -08:00
Jason Evans
c0cc5db871
Replace tabs following #define with spaces.
...
This resolves #564 .
2017-01-20 21:45:53 -08:00
Jason Evans
f408643a4c
Remove extraneous parens around return arguments.
...
This resolves #540 .
2017-01-20 21:43:07 -08:00
Jason Evans
c4c2592c83
Update brace style.
...
Add braces around single-line blocks, and remove line breaks before
function-opening braces.
This resolves #537 .
2017-01-20 21:43:07 -08:00
Jason Evans
ffbb7dac3d
Remove leading blank lines from function bodies.
...
This resolves #535 .
2017-01-13 14:49:24 -08:00
Jason Evans
977103c897
Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *).
...
This avoids warnings in some cases, and is otherwise generally good
hygiene.
2016-10-27 21:31:25 -07:00
Jason Evans
cc9e626ea9
Refactor permuted backtrace test allocation.
...
Refactor permuted backtrace test allocation that was originally used
only by the prof_accum test, so that it can be used by other heap
profiling test binaries.
2014-10-01 22:28:23 -07:00
Jason Evans
ad47e8996e
Break prof_accum into multiple compilation units.
...
Break prof_accum into multiple compilation units, in order to thwart
compiler optimizations such as inlining and tail call optimization that
would alter backtraces.
2014-02-24 22:00:10 -08:00
Jason Evans
526e4a59a2
Prevent inlining of backtraced test functions.
...
Inlining of alloc_0() and alloc_1() would prevent generation of unique
backtraces, upon which the test code relies.
2014-01-29 10:58:32 -08:00
Jason Evans
898960247a
Subvert tail call optimization in backtrace test.
...
Re-structure alloc_[01](), which are mutually tail-recursive functions,
to do (unnecessary) work post-recursion so that the compiler cannot
perform tail call optimization, thus preserving intentionally unique
call paths in captured backtraces.
2014-01-21 14:59:40 -08:00
Jason Evans
772163b4f3
Add heap profiling tests.
...
Fix a regression in prof_dump_ctx() due to an uninitized variable. This
was caused by revision 4f37ef693e
, so no
releases are affected.
2014-01-17 15:40:52 -08:00