mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-20 10:55:39 +03:00
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).
This commit is contained in:
parent
f35213bae4
commit
ccfe68a916
9 changed files with 133 additions and 82 deletions
|
|
@ -234,7 +234,7 @@ prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated) {
|
|||
void
|
||||
prof_malloc_sample_object(tsdn_t *tsdn, const void *ptr, size_t usize,
|
||||
prof_tctx_t *tctx) {
|
||||
prof_tctx_set(tsdn, ptr, usize, tctx);
|
||||
prof_tctx_set(tsdn, ptr, usize, NULL, tctx);
|
||||
|
||||
malloc_mutex_lock(tsdn, tctx->tdata->lock);
|
||||
tctx->cnts.curobjs++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue