Mercurial > hg > truffle
comparison src/share/vm/gc_interface/collectedHeap.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | 096c224171c4 1e1c8d358b52 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
387 // The argument "retire_tlabs" controls whether existing TLABs | 387 // The argument "retire_tlabs" controls whether existing TLABs |
388 // are merely filled or also retired, thus preventing further | 388 // are merely filled or also retired, thus preventing further |
389 // allocation from them and necessitating allocation of new TLABs. | 389 // allocation from them and necessitating allocation of new TLABs. |
390 virtual void ensure_parsability(bool retire_tlabs); | 390 virtual void ensure_parsability(bool retire_tlabs); |
391 | 391 |
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) | 392 // Section on thread-local allocation buffers (TLABs) |
402 // If the heap supports thread-local allocation buffers, it should override | 393 // If the heap supports thread-local allocation buffers, it should override |
403 // the following methods: | 394 // the following methods: |
404 // Returns "true" iff the heap supports thread-local allocation buffers. | 395 // Returns "true" iff the heap supports thread-local allocation buffers. |
405 // The default is "no". | 396 // The default is "no". |
406 virtual bool supports_tlab_allocation() const { | 397 virtual bool supports_tlab_allocation() const = 0; |
407 return false; | 398 |
408 } | |
409 // The amount of space available for thread-local allocation buffers. | 399 // The amount of space available for thread-local allocation buffers. |
410 virtual size_t tlab_capacity(Thread *thr) const { | 400 virtual size_t tlab_capacity(Thread *thr) const = 0; |
411 guarantee(false, "thread-local allocation buffers not supported"); | 401 |
412 return 0; | 402 // The amount of used space for thread-local allocation buffers for the given thread. |
413 } | 403 virtual size_t tlab_used(Thread *thr) const = 0; |
404 | |
405 virtual size_t max_tlab_size() const; | |
406 | |
414 // An estimate of the maximum allocation that could be performed | 407 // An estimate of the maximum allocation that could be performed |
415 // for thread-local allocation buffers without triggering any | 408 // for thread-local allocation buffers without triggering any |
416 // collection or expansion activity. | 409 // collection or expansion activity. |
417 virtual size_t unsafe_max_tlab_alloc(Thread *thr) const { | 410 virtual size_t unsafe_max_tlab_alloc(Thread *thr) const { |
418 guarantee(false, "thread-local allocation buffers not supported"); | 411 guarantee(false, "thread-local allocation buffers not supported"); |