1 | #ifndef JEMALLOC_INTERNAL_PROF_HOOK_H |
2 | #define JEMALLOC_INTERNAL_PROF_HOOK_H |
3 | |
4 | /* |
5 | * The hooks types of which are declared in this file are experimental and |
6 | * undocumented, thus the typedefs are located in an 'internal' header. |
7 | */ |
8 | |
9 | /* |
10 | * A hook to mock out backtrace functionality. This can be handy, since it's |
11 | * otherwise difficult to guarantee that two allocations are reported as coming |
12 | * from the exact same stack trace in the presence of an optimizing compiler. |
13 | */ |
14 | typedef void (*prof_backtrace_hook_t)(void **, unsigned *, unsigned); |
15 | |
16 | /* |
17 | * A callback hook that notifies about recently dumped heap profile. |
18 | */ |
19 | typedef void (*prof_dump_hook_t)(const char *filename); |
20 | |
21 | #endif /* JEMALLOC_INTERNAL_PROF_HOOK_H */ |
22 | |