Making jemalloc max stack depth a runtime option

This commit is contained in:
Guangli Dai
2022-08-19 12:17:10 -07:00
committed by Qi Wang
parent 56ddbea270
commit a0734fd6ee
12 changed files with 171 additions and 11 deletions

View File

@@ -314,6 +314,7 @@ TEST_BEGIN(test_mallctl_opt) {
TEST_MALLCTL_OPT(bool, prof, prof);
TEST_MALLCTL_OPT(const char *, prof_prefix, prof);
TEST_MALLCTL_OPT(bool, prof_active, prof);
TEST_MALLCTL_OPT(unsigned, prof_bt_max, prof);
TEST_MALLCTL_OPT(ssize_t, lg_prof_sample, prof);
TEST_MALLCTL_OPT(bool, prof_accum, prof);
TEST_MALLCTL_OPT(ssize_t, lg_prof_interval, prof);

View File

@@ -129,6 +129,7 @@ TEST_END
TEST_BEGIN(test_prof_dump_hook) {
test_skip_if(!config_prof);
expect_u_eq(opt_prof_bt_max, 200, "Unexpected backtrace stack depth");
mock_dump_hook_called = false;

View File

@@ -1,6 +1,5 @@
#!/bin/sh
if [ "x${enable_prof}" = "x1" ] ; then
export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0"
export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:0,prof_bt_max:200"
fi