On Wed, 10 Mar 2021 04:18:29 GMT, Ioi Lam <ik...@openjdk.org> wrote:

>> Yumin Qi has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fix white space in CDS.java
>
> src/hotspot/share/services/diagnosticCommand.cpp line 1124:
> 
>> 1122:   }
>> 1123:   Symbol* cds_name  = vmSymbols::jdk_internal_misc_CDS();
>> 1124:   Klass*  cds_klass = SystemDictionary::resolve_or_null(cds_name, 
>> THREAD);
> 
> Should be `cds_klass = SystemDictionary::resolve_or_fail(cds_name, CHECK);`

Changed to use resolve_or_fail.

> src/java.base/share/classes/jdk/internal/misc/CDS.java line 213:
> 
>> 211:               testStr.contains("-XX:+DynamicDumpSharedSpaces") ||
>> 212:               testStr.contains("-XX:+RecordDynamicDumpInfo");
>> 213:     }
> 
> The following flags should also be excluded:
> 
> - -XX:-DumpSharedSpaces
> - -Xshare:
> - -XX:SharedClassListFile=
> - -XX:SharedArchiveFile=
> - -XX:ArchiveClassesAtExit=
> - -XX:+UseSharedSpaces
> - -XX:+RequireSharedSpaces
> 
> We also need to have a few test cases when the LingeredApp is started with 
> these flags.

Added String[] for those flags to check.

> src/java.base/share/classes/jdk/internal/misc/CDS.java line 262:
> 
>> 260:                 String line;
>> 261:                 InputStreamReader isr = new 
>> InputStreamReader(proc.getInputStream());
>> 262:                 BufferedReader rdr = new BufferedReader(isr);
> 
> Also, I think the output should always be logged. Otherwise if an error 
> happens, it's very difficult for the user to diagnose (and they won't know 
> about the "CDS.Debug" property).

Yes, done with separate thread.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2737

Reply via email to