2019-03-29 15:42:32 +00:00
|
|
|
/*
|
2022-07-08 15:55:14 +00:00
|
|
|
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
|
2019-03-29 15:42:32 +00:00
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @test
|
2021-04-20 15:53:45 +00:00
|
|
|
* @summary Same as HelloCustom, but add -XX:StartFlightRecording:dumponexit=true to the runtime
|
2019-03-29 15:42:32 +00:00
|
|
|
* options. This makes sure that the shared classes are compatible with both
|
|
|
|
* JFR and JVMTI ClassFileLoadHook.
|
|
|
|
* @requires vm.hasJFR
|
|
|
|
* @requires vm.cds
|
|
|
|
* @requires vm.cds.custom.loaders
|
2021-03-12 20:48:51 +00:00
|
|
|
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
|
2019-05-17 15:29:55 +00:00
|
|
|
* @compile test-classes/HelloUnload.java test-classes/CustomLoadee.java
|
2022-07-08 15:55:14 +00:00
|
|
|
* @build jdk.test.whitebox.WhiteBox jdk.test.lib.classloader.ClassUnloadCommon
|
2021-03-13 14:51:53 +00:00
|
|
|
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar hello.jar HelloUnload
|
2021-03-12 20:48:51 +00:00
|
|
|
* jdk.test.lib.classloader.ClassUnloadCommon
|
|
|
|
* jdk.test.lib.classloader.ClassUnloadCommon$1
|
|
|
|
* jdk.test.lib.classloader.ClassUnloadCommon$TestFailure
|
2021-03-13 14:51:53 +00:00
|
|
|
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar hello_custom.jar CustomLoadee
|
2022-07-08 15:55:14 +00:00
|
|
|
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar WhiteBox.jar jdk.test.whitebox.WhiteBox
|
2019-03-29 15:42:32 +00:00
|
|
|
* @run driver HelloCustom_JFR
|
|
|
|
*/
|
|
|
|
|
|
|
|
import jdk.test.lib.process.OutputAnalyzer;
|
2022-07-08 15:55:14 +00:00
|
|
|
import jdk.test.whitebox.WhiteBox;
|
2019-03-29 15:42:32 +00:00
|
|
|
|
|
|
|
public class HelloCustom_JFR {
|
|
|
|
public static void main(String[] args) throws Exception {
|
2021-04-20 15:53:45 +00:00
|
|
|
HelloCustom.run("-XX:StartFlightRecording:dumponexit=true", "-Xlog:cds+jvmti=debug");
|
2019-03-29 15:42:32 +00:00
|
|
|
}
|
|
|
|
}
|