File tree Expand file tree Collapse file tree 4 files changed +2
-11
lines changed
src/hotspot/share/gc/serial Expand file tree Collapse file tree 4 files changed +2
-11
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -833,20 +833,15 @@ bool SerialHeap::block_is_obj(const HeapWord* addr) const {
833833}
834834
835835size_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
841840size_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
847844size_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
Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments