Home | History | Annotate | Download | only in unit

Lines Matching defs:tcache

74 	tcache_t *tcache = tcache_get(tsd);
75 for (szind_t i = 0; i < tcache_nbins_get(tcache->tcache_slow); i++) {
76 cache_bin_t *cache_bin = &tcache->bins[i];
77 if (tcache_bin_disabled(i, cache_bin, tcache->tcache_slow)) {
89 expect_zu_eq(tcache_bytes, *prev + diff, "tcache bytes not expected");
96 expect_d_eq(mallctl("thread.tcache.flush", NULL, NULL, NULL, 0), 0,
97 "Unexpected tcache flush failure");
149 assert_d_eq(mallctl("thread.tcache.max", (void *)&tcache_max,
220 expect_d_eq(mallctl("thread.tcache.max", NULL, NULL, (void *)&large,
223 expect_d_eq(mallctl("thread.tcache.flush", NULL, NULL, NULL, 0), 0,
224 "Unexpected tcache flush failure");
228 tcache_t *tcache = tcache_get(tsd);
229 expect_ptr_not_null(tcache, "Expected auto tcache");
233 cache_bin_t *bin = &tcache->bins[binind];
239 "Large tcache miss should count as one request");
245 "Large tcache hit should increment request count again");
248 expect_d_eq(mallctl("thread.tcache.flush", NULL, NULL, NULL, 0), 0,
249 "Unexpected tcache flush failure");
259 validate_tcache_stack(tcache_t *tcache) {
261 void *tcache_stack = tcache->bins[0].stack_head;
279 expect_true(found == expect_found, "Unexpected tcache stack source");
287 tcache_t *tcache = tsd_tcachep_get(tsd);
288 tcache_slow_t *tcache_slow = tcache->tcache_slow;
295 * auto tcache.
303 validate_tcache_stack(tcache);
306 * Close the tcache and test the set.
312 expect_d_eq(mallctl("thread.tcache.enabled", (void *)&e1, &bool_sz,
315 expect_true(e1, "Unexpected previous tcache state");
318 assert_d_eq(mallctl("thread.tcache.max", NULL, NULL,
327 assert_d_eq(mallctl("thread.tcache.max", (void *)&old_tcache_max, &sz,
333 /* Enable tcache, the set should still be valid. */
335 expect_d_eq(mallctl("thread.tcache.enabled", (void *)&e1, &bool_sz,
338 expect_false(e1, "Unexpected previous tcache state");
344 assert_d_eq(mallctl("thread.tcache.max", (void *)&old_tcache_max, &sz,
349 validate_tcache_stack(tcache);
371 validate_tcache_stack(tcache);