diff options
author | Oran Agra <oran@redislabs.com> | 2023-05-07 17:41:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 17:41:17 +0300 |
commit | 07d54dc5baa1b2e7adb5ce8e7bee398d376fe13b (patch) | |
tree | bd5b11001e44bac9cc2100dfae0af96c31bc4e99 /deps/jemalloc/test/unit/prof_active.c | |
parent | 42dd98ec191fd71528785bd7d31bd18112078f66 (diff) | |
parent | 0897c8afedc210db5f827bed9d225f24011245eb (diff) | |
download | redis-07d54dc5baa1b2e7adb5ce8e7bee398d376fe13b.tar.gz |
Merge pull request #12115 from oranagra/update_jemalloc_5_3_0
Upgrade to jemalloc 5.3.0 hoping to resolve a potential for deadlock in a fork child
see https://github.com/jemalloc/jemalloc/issues/2402
steps:
* Upgrade subtree according to the instructions in deps/README
* update iget_defrag_hint by following changes to arena_dalloc_no_tcache
Diffstat (limited to 'deps/jemalloc/test/unit/prof_active.c')
-rw-r--r-- | deps/jemalloc/test/unit/prof_active.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/deps/jemalloc/test/unit/prof_active.c b/deps/jemalloc/test/unit/prof_active.c index 850a24a77..af29e7ad2 100644 --- a/deps/jemalloc/test/unit/prof_active.c +++ b/deps/jemalloc/test/unit/prof_active.c @@ -1,14 +1,16 @@ #include "test/jemalloc_test.h" +#include "jemalloc/internal/prof_data.h" + static void mallctl_bool_get(const char *name, bool expected, const char *func, int line) { bool old; size_t sz; sz = sizeof(old); - assert_d_eq(mallctl(name, (void *)&old, &sz, NULL, 0), 0, + expect_d_eq(mallctl(name, (void *)&old, &sz, NULL, 0), 0, "%s():%d: Unexpected mallctl failure reading %s", func, line, name); - assert_b_eq(old, expected, "%s():%d: Unexpected %s value", func, line, + expect_b_eq(old, expected, "%s():%d: Unexpected %s value", func, line, name); } @@ -19,11 +21,11 @@ mallctl_bool_set(const char *name, bool old_expected, bool val_new, size_t sz; sz = sizeof(old); - assert_d_eq(mallctl(name, (void *)&old, &sz, (void *)&val_new, + expect_d_eq(mallctl(name, (void *)&old, &sz, (void *)&val_new, sizeof(val_new)), 0, "%s():%d: Unexpected mallctl failure reading/writing %s", func, line, name); - assert_b_eq(old, old_expected, "%s():%d: Unexpected %s value", func, + expect_b_eq(old, old_expected, "%s():%d: Unexpected %s value", func, line, name); } @@ -67,11 +69,11 @@ prof_sampling_probe_impl(bool expect_sample, const char *func, int line) { void *p; size_t expected_backtraces = expect_sample ? 1 : 0; - assert_zu_eq(prof_bt_count(), 0, "%s():%d: Expected 0 backtraces", func, + expect_zu_eq(prof_bt_count(), 0, "%s():%d: Expected 0 backtraces", func, line); p = mallocx(1, 0); - assert_ptr_not_null(p, "Unexpected mallocx() failure"); - assert_zu_eq(prof_bt_count(), expected_backtraces, + expect_ptr_not_null(p, "Unexpected mallocx() failure"); + expect_zu_eq(prof_bt_count(), expected_backtraces, "%s():%d: Unexpected backtrace count", func, line); dallocx(p, 0); } |