Do not rollback prof idump counter in arena_prof_promote()

This commit is contained in:
Yinan Zhang
2020-04-15 11:08:25 -07:00
parent 0295aa38a2
commit 039bfd4e30
6 changed files with 1 additions and 93 deletions

View File

@@ -1061,8 +1061,6 @@ arena_prof_promote(tsdn_t *tsdn, void *ptr, size_t usize) {
edata_szind_set(edata, szind);
emap_remap(tsdn, &arena_emap_global, edata, szind, /* slab */ false);
prof_idump_rollback(tsdn, usize);
assert(isalloc(tsdn, ptr) == usize);
}

View File

@@ -50,7 +50,7 @@ bool opt_prof_accum = false;
char opt_prof_prefix[PROF_DUMP_FILENAME_LEN];
bool opt_prof_experimental_use_sys_thread_name = false;
/* Accessed via prof_idump_[accum/rollback](). */
/* Accessed via prof_idump_accum(). */
static counter_accum_t prof_idump_accumulated;
/*
@@ -655,16 +655,6 @@ prof_idump_accum_impl(tsdn_t *tsdn, uint64_t accumbytes) {
return counter_accum(tsdn, &prof_idump_accumulated, accumbytes);
}
void
prof_idump_rollback_impl(tsdn_t *tsdn, size_t usize) {
cassert(config_prof);
/* Rollback is only done on arena_prof_promote of small sizes. */
assert(SC_LARGE_MINCLASS > usize);
return counter_rollback(tsdn, &prof_idump_accumulated,
SC_LARGE_MINCLASS - usize);
}
bool
prof_dump_prefix_set(tsdn_t *tsdn, const char *prefix) {
cassert(config_prof);