mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 16:43:33 +03:00
Restructure setters for profiling info
Explicitly define three setters: - `prof_tctx_reset()`: set `prof_tctx` to `1U`, if we don't know in advance whether the allocation is large or not; - `prof_tctx_reset_sampled()`: set `prof_tctx` to `1U`, if we already know in advance that the allocation is large; - `prof_info_set()`: set a real `prof_tctx`, and also set other profiling info e.g. the allocation time. Code structure wise, the prof level is kept as a thin wrapper, the large level only provides low level setter APIs, and the arena level carries out the main logic.
This commit is contained in:
parent
1d01e4c770
commit
4afd709d1f
5 changed files with 29 additions and 35 deletions
|
|
@ -23,8 +23,7 @@ void large_dalloc_finish(tsdn_t *tsdn, extent_t *extent);
|
|||
void large_dalloc(tsdn_t *tsdn, extent_t *extent);
|
||||
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_info_set(extent_t *extent, prof_tctx_t *tctx);
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_LARGE_EXTERNS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue