test/hotspot/jtreg/compiler/aot/fingerprint/SelfChangedCDS.java
author iignatyev
Tue, 05 Nov 2019 08:57:36 -0800
changeset 58937 ba99c5a4491d
parent 58731 de395bbd7a93
permissions -rw-r--r--
8233496: AOT tests failures with 'java.lang.RuntimeException: Failed to find sun/hotspot/WhiteBox.class' Reviewed-by: kvn, thartmann
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     1
/*
57681
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
     2
 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     4
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     8
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    13
 * accompanied this code).
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    14
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    18
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    21
 * questions.
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    22
 */
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    23
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    24
/*
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    25
 * @test
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    26
 * @summary AOT methods should be swept if a super class has changed (with CDS).
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    27
 * @library /test/lib /
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    28
 * @modules java.base/jdk.internal.misc
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    29
 *          java.management
58731
de395bbd7a93 8232692: [TESTBUG] compiler/aot/fingerprint/SelfChangedCDS.java fails when cds is disabled
jiefu
parents: 57681
diff changeset
    30
 * @requires vm.aot & vm.cds
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    31
 * @build compiler.aot.fingerprint.SelfChanged
58937
ba99c5a4491d 8233496: AOT tests failures with 'java.lang.RuntimeException: Failed to find sun/hotspot/WhiteBox.class'
iignatyev
parents: 58731
diff changeset
    32
 *        sun.hotspot.WhiteBox
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    33
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    34
 * @run main compiler.aot.fingerprint.SelfChanged WRITE-UNMODIFIED-CLASS
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    35
 * @run driver compiler.aot.AotCompiler -libname libSelfChanged.so
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    36
 *      -class compiler.aot.fingerprint.Blah
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    37
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    38
 * @run driver ClassFileInstaller -jar SelfChangedCDS.jar compiler.aot.fingerprint.Blah
49847
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    39
 * @run main compiler.aot.fingerprint.CDSDumper SelfChangedCDS.jar SelfChangedCDS.classlist SelfChangedCDS.jsa -showversion
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    40
 *      compiler.aot.fingerprint.Blah
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    41
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    42
 * @run main compiler.aot.fingerprint.CDSRunner -cp SelfChangedCDS.jar
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    43
 *      compiler.aot.fingerprint.Blah TEST-UNMODIFIED
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    44
 * @run main compiler.aot.fingerprint.CDSRunner -cp SelfChangedCDS.jar
57681
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
    45
 *      -XX:+UnlockExperimentalVMOptions -XX:+UseAOT -XX:+PrintAOT
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
    46
 *      -XX:AOTLibrary=./libSelfChanged.so
49931
840e26123940 8193213: Make the UseAppCDS option obsolete.
jiangli
parents: 49847
diff changeset
    47
 *      -XX:SharedArchiveFile=SelfChangedCDS.jsa
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    48
 *      -XX:+IgnoreUnrecognizedVMOptions
49931
840e26123940 8193213: Make the UseAppCDS option obsolete.
jiangli
parents: 49847
diff changeset
    49
 *      -Xshare:auto -showversion
49847
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    50
 *      -Xlog:cds -Xlog:gc+heap+coops
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    51
 *      -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    52
 *      compiler.aot.fingerprint.Blah TEST-UNMODIFIED
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    53
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    54
 * @run main
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    55
 *      compiler.aot.fingerprint.SelfChanged WRITE-MODIFIED-CLASS
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    56
 * @run driver compiler.aot.AotCompiler -libname libSelfChanged.so
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    57
 *      -class compiler.aot.fingerprint.Blah
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    58
 *
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    59
 * @run main compiler.aot.fingerprint.CDSRunner -cp SelfChangedCDS.jar
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    60
 *      compiler.aot.fingerprint.Blah TEST-MODIFIED
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    61
 * @run main compiler.aot.fingerprint.CDSRunner -cp SelfChangedCDS.jar
57681
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
    62
 *      -XX:+UnlockExperimentalVMOptions -XX:+UseAOT -XX:+PrintAOT
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
    63
 *      -XX:AOTLibrary=./libSelfChanged.so
49931
840e26123940 8193213: Make the UseAppCDS option obsolete.
jiangli
parents: 49847
diff changeset
    64
 *      -XX:SharedArchiveFile=SelfChangedCDS.jsa
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    65
 *      -XX:+IgnoreUnrecognizedVMOptions
49931
840e26123940 8193213: Make the UseAppCDS option obsolete.
jiangli
parents: 49847
diff changeset
    66
 *      -Xshare:auto -showversion
49847
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    67
 *      -Xlog:cds -Xlog:gc+heap+coops
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    68
 *      -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    69
 *      compiler.aot.fingerprint.Blah TEST-MODIFIED
49847
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    70
 *
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    71
 *
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    72
 * @run driver compiler.aot.AotCompiler -libname libSelfChanged.so
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    73
 *      -class compiler.aot.fingerprint.Blah
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    74
 *      -extraopt -Xmx512m
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    75
 *
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    76
 * @run main compiler.aot.fingerprint.CDSDumper SelfChangedCDS.jar SelfChangedCDS.classlist SelfChangedCDS.jsa -Xmx512m
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    77
 *      compiler.aot.fingerprint.Blah
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    78
 *
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    79
 * @run main compiler.aot.fingerprint.CDSRunner -Xmx512m -cp SelfChangedCDS.jar
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    80
 *      compiler.aot.fingerprint.Blah TEST-UNMODIFIED
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    81
 * @run main compiler.aot.fingerprint.CDSRunner -Xmx512m -cp SelfChangedCDS.jar
57681
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
    82
 *      -XX:+UnlockExperimentalVMOptions -XX:+UseAOT -XX:+PrintAOT
41f2f2829a09 8227439: Turn off AOT by default
rraghavan
parents: 49931
diff changeset
    83
 *      -XX:AOTLibrary=./libSelfChanged.so
49931
840e26123940 8193213: Make the UseAppCDS option obsolete.
jiangli
parents: 49847
diff changeset
    84
 *      -XX:SharedArchiveFile=SelfChangedCDS.jsa
49847
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    85
 *      -XX:+IgnoreUnrecognizedVMOptions
49931
840e26123940 8193213: Make the UseAppCDS option obsolete.
jiangli
parents: 49847
diff changeset
    86
 *      -Xshare:auto -showversion
49847
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    87
 *      -Xlog:cds -Xlog:gc+heap+coops
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    88
 *      -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace
f22c0b4caad7 8201850: [AOT] vm crash when run test compiler/aot/fingerprint/SelfChangedCDS.java
kvn
parents: 49367
diff changeset
    89
 *      compiler.aot.fingerprint.Blah TEST-UNMODIFIED
49367
6a532ba7d9e9 8198591: compiler/aot/fingerprint tests should be moved to open
kvn
parents:
diff changeset
    90
 */