Simplify time setting and getting for prof log
This commit is contained in:
@@ -169,7 +169,7 @@ prof_malloc_sample_object(tsdn_t *tsdn, const void *ptr, size_t usize,
|
||||
* when free() is called. */
|
||||
nstime_t t = NSTIME_ZERO_INITIALIZER;
|
||||
nstime_update(&t);
|
||||
prof_alloc_time_set(tsdn, ptr, NULL, t);
|
||||
prof_alloc_time_set(tsdn, ptr, t);
|
||||
|
||||
malloc_mutex_lock(tsdn, tctx->tdata->lock);
|
||||
tctx->cnts.curobjs++;
|
||||
|
@@ -229,8 +229,7 @@ prof_try_log(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx) {
|
||||
log_tables_initialized = true;
|
||||
}
|
||||
|
||||
nstime_t alloc_time = prof_alloc_time_get(tsd_tsdn(tsd), ptr,
|
||||
(alloc_ctx_t *)NULL);
|
||||
nstime_t alloc_time = prof_alloc_time_get(tsd_tsdn(tsd), ptr);
|
||||
nstime_t free_time = NSTIME_ZERO_INITIALIZER;
|
||||
nstime_update(&free_time);
|
||||
|
||||
|
Reference in New Issue
Block a user