8290046: NMT: Remove unused MallocSiteTable::reset()

Reviewed-by: jiefu, zgu
This commit is contained in:
Thomas Stuefe 2022-07-11 14:07:12 +00:00
parent 0c37008917
commit 95c8022958
2 changed files with 0 additions and 26 deletions

View File

@ -178,28 +178,6 @@ MallocSiteHashtableEntry* MallocSiteTable::new_entry(const NativeCallStack& key,
return ::new (p) MallocSiteHashtableEntry(key, flags);
}
void MallocSiteTable::reset() {
for (int index = 0; index < table_size; index ++) {
MallocSiteHashtableEntry* head = _table[index];
_table[index] = NULL;
delete_linked_list(head);
}
_hash_entry_allocation_stack = NULL;
_hash_entry_allocation_site = NULL;
}
void MallocSiteTable::delete_linked_list(MallocSiteHashtableEntry* head) {
MallocSiteHashtableEntry* p;
while (head != NULL) {
p = head;
head = (MallocSiteHashtableEntry*)head->next();
if (p != hash_entry_allocation_site()) {
delete p;
}
}
}
bool MallocSiteTable::walk_malloc_site(MallocSiteWalker* walker) {
assert(walker != NULL, "NuLL walker");
return walk(walker);

View File

@ -174,10 +174,6 @@ class MallocSiteTable : AllStatic {
private:
static MallocSiteHashtableEntry* new_entry(const NativeCallStack& key, MEMFLAGS flags);
static void reset();
// Delete a bucket linked list
static void delete_linked_list(MallocSiteHashtableEntry* head);
static MallocSite* lookup_or_add(const NativeCallStack& key, uint32_t* marker, MEMFLAGS flags);
static MallocSite* malloc_site(uint32_t marker);