Mercurial > hg > truffle
comparison src/share/vm/memory/compactingPermGenGen.hpp @ 2177:3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
Summary: move symbols from permgen into C heap and reference count them
Reviewed-by: never, acorn, jmasa, stefank
author | coleenp |
---|---|
date | Thu, 27 Jan 2011 16:11:27 -0800 |
parents | f95d63e2154a |
children | c7f3d0b4570f |
comparison
equal
deleted
inserted
replaced
2176:27e4ea99855d | 2177:3582bf76420e |
---|---|
94 static HeapWord* miscdata_end; | 94 static HeapWord* miscdata_end; |
95 static HeapWord* misccode_bottom; | 95 static HeapWord* misccode_bottom; |
96 static HeapWord* misccode_end; | 96 static HeapWord* misccode_end; |
97 static HeapWord* shared_end; | 97 static HeapWord* shared_end; |
98 | 98 |
99 // List of klassOops whose vtbl entries are used to patch others. | |
100 static void** _vtbl_list; | |
101 | |
102 // Performance Counters | 99 // Performance Counters |
103 GenerationCounters* _gen_counters; | 100 GenerationCounters* _gen_counters; |
104 CSpaceCounters* _space_counters; | 101 CSpaceCounters* _space_counters; |
105 | 102 |
106 void initialize_performance_counters(); | 103 void initialize_performance_counters(); |
151 OffsetTableContigSpace* rw_space() const { return _rw_space; } | 148 OffsetTableContigSpace* rw_space() const { return _rw_space; } |
152 VirtualSpace* md_space() { return &_md_vs; } | 149 VirtualSpace* md_space() { return &_md_vs; } |
153 VirtualSpace* mc_space() { return &_mc_vs; } | 150 VirtualSpace* mc_space() { return &_mc_vs; } |
154 ContiguousSpace* unshared_space() const { return _the_space; } | 151 ContiguousSpace* unshared_space() const { return _the_space; } |
155 | 152 |
156 static bool inline is_shared(const oopDesc* p) { | 153 static bool inline is_shared(const void* p) { |
157 return (HeapWord*)p >= shared_bottom && (HeapWord*)p < shared_end; | 154 return p >= shared_bottom && p < shared_end; |
158 } | 155 } |
159 // RedefineClasses note: this tester is used to check residence of | 156 // RedefineClasses note: this tester is used to check residence of |
160 // the specified oop in the shared readonly space and not whether | 157 // the specified oop in the shared readonly space and not whether |
161 // the oop is readonly. | 158 // the oop is readonly. |
162 static bool inline is_shared_readonly(const oopDesc* p) { | 159 static bool inline is_shared_readonly(const void* p) { |
163 return (HeapWord*)p >= readonly_bottom && (HeapWord*)p < readonly_end; | 160 return p >= readonly_bottom && p < readonly_end; |
164 } | 161 } |
165 // RedefineClasses note: this tester is used to check residence of | 162 // RedefineClasses note: this tester is used to check residence of |
166 // the specified oop in the shared readwrite space and not whether | 163 // the specified oop in the shared readwrite space and not whether |
167 // the oop is readwrite. | 164 // the oop is readwrite. |
168 static bool inline is_shared_readwrite(const oopDesc* p) { | 165 static bool inline is_shared_readwrite(const void* p) { |
169 return (HeapWord*)p >= readwrite_bottom && (HeapWord*)p < readwrite_end; | 166 return p >= readwrite_bottom && p < readwrite_end; |
170 } | 167 } |
171 | 168 |
172 bool is_in_unshared(const void* p) const { | 169 // Checks if the pointer is either in unshared space or in shared space |
173 return OneContigSpaceCardGeneration::is_in(p); | |
174 } | |
175 | |
176 bool is_in_shared(const void* p) const { | |
177 return p >= shared_bottom && p < shared_end; | |
178 } | |
179 | |
180 inline bool is_in(const void* p) const { | 170 inline bool is_in(const void* p) const { |
181 return is_in_unshared(p) || is_in_shared(p); | 171 return OneContigSpaceCardGeneration::is_in(p) || is_shared(p); |
182 } | 172 } |
183 | 173 |
184 inline PermanentGenerationSpec* spec() const { return _spec; } | 174 inline PermanentGenerationSpec* spec() const { return _spec; } |
185 inline void set_spec(PermanentGenerationSpec* spec) { _spec = spec; } | 175 inline void set_spec(PermanentGenerationSpec* spec) { _spec = spec; } |
186 | 176 |
234 | 224 |
235 static void generate_vtable_methods(void** vtbl_list, | 225 static void generate_vtable_methods(void** vtbl_list, |
236 void** vtable, | 226 void** vtable, |
237 char** md_top, char* md_end, | 227 char** md_top, char* md_end, |
238 char** mc_top, char* mc_end); | 228 char** mc_top, char* mc_end); |
229 static void* find_matching_vtbl_ptr(void** vtbl_list, | |
230 void* new_vtable_start, | |
231 void* obj); | |
239 | 232 |
240 void verify(bool allow_dirty); | 233 void verify(bool allow_dirty); |
241 | 234 |
242 // Serialization | 235 // Serialization |
243 static void initialize_oops() KERNEL_RETURN; | 236 static void initialize_oops() KERNEL_RETURN; |