Skip to content

Commit 8346719

Browse files
albertnetymkpull[bot]
authored andcommitted
8333641: Serial: Remove Generation::supports_tlab_allocation
Reviewed-by: tschatzl
1 parent a615508 commit 8346719

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

src/hotspot/share/gc/serial/defNewGeneration.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ class DefNewGeneration: public Generation {
191191
size_t max_survivor_size() const { return _max_survivor_size; }
192192

193193
// Thread-local allocation buffers
194-
bool supports_tlab_allocation() const { return true; }
195194
size_t tlab_capacity() const;
196195
size_t tlab_used() const;
197196
size_t unsafe_max_tlab_alloc() const;

src/hotspot/share/gc/serial/generation.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ class Generation: public CHeapObj<mtGC> {
114114
// Like "allocate", but performs any necessary locking internally.
115115
virtual HeapWord* par_allocate(size_t word_size, bool is_tlab) = 0;
116116

117-
// Thread-local allocation buffers
118-
virtual bool supports_tlab_allocation() const { return false; }
119-
120117
// Perform a heap collection, attempting to create (at least) enough
121118
// space to support an allocation of the given "word_size". If
122119
// successful, perform the allocation and return the resulting

src/hotspot/share/gc/serial/serialHeap.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -833,20 +833,15 @@ bool SerialHeap::block_is_obj(const HeapWord* addr) const {
833833
}
834834

835835
size_t SerialHeap::tlab_capacity(Thread* thr) const {
836-
assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!");
837-
assert(_young_gen->supports_tlab_allocation(), "Young gen doesn't support TLAB allocation?!");
836+
// Only young-gen supports tlab allocation.
838837
return _young_gen->tlab_capacity();
839838
}
840839

841840
size_t SerialHeap::tlab_used(Thread* thr) const {
842-
assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!");
843-
assert(_young_gen->supports_tlab_allocation(), "Young gen doesn't support TLAB allocation?!");
844841
return _young_gen->tlab_used();
845842
}
846843

847844
size_t SerialHeap::unsafe_max_tlab_alloc(Thread* thr) const {
848-
assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!");
849-
assert(_young_gen->supports_tlab_allocation(), "Young gen doesn't support TLAB allocation?!");
850845
return _young_gen->unsafe_max_tlab_alloc();
851846
}
852847

src/hotspot/share/gc/serial/tenuredGeneration.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class TenuredGeneration: public Generation {
143143
bool should_allocate(size_t word_size, bool is_tlab) {
144144
bool result = false;
145145
size_t overflow_limit = (size_t)1 << (BitsPerSize_t - LogHeapWordSize);
146-
if (!is_tlab || supports_tlab_allocation()) {
146+
if (!is_tlab) {
147147
result = (word_size > 0) && (word_size < overflow_limit);
148148
}
149149
return result;

0 commit comments

Comments
 (0)