| 63 | mallctl_thread_prof_active_set_impl(a, b, __func__, __LINE__) |
| 64 | |
| 65 | static void |
| 66 | prof_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 |
nothing calls this directly
no test coverage detected