mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-10 06:59:05 +00:00
8290046: NMT: Remove unused MallocSiteTable::reset()
Reviewed-by: jiefu, zgu
This commit is contained in:
parent
0c37008917
commit
95c8022958
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user