MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / prof_sampling_probe_impl

Function prof_sampling_probe_impl

deps/jemalloc/test/unit/prof_active.c:65–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 mallctl_thread_prof_active_set_impl(a, b, __func__, __LINE__)
64
65static void
66prof_sampling_probe_impl(bool expect_sample, const char *func, int line) {
67 void *p;
68 size_t expected_backtraces = expect_sample ? 1 : 0;
69
70 assert_zu_eq(prof_bt_count(), 0, "%s():%d: Expected 0 backtraces", func,
71 line);
72 p = mallocx(1, 0);
73 assert_ptr_not_null(p, "Unexpected mallocx() failure");
74 assert_zu_eq(prof_bt_count(), expected_backtraces,
75 "%s():%d: Unexpected backtrace count", func, line);
76 dallocx(p, 0);
77}
78#define prof_sampling_probe(a) \
79 prof_sampling_probe_impl(a, __func__, __LINE__)
80

Callers

nothing calls this directly

Calls 1

prof_bt_countFunction · 0.50

Tested by

no test coverage detected