Compare commits

...

2 Commits

3 changed files with 22 additions and 18 deletions

View File

@ -2375,12 +2375,14 @@ void PrintClassClosure::do_klass(Klass* k) {
if (ik->in_aot_cache()) { if (ik->in_aot_cache()) {
buf[i++] = 'S'; buf[i++] = 'S';
if (AOTMetaspace::in_aot_cache_static_region((void*)k)) { if (_location) {
_aot_statics++; if (AOTMetaspace::in_aot_cache_static_region((void*)k)) {
if (_location) buf[i++] = 's'; _aot_statics++;
} else if (AOTMetaspace::in_aot_cache_dynamic_region((void*)k)) { buf[i++] = 's';
_aot_dynamics++; } else if (AOTMetaspace::in_aot_cache_dynamic_region((void*)k)) {
if (_location) buf[i++] = 'd'; _aot_dynamics++;
buf[i++] = 'd';
}
} }
} }
} }

View File

@ -951,16 +951,16 @@ void ClassHierarchyDCmd::execute(DCmdSource source, TRAPS) {
ClassesDCmd::ClassesDCmd(outputStream* output, bool heap) : ClassesDCmd::ClassesDCmd(outputStream* output, bool heap) :
DCmdWithParser(output, heap), DCmdWithParser(output, heap),
_verbose("-verbose", _verbose("-verbose",
"Dump the detailed content of a Java class. " "Dump the detailed content of a Java class.\n"
"Some classes are annotated with flags: " "\t\tclasses are annotated with flags:\n"
"F = has, or inherits, a non-empty finalize method, " "\t\tF = has, or inherits, a non-empty finalize method,\n"
"f = has final method, " "\t\tf = has final method,\n"
"W = methods rewritten, " "\t\tW = methods rewritten,\n"
"C = marked with @Contended annotation, " "\t\tC = marked with @Contended annotation,\n"
"R = has been redefined, " "\t\tR = has been redefined,\n"
"S = is shared class (if -location then 's' indicates static 'd' indicates dynamic AOT cache)", "\t\tS = is an (App)CDS shared class (if -location is also specified, (either) 's' indicating static (or) 'd' indicating dynamic AOT cache locations, are appended)",
"BOOLEAN", false, "false"), "BOOLEAN", false, "false"),
_location("-location", "Print class file (and AOT cache) location url (if available)", "BOOLEAN", false, "false") { _location("-location", "Print class file location url (if available)", "BOOLEAN", false, "false") {
_dcmdparser.add_dcmd_option(&_verbose); _dcmdparser.add_dcmd_option(&_verbose);
_dcmdparser.add_dcmd_option(&_location); _dcmdparser.add_dcmd_option(&_location);
} }

View File

@ -806,7 +806,7 @@ The following commands are available:
- `W` = methods rewritten, - `W` = methods rewritten,
- `C` = marked with `@Contended` annotation, - `C` = marked with `@Contended` annotation,
- `R` = has been redefined, - `R` = has been redefined,
- `S` = is shared class (if -location 's' is static and 'd' is dynamic AOT cache location) - `S` = is shared class (if -location is specified then either 's' (for static) or 'd' (for dynamic) AOT cache origin is appended)
(BOOLEAN, false) (BOOLEAN, false)
- `-location`: (Optional) Print the location of the class file from which the class is loaded (if available) - `-location`: (Optional) Print the location of the class file from which the class is loaded (if available)
@ -816,9 +816,11 @@ The following commands are available:
Note: JDK (and other classes) loaded by a ClassLoader that does not provide a location URL to the JVM will omit this field. Note: JDK (and other classes) loaded by a ClassLoader that does not provide a location URL to the JVM will omit this field.
Note: if any classes are loaded from an AOT cache, their location reported is that of the original Note: if any classes are loaded from an AOT cache, their location reported is that of the original
url from which they were loaded at the time of the training run that created the AOT cache. url from which they were loaded at the time of the training run that created the AOT cache,
additionally the flags will also be annotated to indicate the AOT cache origin (static or dynamic).
The total number of classes loaded (if any) from either AOT cache (and the associated cache filepath) are summarized.
The total number of classes loaded from any AOT cache (and its name) are summarized.
`VM.classloader_stats` `VM.classloader_stats`
: Print statistics about all ClassLoaders. : Print statistics about all ClassLoaders.