RFR: 8246258: Enable hs_err heap printing earlier during initialization

Stefan Karlsson stefan.karlsson at oracle.com
Tue Jun 2 06:51:50 UTC 2020


Hi Thomas,

On 2020-06-01 18:04, Thomas Stüfe wrote:
> Hi Stefan,
>
> looks good.

Thanks for reviewing.

> Note that there are tests which test very early error handling (see 
> TestVeryEarlyAssert), you could extend that to guard against bitrot. 
> But I am fine with the patch as it is.
>
OK. I think I prefer to deal with any problems if/when they arise. Also 
note that if the heap printing fails, then it's only the rest of the 
heap section that gets truncated, the rest of the hs_err file still gets 
printed. So, that limits the risk a bit.

StefanK

> Cheers, Thomas
>
> On Mon, Jun 1, 2020 at 5:57 PM Stefan Karlsson 
> <stefan.karlsson at oracle.com <mailto:stefan.karlsson at oracle.com>> wrote:
>
>     Hi all,
>
>     Please review this patch to enable the hs_err GC / heap printing
>     directly after the heap has been set up.
>
>     https://cr.openjdk.java.net/~stefank/8246258/webrev.01/
>     https://bugs.openjdk.java.net/browse/JDK-8246258
>
>     Changes in the patch:
>     - Remove the Universe::is_fully_initialized
>     - Add NULL initializations and checks in print paths
>
>     I tested this patch by adding a temporary fatal(...) here:
>
>     jint Universe::initialize_heap() {
>        assert(_collectedHeap == NULL, "Heap already created");
>        _collectedHeap = GCConfig::arguments()->create_heap();
>        // <<<< HERE
>        log_info(gc)("Using %s", _collectedHeap->name());
>        return _collectedHeap->initialize();
>     }
>
>     and manually looking at the result when running with all GCs. Will
>     run
>     this through tier1-3.
>
>     Thanks,
>     StefanK
>



More information about the hotspot-gc-dev mailing list