JDK-8230646 : Epsilon does not extend TLABs to max size
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 11,13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-09-05
  • Updated: 2020-06-01
  • Resolved: 2019-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.6Fixed 13.0.2Fixed 14 b14Fixed
Sub Tasks
JDK-8236248 :  
Description
TLAB allocation path asks collected heap about the max tlab size currently available. But, in Epsilon code, there is discrepancy: the caller interprets the returned value in bytes, while Epsilon code has the size in words. Every other GC adjusts accordingly, Epsilon should too.

Fix:

diff -r c8bc506106e3 src/hotspot/share/gc/epsilon/epsilonHeap.cpp
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.cpp      Thu Sep 05 11:09:12 2019 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.cpp      Thu Sep 05 11:35:57 2019 +0200
@@ -108,12 +108,12 @@
   return memory_pools;
 }
 
 size_t EpsilonHeap::unsafe_max_tlab_alloc(Thread* thr) const {
   // Return max allocatable TLAB size, and let allocation path figure out
-  // the actual TLAB allocation size.
-  return _max_tlab_size;
+  // the actual allocation size. Note: result should be in bytes.
+  return _max_tlab_size * HeapWordSize;
 }
 
 EpsilonHeap* EpsilonHeap::heap() {
   CollectedHeap* heap = Universe::heap();
   assert(heap != NULL, "Uninitialized access to EpsilonHeap::heap()");


Comments
Fix Request (11u, 13u) This fixes a simple overlook in Epsilon that has performance implications. Patch applies cleanly to 11u and 13u, passes gc/epsilon tests, would be tested with regular tier1 too.
06-09-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/5f5ca2e02f6e User: shade Date: 2019-09-05 17:25:35 +0000
05-09-2019