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()) {
buf[i++] = 'S';
if (_location) {
if (AOTMetaspace::in_aot_cache_static_region((void*)k)) {
_aot_statics++;
if (_location) buf[i++] = 's';
buf[i++] = 's';
} else if (AOTMetaspace::in_aot_cache_dynamic_region((void*)k)) {
_aot_dynamics++;
if (_location) buf[i++] = 'd';
buf[i++] = 'd';
}
}
}
}

View File

@ -951,16 +951,16 @@ void ClassHierarchyDCmd::execute(DCmdSource source, TRAPS) {
ClassesDCmd::ClassesDCmd(outputStream* output, bool heap) :
DCmdWithParser(output, heap),
_verbose("-verbose",
"Dump the detailed content of a Java class. "
"Some classes are annotated with flags: "
"F = has, or inherits, a non-empty finalize method, "
"f = has final method, "
"W = methods rewritten, "
"C = marked with @Contended annotation, "
"R = has been redefined, "
"S = is shared class (if -location then 's' indicates static 'd' indicates dynamic AOT cache)",
"Dump the detailed content of a Java class.\n"
"\t\tclasses are annotated with flags:\n"
"\t\tF = has, or inherits, a non-empty finalize method,\n"
"\t\tf = has final method,\n"
"\t\tW = methods rewritten,\n"
"\t\tC = marked with @Contended annotation,\n"
"\t\tR = has been redefined,\n"
"\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"),
_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(&_location);
}

View File

@ -806,7 +806,7 @@ The following commands are available:
- `W` = methods rewritten,
- `C` = marked with `@Contended` annotation,
- `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)
- `-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: 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`
: Print statistics about all ClassLoaders.