< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/OldClassWithJavaAgent.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 50,10 ***
--- 50,11 ---
          String appJar =
              ClassFileInstaller.writeJar("OldClassWithJavaAgent.jar", appClasses);
          OutputAnalyzer output = TestCommon.testDump(appJar, TestCommon.list("OldSuper"),
              "-Xlog:cds=debug,class+load",
              "-XX:+UnlockDiagnosticVMOptions", diagnosticOption,
+             "-XX:-PreloadSharedClasses",
              "-javaagent:" + agentJar + "=OldSuper");
  
          // The java agent will load and link the class. We will skip old classes
          // which have been linked during CDS dump.
          output.shouldContain("Skipping OldSuper: Old class has been linked");
< prev index next >