comparison src/share/vm/classfile/resolutionErrors.hpp @ 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 1d1603768966
children da91efe96a93
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
31 class ResolutionErrorEntry; 31 class ResolutionErrorEntry;
32 32
33 // ResolutionError objects are used to record errors encountered during 33 // ResolutionError objects are used to record errors encountered during
34 // constant pool resolution (JVMS 5.4.3). 34 // constant pool resolution (JVMS 5.4.3).
35 35
36 class ResolutionErrorTable : public Hashtable<constantPoolOop> { 36 class ResolutionErrorTable : public Hashtable<constantPoolOop, mtClass> {
37 37
38 public: 38 public:
39 ResolutionErrorTable(int table_size); 39 ResolutionErrorTable(int table_size);
40 40
41 ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, Symbol* error); 41 ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, Symbol* error);
42 void free_entry(ResolutionErrorEntry *entry); 42 void free_entry(ResolutionErrorEntry *entry);
43 43
44 ResolutionErrorEntry* bucket(int i) { 44 ResolutionErrorEntry* bucket(int i) {
45 return (ResolutionErrorEntry*)Hashtable<constantPoolOop>::bucket(i); 45 return (ResolutionErrorEntry*)Hashtable<constantPoolOop, mtClass>::bucket(i);
46 } 46 }
47 47
48 ResolutionErrorEntry** bucket_addr(int i) { 48 ResolutionErrorEntry** bucket_addr(int i) {
49 return (ResolutionErrorEntry**)Hashtable<constantPoolOop>::bucket_addr(i); 49 return (ResolutionErrorEntry**)Hashtable<constantPoolOop, mtClass>::bucket_addr(i);
50 } 50 }
51 51
52 void add_entry(int index, ResolutionErrorEntry* new_entry) { 52 void add_entry(int index, ResolutionErrorEntry* new_entry) {
53 Hashtable<constantPoolOop>::add_entry(index, (HashtableEntry<constantPoolOop>*)new_entry); 53 Hashtable<constantPoolOop, mtClass>::add_entry(index,
54 (HashtableEntry<constantPoolOop, mtClass>*)new_entry);
54 } 55 }
55 56
56 void add_entry(int index, unsigned int hash, 57 void add_entry(int index, unsigned int hash,
57 constantPoolHandle pool, int which, Symbol* error); 58 constantPoolHandle pool, int which, Symbol* error);
58 59
72 // GC support. 73 // GC support.
73 void oops_do(OopClosure* f); 74 void oops_do(OopClosure* f);
74 }; 75 };
75 76
76 77
77 class ResolutionErrorEntry : public HashtableEntry<constantPoolOop> { 78 class ResolutionErrorEntry : public HashtableEntry<constantPoolOop, mtClass> {
78 private: 79 private:
79 int _cp_index; 80 int _cp_index;
80 Symbol* _error; 81 Symbol* _error;
81 82
82 public: 83 public:
88 89
89 Symbol* error() const { return _error; } 90 Symbol* error() const { return _error; }
90 void set_error(Symbol* e); 91 void set_error(Symbol* e);
91 92
92 ResolutionErrorEntry* next() const { 93 ResolutionErrorEntry* next() const {
93 return (ResolutionErrorEntry*)HashtableEntry<constantPoolOop>::next(); 94 return (ResolutionErrorEntry*)HashtableEntry<constantPoolOop, mtClass>::next();
94 } 95 }
95 96
96 ResolutionErrorEntry** next_addr() { 97 ResolutionErrorEntry** next_addr() {
97 return (ResolutionErrorEntry**)HashtableEntry<constantPoolOop>::next_addr(); 98 return (ResolutionErrorEntry**)HashtableEntry<constantPoolOop, mtClass>::next_addr();
98 } 99 }
99 100
100 // GC support 101 // GC support
101 void oops_do(OopClosure* blk); 102 void oops_do(OopClosure* blk);
102 }; 103 };