JDK-8227671 : G1: assert_used_and_recalculate_used_equal performs work in product builds
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-15
  • Updated: 2019-08-06
  • Resolved: 2019-07-17
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 14
14 b07Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The macro G1CollectedHeap::assert_used_and_recalculate_used_equal always recalculates the bytes used in the regions, although it does not use the value in release builds.

This can cause long delays on large heaps (with many regions).

E.g. on BigRAMTester@50g heap@1m regions (50k regions) this method may take ~20ms (up to 200ms).

Note that using 1M regions on a 50g heap is not advised (and G1 will not select 1m regions)
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/6891a4438ae6 User: tschatzl Date: 2019-07-17 14:33:48 +0000
17-07-2019

Before change with 50k 1M regions: [16.306s][info ][gc,phases ] GC(0) Other: 8.1ms [17.736s][info ][gc,phases ] GC(1) Other: 218.2ms [18.893s][info ][gc,phases ] GC(2) Other: 4.8ms [20.029s][info ][gc,phases ] GC(3) Other: 7.2ms [21.220s][info ][gc,phases ] GC(4) Other: 34.3ms [22.374s][info ][gc,phases ] GC(5) Other: 36.9ms [23.516s][info ][gc,phases ] GC(6) Other: 14.8ms [24.688s][info ][gc,phases ] GC(7) Other: 25.9ms [25.818s][info ][gc,phases ] GC(8) Other: 12.3ms [27.034s][info ][gc,phases ] GC(9) Other: 53.4ms [28.218s][info ][gc,phases ] GC(10) Other: 29.3ms [89.727s][info ][gc,phases ] GC(14) Other: 39.1ms [128.777s][info ][gc,phases ] GC(16) Other: 29.5ms [167.033s][info ][gc,phases ] GC(17) Other: 65.6ms [207.536s][info ][gc,phases ] GC(19) Other: 26.8ms [246.366s][info ][gc,phases ] GC(20) Other: 24.4ms [286.008s][info ][gc,phases ] GC(21) Other: 217.1ms // JDK-8227665 [326.188s][info ][gc,phases ] GC(22) Other: 33.7ms [368.147s][info ][gc,phases ] GC(24) Other: 22.5ms [409.176s][info ][gc,phases ] GC(25) Other: 22.5ms [450.538s][info ][gc,phases ] GC(26) Other: 22.5ms [491.762s][info ][gc,phases ] GC(27) Other: 21.1ms [532.875s][info ][gc,phases ] GC(28) Other: 25.1ms [575.339s][info ][gc,phases ] GC(29) Other: 845.3ms // JDK-8227665 [615.471s][info ][gc,phases ] GC(30) Other: 37.9ms [660.547s][info ][gc,phases ] GC(32) Other: 21.6ms [701.670s][info ][gc,phases ] GC(33) Other: 17.7ms [743.077s][info ][gc,phases ] GC(34) Other: 19.2ms [784.196s][info ][gc,phases ] GC(35) Other: 21.2ms [825.359s][info ][gc,phases ] GC(36) Other: 21.9ms [867.602s][info ][gc,phases ] GC(37) Other: 681.5ms // JDK-8227665 [906.828s][info ][gc,phases ] GC(38) Other: 37.7ms [951.579s][info ][gc,phases ] GC(40) Other: 21.9ms [992.878s][info ][gc,phases ] GC(41) Other: 19.0ms [1034.164s][info ][gc,phases ] GC(42) Other: 18.9ms [1075.038s][info ][gc,phases ] GC(43) Other: 20.5ms [1115.910s][info ][gc,phases ] GC(44) Other: 20.3ms [1157.822s][info ][gc,phases ] GC(45) Other: 679.6ms // JDK-8227665 [1197.418s][info ][gc,phases ] GC(46) Other: 34.0ms [1242.820s][info ][gc,phases ] GC(48) Other: 20.7ms [1288.322s][info ][gc,phases ] GC(49) Other: 16.9ms [1334.060s][info ][gc,phases ] GC(50) Other: 18.3ms [1380.370s][info ][gc,phases ] GC(51) Other: 17.6ms [1425.946s][info ][gc,phases ] GC(52) Other: 17.9ms [1471.969s][info ][gc,phases ] GC(53) Other: 694.6ms // JDK-8227665 [1515.662s][info ][gc,phases ] GC(54) Other: 29.5ms [1558.069s][info ][gc,phases ] GC(56) Other: 27.9ms [1599.507s][info ][gc,phases ] GC(57) Other: 17.2ms [1646.705s][info ][gc,phases ] GC(58) Other: 20.0ms [1688.804s][info ][gc,phases ] GC(59) Other: 18.5ms [1730.061s][info ][gc,phases ] GC(60) Other: 22.7ms [1777.130s][info ][gc,phases ] GC(61) Other: 833.7ms // JDK-8227665 [1825.717s][info ][gc,phases ] GC(62) Other: 102.8ms After: [15.392s][info ][gc,phases ] GC(0) Other: 3.3ms [16.789s][info ][gc,phases ] GC(1) Other: 1.7ms [17.987s][info ][gc,phases ] GC(2) Other: 0.9ms [19.166s][info ][gc,phases ] GC(3) Other: 0.9ms [20.303s][info ][gc,phases ] GC(4) Other: 1.7ms [21.433s][info ][gc,phases ] GC(5) Other: 0.7ms [22.543s][info ][gc,phases ] GC(6) Other: 0.8ms [23.657s][info ][gc,phases ] GC(7) Other: 1.0ms [24.766s][info ][gc,phases ] GC(8) Other: 0.8ms [25.900s][info ][gc,phases ] GC(9) Other: 0.7ms [26.975s][info ][gc,phases ] GC(10) Other: 0.8ms [89.263s][info ][gc,phases ] GC(14) Other: 14.9ms // JDK-8159979 [133.099s][info ][gc,phases ] GC(16) Other: 0.8ms [176.769s][info ][gc,phases ] GC(17) Other: 11.3ms // JDK-8159979 [218.832s][info ][gc,phases ] GC(19) Other: 0.7ms [262.216s][info ][gc,phases ] GC(20) Other: 0.9ms [305.868s][info ][gc,phases ] GC(21) Other: 170.3ms // JDK-8227665 [348.517s][info ][gc,phases ] GC(22) Other: 10.3ms // JDK-8159979 [393.372s][info ][gc,phases ] GC(24) Other: 0.8ms [438.874s][info ][gc,phases ] GC(25) Other: 1.1ms [484.636s][info ][gc,phases ] GC(26) Other: 1.1ms [528.838s][info ][gc,phases ] GC(27) Other: 1.1ms [574.282s][info ][gc,phases ] GC(28) Other: 1.2ms [619.991s][info ][gc,phases ] GC(29) Other: 820.1ms // JDK-8227665 [664.050s][info ][gc,phases ] GC(30) Other: 9.7ms // JDK-8159979 [...]
15-07-2019