Rename prof_tctx to alloc_tctx in prof_info_t
This commit is contained in:
@@ -63,7 +63,7 @@ arena_prof_info_get(tsd_t *tsd, const void *ptr, alloc_ctx_t *alloc_ctx,
|
||||
large_prof_info_get(extent, prof_info);
|
||||
} else {
|
||||
memset(prof_info, 0, sizeof(prof_info_t));
|
||||
prof_info->prof_tctx = (prof_tctx_t *)(uintptr_t)1U;
|
||||
prof_info->alloc_tctx = (prof_tctx_t *)(uintptr_t)1U;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -336,7 +336,7 @@ extent_slab_data_get_const(const extent_t *extent) {
|
||||
static inline void
|
||||
extent_prof_info_get(const extent_t *extent, prof_info_t *prof_info) {
|
||||
assert(prof_info != NULL);
|
||||
prof_info->prof_tctx = (prof_tctx_t *)atomic_load_p(
|
||||
prof_info->alloc_tctx = (prof_tctx_t *)atomic_load_p(
|
||||
&extent->e_prof_tctx, ATOMIC_ACQUIRE);
|
||||
prof_info->alloc_time = extent->e_alloc_time;
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@ prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
|
||||
}
|
||||
|
||||
sampled = ((uintptr_t)tctx > (uintptr_t)1U);
|
||||
old_sampled = ((uintptr_t)old_prof_info->prof_tctx > (uintptr_t)1U);
|
||||
old_sampled = ((uintptr_t)old_prof_info->alloc_tctx > (uintptr_t)1U);
|
||||
moved = (ptr != old_ptr);
|
||||
|
||||
if (unlikely(sampled)) {
|
||||
@@ -186,7 +186,7 @@ prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
|
||||
} else {
|
||||
prof_info_t prof_info;
|
||||
prof_info_get(tsd, ptr, NULL, &prof_info);
|
||||
assert((uintptr_t)prof_info.prof_tctx == (uintptr_t)1U);
|
||||
assert((uintptr_t)prof_info.alloc_tctx == (uintptr_t)1U);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -209,7 +209,7 @@ prof_free(tsd_t *tsd, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx) {
|
||||
cassert(config_prof);
|
||||
assert(usize == isalloc(tsd_tsdn(tsd), ptr));
|
||||
|
||||
if (unlikely((uintptr_t)prof_info.prof_tctx > (uintptr_t)1U)) {
|
||||
if (unlikely((uintptr_t)prof_info.alloc_tctx > (uintptr_t)1U)) {
|
||||
prof_free_sampled_object(tsd, usize, &prof_info);
|
||||
}
|
||||
}
|
||||
|
@@ -98,7 +98,7 @@ typedef rb_tree(prof_tctx_t) prof_tctx_tree_t;
|
||||
|
||||
struct prof_info_s {
|
||||
/* Points to the prof_tctx_t corresponding to the allocation. */
|
||||
prof_tctx_t *prof_tctx;
|
||||
prof_tctx_t *alloc_tctx;
|
||||
/* Time when the allocation was made. */
|
||||
nstime_t alloc_time;
|
||||
};
|
||||
|
Reference in New Issue
Block a user