summaryrefslogtreecommitdiff
path: root/deps/jemalloc/include/jemalloc/internal/prof_hook.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/jemalloc/include/jemalloc/internal/prof_hook.h')
-rw-r--r--deps/jemalloc/include/jemalloc/internal/prof_hook.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/jemalloc/include/jemalloc/internal/prof_hook.h b/deps/jemalloc/include/jemalloc/internal/prof_hook.h
new file mode 100644
index 000000000..150d19d3d
--- /dev/null
+++ b/deps/jemalloc/include/jemalloc/internal/prof_hook.h
@@ -0,0 +1,21 @@
+#ifndef JEMALLOC_INTERNAL_PROF_HOOK_H
+#define JEMALLOC_INTERNAL_PROF_HOOK_H
+
+/*
+ * The hooks types of which are declared in this file are experimental and
+ * undocumented, thus the typedefs are located in an 'internal' header.
+ */
+
+/*
+ * A hook to mock out backtrace functionality. This can be handy, since it's
+ * otherwise difficult to guarantee that two allocations are reported as coming
+ * from the exact same stack trace in the presence of an optimizing compiler.
+ */
+typedef void (*prof_backtrace_hook_t)(void **, unsigned *, unsigned);
+
+/*
+ * A callback hook that notifies about recently dumped heap profile.
+ */
+typedef void (*prof_dump_hook_t)(const char *filename);
+
+#endif /* JEMALLOC_INTERNAL_PROF_HOOK_H */