comparison src/share/vm/memory/genCollectedHeap.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents d166675568f6
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
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
169 // Does this heap support heap inspection? (+PrintClassHistogram) 177 // Does this heap support heap inspection? (+PrintClassHistogram)
170 virtual bool supports_heap_inspection() const { return true; } 178 virtual bool supports_heap_inspection() const { return true; }
171 179
172 // Perform a full collection of the heap; intended for use in implementing 180 // Perform a full collection of the heap; intended for use in implementing
173 // "System.gc". This implies as full a collection as the CollectedHeap 181 // "System.gc". This implies as full a collection as the CollectedHeap
246 virtual bool block_is_obj(const HeapWord* addr) const; 254 virtual bool block_is_obj(const HeapWord* addr) const;
247 255
248 // Section on TLAB's. 256 // Section on TLAB's.
249 virtual bool supports_tlab_allocation() const; 257 virtual bool supports_tlab_allocation() const;
250 virtual size_t tlab_capacity(Thread* thr) const; 258 virtual size_t tlab_capacity(Thread* thr) const;
251 virtual size_t tlab_used(Thread* thr) const;
252 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; 259 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
253 virtual HeapWord* allocate_new_tlab(size_t size); 260 virtual HeapWord* allocate_new_tlab(size_t size);
254 261
255 // Can a compiler initialize a new object without store barriers? 262 // Can a compiler initialize a new object without store barriers?
256 // This permission only extends from the creation of a new object 263 // This permission only extends from the creation of a new object
314 _gens[i]->update_time_of_last_gc(now); 321 _gens[i]->update_time_of_last_gc(now);
315 } 322 }
316 } 323 }
317 324
318 // Update the gc statistics for each generation. 325 // Update the gc statistics for each generation.
319 // "level" is the level of the latest collection. 326 // "level" is the level of the lastest collection
320 void update_gc_stats(int current_level, bool full) { 327 void update_gc_stats(int current_level, bool full) {
321 for (int i = 0; i < _n_gens; i++) { 328 for (int i = 0; i < _n_gens; i++) {
322 _gens[i]->update_gc_stats(current_level, full); 329 _gens[i]->update_gc_stats(current_level, full);
323 } 330 }
324 } 331 }
410 void gen_process_strong_roots(int level, 417 void gen_process_strong_roots(int level,
411 bool younger_gens_as_roots, 418 bool younger_gens_as_roots,
412 // The remaining arguments are in an order 419 // The remaining arguments are in an order
413 // consistent with SharedHeap::process_strong_roots: 420 // consistent with SharedHeap::process_strong_roots:
414 bool activate_scope, 421 bool activate_scope,
422 bool is_scavenging,
415 SharedHeap::ScanningOption so, 423 SharedHeap::ScanningOption so,
416 OopsInGenClosure* not_older_gens, 424 OopsInGenClosure* not_older_gens,
425 bool do_code_roots,
417 OopsInGenClosure* older_gens, 426 OopsInGenClosure* older_gens,
418 KlassClosure* klass_closure); 427 KlassClosure* klass_closure);
419 428
420 // Apply "root_closure" to all the weak roots of the system. 429 // Apply "blk" to all the weak roots of the system. These include
421 // These include JNI weak roots, string table, 430 // JNI weak roots, the code cache, system dictionary, symbol table,
422 // and referents of reachable weak refs. 431 // string table, and referents of reachable weak refs.
423 void gen_process_weak_roots(OopClosure* root_closure); 432 void gen_process_weak_roots(OopClosure* root_closure,
433 CodeBlobClosure* code_roots);
424 434
425 // Set the saved marks of generations, if that makes sense. 435 // Set the saved marks of generations, if that makes sense.
426 // In particular, if any generation might iterate over the oops 436 // In particular, if any generation might iterate over the oops
427 // in other generations, it should call this method. 437 // in other generations, it should call this method.
428 void save_marks(); 438 void save_marks();