Mercurial > hg > truffle
comparison src/share/vm/memory/genCollectedHeap.hpp @ 20804:7848fc12602b
Merge with jdk8u40-b25
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Tue, 07 Apr 2015 14:58:49 +0200 |
parents | 52b4284cb496 439f0d76cff3 |
children |
comparison
equal
deleted
inserted
replaced
20184:84105dcdb05b | 20804:7848fc12602b |
---|---|
76 | 76 |
77 // In support of ExplicitGCInvokesConcurrent functionality | 77 // In support of ExplicitGCInvokesConcurrent functionality |
78 unsigned int _full_collections_completed; | 78 unsigned int _full_collections_completed; |
79 | 79 |
80 // Data structure for claiming the (potentially) parallel tasks in | 80 // Data structure for claiming the (potentially) parallel tasks in |
81 // (gen-specific) strong roots processing. | 81 // (gen-specific) roots processing. |
82 SubTasksDone* _gen_process_strong_tasks; | 82 SubTasksDone* _gen_process_roots_tasks; |
83 SubTasksDone* gen_process_strong_tasks() { return _gen_process_strong_tasks; } | 83 SubTasksDone* gen_process_roots_tasks() { return _gen_process_roots_tasks; } |
84 | 84 |
85 // In block contents verification, the number of header words to skip | 85 // In block contents verification, the number of header words to skip |
86 NOT_PRODUCT(static size_t _skip_header_HeapWords;) | 86 NOT_PRODUCT(static size_t _skip_header_HeapWords;) |
87 | 87 |
88 protected: | 88 protected: |
164 // generation does. | 164 // generation does. |
165 bool supports_inline_contig_alloc() const; | 165 bool supports_inline_contig_alloc() const; |
166 HeapWord** top_addr() const; | 166 HeapWord** top_addr() const; |
167 HeapWord** end_addr() const; | 167 HeapWord** end_addr() const; |
168 | 168 |
169 // Return an estimate of the maximum allocation that could be performed | |
170 // without triggering any collection activity. In a generational | |
171 // collector, for example, this is probably the largest allocation that | |
172 // could be supported in the youngest generation. It is "unsafe" because | |
173 // no locks are taken; the result should be treated as an approximation, | |
174 // not a guarantee. | |
175 size_t unsafe_max_alloc(); | |
176 | |
177 // Does this heap support heap inspection? (+PrintClassHistogram) | 169 // Does this heap support heap inspection? (+PrintClassHistogram) |
178 virtual bool supports_heap_inspection() const { return true; } | 170 virtual bool supports_heap_inspection() const { return true; } |
179 | 171 |
180 // Perform a full collection of the heap; intended for use in implementing | 172 // Perform a full collection of the heap; intended for use in implementing |
181 // "System.gc". This implies as full a collection as the CollectedHeap | 173 // "System.gc". This implies as full a collection as the CollectedHeap |
218 return is_in_young((oop)addr); | 210 return is_in_young((oop)addr); |
219 } | 211 } |
220 | 212 |
221 // Iteration functions. | 213 // Iteration functions. |
222 void oop_iterate(ExtendedOopClosure* cl); | 214 void oop_iterate(ExtendedOopClosure* cl); |
223 void oop_iterate(MemRegion mr, ExtendedOopClosure* cl); | |
224 void object_iterate(ObjectClosure* cl); | 215 void object_iterate(ObjectClosure* cl); |
225 void safe_object_iterate(ObjectClosure* cl); | 216 void safe_object_iterate(ObjectClosure* cl); |
226 Space* space_containing(const void* addr) const; | 217 Space* space_containing(const void* addr) const; |
227 | 218 |
228 // A CollectedHeap is divided into a dense sequence of "blocks"; that is, | 219 // A CollectedHeap is divided into a dense sequence of "blocks"; that is, |
410 // explicitly mark reachable objects in younger generations, to avoid | 401 // explicitly mark reachable objects in younger generations, to avoid |
411 // excess storage retention.) | 402 // excess storage retention.) |
412 // The "so" argument determines which of the roots | 403 // The "so" argument determines which of the roots |
413 // the closure is applied to: | 404 // the closure is applied to: |
414 // "SO_None" does none; | 405 // "SO_None" does none; |
415 // "SO_AllClasses" applies the closure to all entries in the SystemDictionary; | 406 private: |
416 // "SO_SystemClasses" to all the "system" classes and loaders; | 407 void gen_process_roots(int level, |
417 // "SO_Strings" applies the closure to all entries in the StringTable. | 408 bool younger_gens_as_roots, |
418 void gen_process_strong_roots(int level, | 409 bool activate_scope, |
419 bool younger_gens_as_roots, | 410 SharedHeap::ScanningOption so, |
420 // The remaining arguments are in an order | 411 OopsInGenClosure* not_older_gens, |
421 // consistent with SharedHeap::process_strong_roots: | 412 OopsInGenClosure* weak_roots, |
422 bool activate_scope, | 413 OopsInGenClosure* older_gens, |
423 bool is_scavenging, | 414 CLDClosure* cld_closure, |
424 SharedHeap::ScanningOption so, | 415 CLDClosure* weak_cld_closure, |
425 OopsInGenClosure* not_older_gens, | 416 CodeBlobClosure* code_closure); |
426 bool do_code_roots, | 417 |
427 OopsInGenClosure* older_gens, | 418 public: |
428 KlassClosure* klass_closure); | 419 static const bool StrongAndWeakRoots = false; |
429 | 420 static const bool StrongRootsOnly = true; |
430 // Apply "blk" to all the weak roots of the system. These include | 421 |
431 // JNI weak roots, the code cache, system dictionary, symbol table, | 422 void gen_process_roots(int level, |
432 // string table, and referents of reachable weak refs. | 423 bool younger_gens_as_roots, |
433 void gen_process_weak_roots(OopClosure* root_closure, | 424 bool activate_scope, |
434 CodeBlobClosure* code_roots); | 425 SharedHeap::ScanningOption so, |
426 bool only_strong_roots, | |
427 OopsInGenClosure* not_older_gens, | |
428 OopsInGenClosure* older_gens, | |
429 CLDClosure* cld_closure); | |
430 | |
431 // Apply "root_closure" to all the weak roots of the system. | |
432 // These include JNI weak roots, string table, | |
433 // and referents of reachable weak refs. | |
434 void gen_process_weak_roots(OopClosure* root_closure); | |
435 | 435 |
436 // Set the saved marks of generations, if that makes sense. | 436 // Set the saved marks of generations, if that makes sense. |
437 // In particular, if any generation might iterate over the oops | 437 // In particular, if any generation might iterate over the oops |
438 // in other generations, it should call this method. | 438 // in other generations, it should call this method. |
439 void save_marks(); | 439 void save_marks(); |