diff --git a/include/jemalloc/internal/arena_inlines_b.h b/include/jemalloc/internal/arena_inlines_b.h index 930daba0..fbb8fa18 100644 --- a/include/jemalloc/internal/arena_inlines_b.h +++ b/include/jemalloc/internal/arena_inlines_b.h @@ -98,7 +98,7 @@ arena_prof_tctx_reset(tsd_t *tsd, const void *ptr, prof_tctx_t *tctx) { } JEMALLOC_ALWAYS_INLINE void -arena_prof_alloc_time_set(tsd_t *tsd, const void *ptr, nstime_t t) { +arena_prof_alloc_time_set(tsd_t *tsd, const void *ptr, nstime_t *t) { cassert(config_prof); assert(ptr != NULL); diff --git a/include/jemalloc/internal/extent.h b/include/jemalloc/internal/extent.h index 3a20540d..fa7d1260 100644 --- a/include/jemalloc/internal/extent.h +++ b/include/jemalloc/internal/extent.h @@ -461,8 +461,8 @@ extent_prof_tctx_set(extent_t *extent, prof_tctx_t *tctx) { } static inline void -extent_prof_alloc_time_set(extent_t *extent, nstime_t t) { - nstime_copy(&extent->e_alloc_time, &t); +extent_prof_alloc_time_set(extent_t *extent, nstime_t *t) { + nstime_copy(&extent->e_alloc_time, t); } static inline bool diff --git a/include/jemalloc/internal/large_externs.h b/include/jemalloc/internal/large_externs.h index 85786bb2..a0f48b81 100644 --- a/include/jemalloc/internal/large_externs.h +++ b/include/jemalloc/internal/large_externs.h @@ -25,6 +25,6 @@ size_t large_salloc(tsdn_t *tsdn, const extent_t *extent); void large_prof_info_get(const extent_t *extent, prof_info_t *prof_info); void large_prof_tctx_set(extent_t *extent, prof_tctx_t *tctx); void large_prof_tctx_reset(extent_t *extent); -void large_prof_alloc_time_set(extent_t *extent, nstime_t time); +void large_prof_alloc_time_set(extent_t *extent, nstime_t *time); #endif /* JEMALLOC_INTERNAL_LARGE_EXTERNS_H */ diff --git a/include/jemalloc/internal/prof_inlines_b.h b/include/jemalloc/internal/prof_inlines_b.h index c6f12ca5..657e1168 100644 --- a/include/jemalloc/internal/prof_inlines_b.h +++ b/include/jemalloc/internal/prof_inlines_b.h @@ -67,7 +67,7 @@ prof_tctx_reset(tsd_t *tsd, const void *ptr, prof_tctx_t *tctx) { } JEMALLOC_ALWAYS_INLINE void -prof_alloc_time_set(tsd_t *tsd, const void *ptr, nstime_t t) { +prof_alloc_time_set(tsd_t *tsd, const void *ptr, nstime_t *t) { cassert(config_prof); assert(ptr != NULL); diff --git a/src/large.c b/src/large.c index 4d1257f6..f10b0d15 100644 --- a/src/large.c +++ b/src/large.c @@ -383,6 +383,6 @@ large_prof_tctx_reset(extent_t *extent) { } void -large_prof_alloc_time_set(extent_t *extent, nstime_t t) { +large_prof_alloc_time_set(extent_t *extent, nstime_t *t) { extent_prof_alloc_time_set(extent, t); } diff --git a/src/prof.c b/src/prof.c index 0d6da21c..4d3a8006 100644 --- a/src/prof.c +++ b/src/prof.c @@ -168,7 +168,7 @@ prof_malloc_sample_object(tsd_t *tsd, const void *ptr, size_t usize, * when free() is called. */ nstime_t t = NSTIME_ZERO_INITIALIZER; nstime_update(&t); - prof_alloc_time_set(tsd, ptr, t); + prof_alloc_time_set(tsd, ptr, &t); malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); tctx->cnts.curobjs++;