Mercurial > hg > graal-compiler
comparison src/share/vm/memory/sharedHeap.hpp @ 20254:9fec19bb0659
8032379: Remove the is_scavenging flag to process_strong_roots
Summary: Refactor the strong root processing to avoid using a boolean in addition to the ScanOption enum.
Reviewed-by: stefank, tschatzl, ehelin, jmasa
author | mgerdin |
---|---|
date | Tue, 14 Jan 2014 16:40:33 +0100 |
parents | 55fb97c4c58d |
children | 63a4eb8bcd23 7426d8d76305 |
comparison
equal
deleted
inserted
replaced
20253:731e8175d53f | 20254:9fec19bb0659 |
---|---|
219 enum ScanningOption { | 219 enum ScanningOption { |
220 SO_None = 0x0, | 220 SO_None = 0x0, |
221 SO_AllClasses = 0x1, | 221 SO_AllClasses = 0x1, |
222 SO_SystemClasses = 0x2, | 222 SO_SystemClasses = 0x2, |
223 SO_Strings = 0x4, | 223 SO_Strings = 0x4, |
224 SO_CodeCache = 0x8 | 224 SO_AllCodeCache = 0x8, |
225 SO_ScavengeCodeCache = 0x10 | |
225 }; | 226 }; |
226 | 227 |
227 FlexibleWorkGang* workers() const { return _workers; } | 228 FlexibleWorkGang* workers() const { return _workers; } |
228 | 229 |
229 // Invoke the "do_oop" method the closure "roots" on all root locations. | 230 // Invoke the "do_oop" method the closure "roots" on all root locations. |
230 // The "so" argument determines which roots the closure is applied to: | 231 // The "so" argument determines which roots the closure is applied to: |
231 // "SO_None" does none; | 232 // "SO_None" does none; |
232 // "SO_AllClasses" applies the closure to all entries in the SystemDictionary; | 233 // "SO_AllClasses" applies the closure to all entries in the SystemDictionary; |
233 // "SO_SystemClasses" to all the "system" classes and loaders; | 234 // "SO_SystemClasses" to all the "system" classes and loaders; |
234 // "SO_Strings" applies the closure to all entries in StringTable; | 235 // "SO_Strings" applies the closure to all entries in StringTable; |
235 // "SO_CodeCache" applies the closure to all elements of the CodeCache. | 236 // "SO_AllCodeCache" applies the closure to all elements of the CodeCache. |
237 // "SO_ScavengeCodeCache" applies the closure to elements on the scavenge root list in the CodeCache. | |
236 void process_strong_roots(bool activate_scope, | 238 void process_strong_roots(bool activate_scope, |
237 bool is_scavenging, | |
238 ScanningOption so, | 239 ScanningOption so, |
239 OopClosure* roots, | 240 OopClosure* roots, |
240 CodeBlobClosure* code_roots, | 241 CodeBlobClosure* code_roots, |
241 KlassClosure* klass_closure); | 242 KlassClosure* klass_closure); |
242 | 243 |