mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8149977: DumpLoadedClassList should not include generated classes
Exclude anonymous classes from the generated class list. Reviewed-by: ccheung, iklam, hseigel
This commit is contained in:
parent
20d335f09b
commit
d40a606f06
1 changed files with 4 additions and 2 deletions
|
@ -5708,8 +5708,10 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream,
|
||||||
|
|
||||||
#if INCLUDE_CDS
|
#if INCLUDE_CDS
|
||||||
if (DumpLoadedClassList != NULL && stream->source() != NULL && classlist_file->is_open()) {
|
if (DumpLoadedClassList != NULL && stream->source() != NULL && classlist_file->is_open()) {
|
||||||
// Only dump the classes that can be stored into CDS archive
|
// Only dump the classes that can be stored into CDS archive.
|
||||||
if (SystemDictionaryShared::is_sharing_possible(_loader_data)) {
|
// Anonymous classes such as generated LambdaForm classes are also not included.
|
||||||
|
if (SystemDictionaryShared::is_sharing_possible(_loader_data) &&
|
||||||
|
_host_klass == NULL) {
|
||||||
ResourceMark rm(THREAD);
|
ResourceMark rm(THREAD);
|
||||||
classlist_file->print_cr("%s", _class_name->as_C_string());
|
classlist_file->print_cr("%s", _class_name->as_C_string());
|
||||||
classlist_file->flush();
|
classlist_file->flush();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue