summaryrefslogtreecommitdiffstats
path: root/memory/jemalloc/src/test/unit/prof_idump.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-04-27 19:16:45 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-04-27 19:16:45 +0200
commit43034a36e132ac4394e26cbfb4d855bd6f5114b3 (patch)
treeaee5502c6b17283b80ff2bf0706f97622df5d355 /memory/jemalloc/src/test/unit/prof_idump.c
parent077c63084488ac38c1c44e8cdaa9c33086f0a649 (diff)
downloadUXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar
UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar.gz
UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar.lz
UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.tar.xz
UXP-43034a36e132ac4394e26cbfb4d855bd6f5114b3.zip
Remove jemalloc 4 from our tree.
Diffstat (limited to 'memory/jemalloc/src/test/unit/prof_idump.c')
-rw-r--r--memory/jemalloc/src/test/unit/prof_idump.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/memory/jemalloc/src/test/unit/prof_idump.c b/memory/jemalloc/src/test/unit/prof_idump.c
deleted file mode 100644
index bdea53ecd..000000000
--- a/memory/jemalloc/src/test/unit/prof_idump.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "test/jemalloc_test.h"
-
-#ifdef JEMALLOC_PROF
-const char *malloc_conf =
- "prof:true,prof_accum:true,prof_active:false,lg_prof_sample:0,"
- "lg_prof_interval:0";
-#endif
-
-static bool did_prof_dump_open;
-
-static int
-prof_dump_open_intercept(bool propagate_err, const char *filename)
-{
- int fd;
-
- did_prof_dump_open = true;
-
- fd = open("/dev/null", O_WRONLY);
- assert_d_ne(fd, -1, "Unexpected open() failure");
-
- return (fd);
-}
-
-TEST_BEGIN(test_idump)
-{
- bool active;
- void *p;
-
- test_skip_if(!config_prof);
-
- active = true;
- assert_d_eq(mallctl("prof.active", NULL, NULL, &active, sizeof(active)),
- 0, "Unexpected mallctl failure while activating profiling");
-
- prof_dump_open = prof_dump_open_intercept;
-
- did_prof_dump_open = false;
- p = mallocx(1, 0);
- assert_ptr_not_null(p, "Unexpected mallocx() failure");
- dallocx(p, 0);
- assert_true(did_prof_dump_open, "Expected a profile dump");
-}
-TEST_END
-
-int
-main(void)
-{
-
- return (test(
- test_idump));
-}