author | bharadwaj |
Tue, 05 Apr 2016 20:32:54 +0000 | |
changeset 37295 | e00dfcc21fa1 |
parent 25635 | d2f8ae0c908b |
child 40059 | c2304140ed64 |
permissions | -rw-r--r-- |
25635
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
1 |
/* |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
4 |
* |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
8 |
* |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
13 |
* accompanied this code). |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
14 |
* |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
18 |
* |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
21 |
* questions. |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
22 |
*/ |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
23 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
24 |
import java.security.*; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
25 |
import java.lang.instrument.*; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
26 |
import java.lang.reflect.*; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
27 |
import java.lang.management.ManagementFactory; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
28 |
import com.sun.tools.attach.VirtualMachine; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
29 |
import java.lang.reflect.*; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
30 |
import java.net.MalformedURLException; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
31 |
import java.net.URL; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
32 |
import java.net.URLClassLoader; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
33 |
import java.nio.file.Paths; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
34 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
35 |
public class Agent implements ClassFileTransformer { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
36 |
public static ClassLoader newClassLoader() { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
37 |
try { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
38 |
return new URLClassLoader(new URL[] { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
39 |
Paths.get(System.getProperty("test.classes",".")).toUri().toURL(), |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
40 |
}, null); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
41 |
} catch (MalformedURLException e){ |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
42 |
throw new RuntimeException("Unexpected URL conversion failure", e); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
43 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
44 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
45 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
46 |
static public Class Test_class; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
47 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
48 |
static public void main(String[] args) throws Exception { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
49 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
50 |
// loader2 must be first on the list so loader 1 must be used first |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
51 |
ClassLoader loader1 = newClassLoader(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
52 |
Class dummy = loader1.loadClass("Test"); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
53 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
54 |
ClassLoader loader2 = newClassLoader(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
55 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
56 |
Test_class = loader2.loadClass("Test"); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
57 |
Method m3 = Test_class.getMethod("m3", ClassLoader.class); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
58 |
// Add speculative trap in m2() (loaded by loader1) that |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
59 |
// references m4() (loaded by loader2). |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
60 |
m3.invoke(Test_class.newInstance(), loader1); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
61 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
62 |
String nameOfRunningVM = ManagementFactory.getRuntimeMXBean().getName(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
63 |
int p = nameOfRunningVM.indexOf('@'); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
64 |
String pid = nameOfRunningVM.substring(0, p); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
65 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
66 |
// Make the nmethod go away |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
67 |
for (int i = 0; i < 10; i++) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
68 |
System.gc(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
69 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
70 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
71 |
// Redefine class Test loaded by loader2 |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
72 |
for (int i = 0; i < 2; i++) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
73 |
try { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
74 |
VirtualMachine vm = VirtualMachine.attach(pid); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
75 |
vm.loadAgent(System.getProperty("test.classes",".") + "/agent.jar", ""); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
76 |
vm.detach(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
77 |
} catch (Exception e) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
78 |
throw new RuntimeException(e); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
79 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
80 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
81 |
// Will process loader2 first, find m4() is redefined and |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
82 |
// needs to be freed then process loader1, check the |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
83 |
// speculative trap in m2() and try to access m4() which was |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
84 |
// freed already. |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
85 |
for (int i = 0; i < 10; i++) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
86 |
System.gc(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
87 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
88 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
89 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
90 |
public synchronized byte[] transform(final ClassLoader classLoader, |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
91 |
final String className, |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
92 |
Class<?> classBeingRedefined, |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
93 |
ProtectionDomain protectionDomain, |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
94 |
byte[] classfileBuffer) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
95 |
System.out.println("Transforming class " + className + " "+ classLoader); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
96 |
return classfileBuffer; |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
97 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
98 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
99 |
public static void redefine(String agentArgs, Instrumentation instrumentation, Class to_redefine) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
100 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
101 |
try { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
102 |
instrumentation.retransformClasses(to_redefine); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
103 |
} catch (Exception e) { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
104 |
e.printStackTrace(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
105 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
106 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
107 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
108 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
109 |
public static void agentmain(String agentArgs, Instrumentation instrumentation) throws Exception { |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
110 |
Agent transformer = new Agent(); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
111 |
instrumentation.addTransformer(transformer, true); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
112 |
|
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
113 |
redefine(agentArgs, instrumentation, Test_class); |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
114 |
} |
d2f8ae0c908b
8040237: nsk/jvmti/RetransformClasses/retransform001 crashed the VM on all platforms when run with with -server -Xcomp
roland
parents:
diff
changeset
|
115 |
} |