Mercurial > hg > truffle
comparison src/share/vm/memory/genCollectedHeap.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | d166675568f6 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
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 |
254 virtual bool block_is_obj(const HeapWord* addr) const; | 246 virtual bool block_is_obj(const HeapWord* addr) const; |
255 | 247 |
256 // Section on TLAB's. | 248 // Section on TLAB's. |
257 virtual bool supports_tlab_allocation() const; | 249 virtual bool supports_tlab_allocation() const; |
258 virtual size_t tlab_capacity(Thread* thr) const; | 250 virtual size_t tlab_capacity(Thread* thr) const; |
251 virtual size_t tlab_used(Thread* thr) const; | |
259 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; | 252 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; |
260 virtual HeapWord* allocate_new_tlab(size_t size); | 253 virtual HeapWord* allocate_new_tlab(size_t size); |
261 | 254 |
262 // Can a compiler initialize a new object without store barriers? | 255 // Can a compiler initialize a new object without store barriers? |
263 // This permission only extends from the creation of a new object | 256 // This permission only extends from the creation of a new object |
321 _gens[i]->update_time_of_last_gc(now); | 314 _gens[i]->update_time_of_last_gc(now); |
322 } | 315 } |
323 } | 316 } |
324 | 317 |
325 // Update the gc statistics for each generation. | 318 // Update the gc statistics for each generation. |
326 // "level" is the level of the lastest collection | 319 // "level" is the level of the latest collection. |
327 void update_gc_stats(int current_level, bool full) { | 320 void update_gc_stats(int current_level, bool full) { |
328 for (int i = 0; i < _n_gens; i++) { | 321 for (int i = 0; i < _n_gens; i++) { |
329 _gens[i]->update_gc_stats(current_level, full); | 322 _gens[i]->update_gc_stats(current_level, full); |
330 } | 323 } |
331 } | 324 } |
417 void gen_process_strong_roots(int level, | 410 void gen_process_strong_roots(int level, |
418 bool younger_gens_as_roots, | 411 bool younger_gens_as_roots, |
419 // The remaining arguments are in an order | 412 // The remaining arguments are in an order |
420 // consistent with SharedHeap::process_strong_roots: | 413 // consistent with SharedHeap::process_strong_roots: |
421 bool activate_scope, | 414 bool activate_scope, |
422 bool is_scavenging, | |
423 SharedHeap::ScanningOption so, | 415 SharedHeap::ScanningOption so, |
424 OopsInGenClosure* not_older_gens, | 416 OopsInGenClosure* not_older_gens, |
425 bool do_code_roots, | |
426 OopsInGenClosure* older_gens, | 417 OopsInGenClosure* older_gens, |
427 KlassClosure* klass_closure); | 418 KlassClosure* klass_closure); |
428 | 419 |
429 // Apply "blk" to all the weak roots of the system. These include | 420 // Apply "root_closure" to all the weak roots of the system. |
430 // JNI weak roots, the code cache, system dictionary, symbol table, | 421 // These include JNI weak roots, string table, |
431 // string table, and referents of reachable weak refs. | 422 // and referents of reachable weak refs. |
432 void gen_process_weak_roots(OopClosure* root_closure, | 423 void gen_process_weak_roots(OopClosure* root_closure); |
433 CodeBlobClosure* code_roots); | |
434 | 424 |
435 // Set the saved marks of generations, if that makes sense. | 425 // Set the saved marks of generations, if that makes sense. |
436 // In particular, if any generation might iterate over the oops | 426 // In particular, if any generation might iterate over the oops |
437 // in other generations, it should call this method. | 427 // in other generations, it should call this method. |
438 void save_marks(); | 428 void save_marks(); |