File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
src/hotspot/share/classfile
test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -274,9 +274,16 @@ bool SystemDictionaryShared::check_for_exclusion_impl(InstanceKlass* k) {
274274 return warn_excluded (k, " Has been redefined" );
275275 }
276276 if (!k->is_hidden () && k->shared_classpath_index () < 0 && is_builtin (k)) {
277- // These are classes loaded from unsupported locations (such as those loaded by JVMTI native
278- // agent during dump time).
279- return warn_excluded (k, " Unsupported location" );
277+ if (k->name ()->starts_with (" java/lang/invoke/BoundMethodHandle$Species_" )) {
278+ // This class is dynamically generated by the JDK
279+ ResourceMark rm;
280+ log_info (cds)(" Skipping %s because it is dynamically generated" , k->name ()->as_C_string ());
281+ return true ; // exclude without warning
282+ } else {
283+ // These are classes loaded from unsupported locations (such as those loaded by JVMTI native
284+ // agent during dump time).
285+ return warn_excluded (k, " Unsupported location" );
286+ }
280287 }
281288 if (k->signers () != nullptr ) {
282289 // We cannot include signed classes in the archive because the certificates
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2018, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2018, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -76,6 +76,7 @@ public static void main(String[] args) throws Throwable {
7676 output .shouldContain (warningMessages [0 ]);
7777 output .shouldContain (warningMessages [1 ]);
7878 output .shouldContain ("inside SimpleAgent" );
79+ output .shouldContain ("Skipping java/lang/invoke/BoundMethodHandle$Species_LLLL because it is dynamically generated" );
7980
8081 // CDS dumping with a java agent with the AllowArchvingWithJavaAgent diagnostic option.
8182 output = TestCommon .testDump (appJar , TestCommon .list ("Hello" ),
You can’t perform that action at this time.
0 commit comments