diff options
author | Qi Wang <interwq@gwu.edu> | 2017-04-12 01:13:10 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-04-12 20:55:39 (GMT) |
commit | ccfe68a916baecc50fd7eae3d5be945469016e4c (patch) | |
tree | c2fcd4be72ab8b0ec11740838f57fc4ea10c046a /test | |
parent | f35213bae4ee6294a0743607637f9be8989622f1 (diff) | |
download | jemalloc-ccfe68a916baecc50fd7eae3d5be945469016e4c.zip jemalloc-ccfe68a916baecc50fd7eae3d5be945469016e4c.tar.gz jemalloc-ccfe68a916baecc50fd7eae3d5be945469016e4c.tar.bz2 |
Pass alloc_ctx down profiling path.
With this change, when profiling is enabled, we avoid doing redundant rtree
lookups. Also changed dalloc_atx_t to alloc_atx_t, as it's now used on
allocation path as well (to speed up profiling).
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/prof_tctx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/prof_tctx.c b/test/unit/prof_tctx.c index 30c6b17..ff3b2b0 100644 --- a/test/unit/prof_tctx.c +++ b/test/unit/prof_tctx.c @@ -15,7 +15,7 @@ TEST_BEGIN(test_prof_realloc) { prof_cnt_all(&curobjs_0, NULL, NULL, NULL); p = mallocx(1024, flags); assert_ptr_not_null(p, "Unexpected mallocx() failure"); - tctx_p = prof_tctx_get(tsdn, p); + tctx_p = prof_tctx_get(tsdn, p, NULL); assert_ptr_ne(tctx_p, (prof_tctx_t *)(uintptr_t)1U, "Expected valid tctx"); prof_cnt_all(&curobjs_1, NULL, NULL, NULL); @@ -25,7 +25,7 @@ TEST_BEGIN(test_prof_realloc) { q = rallocx(p, 2048, flags); assert_ptr_ne(p, q, "Expected move"); assert_ptr_not_null(p, "Unexpected rmallocx() failure"); - tctx_q = prof_tctx_get(tsdn, q); + tctx_q = prof_tctx_get(tsdn, q, NULL); assert_ptr_ne(tctx_q, (prof_tctx_t *)(uintptr_t)1U, "Expected valid tctx"); prof_cnt_all(&curobjs_2, NULL, NULL, NULL); |