8030177: G1: Enable TLAB resizing

Reviewed-by: tschatzl, stefank, jmasa
This commit is contained in:
Bengt Rutisson 2014-01-27 13:14:53 +01:00
parent 81ba2e32c0
commit 9b29efeb63
20 changed files with 141 additions and 74 deletions

View file

@ -394,14 +394,16 @@ class CollectedHeap : public CHeapObj<mtInternal> {
// the following methods:
// Returns "true" iff the heap supports thread-local allocation buffers.
// The default is "no".
virtual bool supports_tlab_allocation() const {
return false;
}
virtual bool supports_tlab_allocation() const = 0;
// The amount of space available for thread-local allocation buffers.
virtual size_t tlab_capacity(Thread *thr) const {
guarantee(false, "thread-local allocation buffers not supported");
return 0;
}
virtual size_t tlab_capacity(Thread *thr) const = 0;
// The amount of used space for thread-local allocation buffers for the given thread.
virtual size_t tlab_used(Thread *thr) const = 0;
virtual size_t max_tlab_size() const;
// An estimate of the maximum allocation that could be performed
// for thread-local allocation buffers without triggering any
// collection or expansion activity.