Mercurial > hg > graal-compiler
diff src/share/vm/classfile/dictionary.cpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | b2cd0ee8f778 |
children | da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/classfile/dictionary.cpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/classfile/dictionary.cpp Thu Jun 28 17:03:16 2012 -0400 @@ -36,16 +36,16 @@ Dictionary::Dictionary(int table_size) - : TwoOopHashtable<klassOop>(table_size, sizeof(DictionaryEntry)) { + : TwoOopHashtable<klassOop, mtClass>(table_size, sizeof(DictionaryEntry)) { _current_class_index = 0; _current_class_entry = NULL; }; -Dictionary::Dictionary(int table_size, HashtableBucket* t, +Dictionary::Dictionary(int table_size, HashtableBucket<mtClass>* t, int number_of_entries) - : TwoOopHashtable<klassOop>(table_size, sizeof(DictionaryEntry), t, number_of_entries) { + : TwoOopHashtable<klassOop, mtClass>(table_size, sizeof(DictionaryEntry), t, number_of_entries) { _current_class_index = 0; _current_class_entry = NULL; }; @@ -54,7 +54,7 @@ DictionaryEntry* Dictionary::new_entry(unsigned int hash, klassOop klass, oop loader) { DictionaryEntry* entry; - entry = (DictionaryEntry*)Hashtable<klassOop>::new_entry(hash, klass); + entry = (DictionaryEntry*)Hashtable<klassOop, mtClass>::new_entry(hash, klass); entry->set_loader(loader); entry->set_pd_set(NULL); return entry; @@ -62,7 +62,7 @@ DictionaryEntry* Dictionary::new_entry() { - DictionaryEntry* entry = (DictionaryEntry*)Hashtable<klassOop>::new_entry(0L, NULL); + DictionaryEntry* entry = (DictionaryEntry*)Hashtable<klassOop, mtClass>::new_entry(0L, NULL); entry->set_loader(NULL); entry->set_pd_set(NULL); return entry; @@ -76,7 +76,7 @@ entry->set_pd_set(to_delete->next()); delete to_delete; } - Hashtable<klassOop>::free_entry(entry); + Hashtable<klassOop, mtClass>::free_entry(entry); } @@ -554,12 +554,12 @@ } SymbolPropertyTable::SymbolPropertyTable(int table_size) - : Hashtable<Symbol*>(table_size, sizeof(SymbolPropertyEntry)) + : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry)) { } -SymbolPropertyTable::SymbolPropertyTable(int table_size, HashtableBucket* t, +SymbolPropertyTable::SymbolPropertyTable(int table_size, HashtableBucket<mtSymbol>* t, int number_of_entries) - : Hashtable<Symbol*>(table_size, sizeof(SymbolPropertyEntry), t, number_of_entries) + : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry), t, number_of_entries) { } @@ -584,7 +584,7 @@ assert(find_entry(index, hash, sym, sym_mode) == NULL, "no double entry"); SymbolPropertyEntry* p = new_entry(hash, sym, sym_mode); - Hashtable<Symbol*>::add_entry(index, p); + Hashtable<Symbol*, mtSymbol>::add_entry(index, p); return p; }