RFR: 8202364: Add GCConfig::hs_err_name() to avoid GC-specific code in error reporting
Aleksey Shipilev
shade at redhat.com
Fri Apr 27 09:40:34 UTC 2018
On 04/27/2018 11:39 AM, Aleksey Shipilev wrote:
> On 04/27/2018 11:33 AM, Per Liden wrote:
>> The gc_mode() function in vmErrror.cpp currently tests which Use*GC flag is set and translates that
>> into a name. We should instead call into GCConfig to get the name. This patch adds a new function
>> (GCConfig::hs_err_name) for this purpose. This is not placed on CollectedHeap, since we might need
>> this name before a CollectedHeap instance has been created, e.g. if we crash during VM startup.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8202364
>> Webrev: http://cr.openjdk.java.net/~pliden/8202364/webrev.0
>
> Looks good.
Wait, except you want to keep the human-readable?
Was:
308 if (UseG1GC) return "g1 gc";
309 if (UseParallelGC) return "parallel gc";
310 if (UseConcMarkSweepGC) return "concurrent mark sweep gc";
311 if (UseSerialGC) return "serial gc";
Now:
57 SupportedGC(UseSerialGC, CollectedHeap::Serial, serialArguments, "serialgc" ),
59 SupportedGC(UseParallelGC, CollectedHeap::Parallel, parallelArguments, "parallelgc"),
60 SupportedGC(UseParallelOldGC, CollectedHeap::Parallel, parallelArguments, "parallelgc"),
61 SupportedGC(UseConcMarkSweepGC, CollectedHeap::CMS, cmsArguments, "cmsgc" ),
62 SupportedGC(UseG1GC, CollectedHeap::G1, g1Arguments, "g1gc" ),
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180427/90bae853/signature.asc>
More information about the hotspot-gc-dev
mailing list