Mercurial > hg > truffle
comparison src/share/vm/gc_interface/collectedHeap.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 | 8f2fb6bec986 ef9eda2c1abe |
children |
comparison
equal
deleted
inserted
replaced
20184:84105dcdb05b | 20804:7848fc12602b |
---|---|
349 } | 349 } |
350 static void fill_with_object(HeapWord* start, HeapWord* end, bool zap = true) { | 350 static void fill_with_object(HeapWord* start, HeapWord* end, bool zap = true) { |
351 fill_with_object(start, pointer_delta(end, start), zap); | 351 fill_with_object(start, pointer_delta(end, start), zap); |
352 } | 352 } |
353 | 353 |
354 // Return the address "addr" aligned by "alignment_in_bytes" if such | |
355 // an address is below "end". Return NULL otherwise. | |
356 inline static HeapWord* align_allocation_or_fail(HeapWord* addr, | |
357 HeapWord* end, | |
358 unsigned short alignment_in_bytes); | |
359 | |
354 // Some heaps may offer a contiguous region for shared non-blocking | 360 // Some heaps may offer a contiguous region for shared non-blocking |
355 // allocation, via inlined code (by exporting the address of the top and | 361 // allocation, via inlined code (by exporting the address of the top and |
356 // end fields defining the extent of the contiguous allocation region.) | 362 // end fields defining the extent of the contiguous allocation region.) |
357 | 363 |
358 // This function returns "true" iff the heap supports this kind of | 364 // This function returns "true" iff the heap supports this kind of |
387 // The argument "retire_tlabs" controls whether existing TLABs | 393 // The argument "retire_tlabs" controls whether existing TLABs |
388 // are merely filled or also retired, thus preventing further | 394 // are merely filled or also retired, thus preventing further |
389 // allocation from them and necessitating allocation of new TLABs. | 395 // allocation from them and necessitating allocation of new TLABs. |
390 virtual void ensure_parsability(bool retire_tlabs); | 396 virtual void ensure_parsability(bool retire_tlabs); |
391 | 397 |
392 // Return an estimate of the maximum allocation that could be performed | |
393 // without triggering any collection or expansion activity. In a | |
394 // generational collector, for example, this is probably the largest | |
395 // allocation that could be supported (without expansion) in the youngest | |
396 // generation. It is "unsafe" because no locks are taken; the result | |
397 // should be treated as an approximation, not a guarantee, for use in | |
398 // heuristic resizing decisions. | |
399 virtual size_t unsafe_max_alloc() = 0; | |
400 | |
401 // Section on thread-local allocation buffers (TLABs) | 398 // Section on thread-local allocation buffers (TLABs) |
402 // If the heap supports thread-local allocation buffers, it should override | 399 // If the heap supports thread-local allocation buffers, it should override |
403 // the following methods: | 400 // the following methods: |
404 // Returns "true" iff the heap supports thread-local allocation buffers. | 401 // Returns "true" iff the heap supports thread-local allocation buffers. |
405 // The default is "no". | 402 // The default is "no". |
638 // only whether there more than 0. Use of this method helps | 635 // only whether there more than 0. Use of this method helps |
639 // reduce the occurrence of ParallelGCThreads to uses where the | 636 // reduce the occurrence of ParallelGCThreads to uses where the |
640 // actual number may be germane. | 637 // actual number may be germane. |
641 static bool use_parallel_gc_threads() { return ParallelGCThreads > 0; } | 638 static bool use_parallel_gc_threads() { return ParallelGCThreads > 0; } |
642 | 639 |
640 // Copy the current allocation context statistics for the specified contexts. | |
641 // For each context in contexts, set the corresponding entries in the totals | |
642 // and accuracy arrays to the current values held by the statistics. Each | |
643 // array should be of length len. | |
644 // Returns true if there are more stats available. | |
645 virtual bool copy_allocation_context_stats(const jint* contexts, | |
646 jlong* totals, | |
647 jbyte* accuracy, | |
648 jint len) { | |
649 return false; | |
650 } | |
651 | |
643 /////////////// Unit tests /////////////// | 652 /////////////// Unit tests /////////////// |
644 | 653 |
645 NOT_PRODUCT(static void test_is_in();) | 654 NOT_PRODUCT(static void test_is_in();) |
646 }; | 655 }; |
647 | 656 |