4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.security.*;
25 import java.lang.instrument.*;
26 import java.lang.reflect.*;
27 import java.lang.management.ManagementFactory;
28 import com.sun.tools.attach.VirtualMachine;
29
30 class A {
31 void m() {
32 }
33 }
34
35 class B extends A {
36 void m() {
37 }
38 }
39
40 class C extends A {
41 void m() {
42 }
43 }
44
45 class Test {
46
47 static public void m() throws Exception {
48 for (int i = 0; i < 20000; i++) {
49 m1(a);
|
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 package compiler.profiling.spectrapredefineclass;
25
26 import com.sun.tools.attach.VirtualMachine;
27
28 import java.lang.instrument.ClassFileTransformer;
29 import java.lang.instrument.Instrumentation;
30 import java.lang.management.ManagementFactory;
31 import java.security.ProtectionDomain;
32
33 class A {
34 void m() {
35 }
36 }
37
38 class B extends A {
39 void m() {
40 }
41 }
42
43 class C extends A {
44 void m() {
45 }
46 }
47
48 class Test {
49
50 static public void m() throws Exception {
51 for (int i = 0; i < 20000; i++) {
52 m1(a);
|