annotate c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java @ 1938:1aa5b22a7716

Support for custom stack area (needed for deoptimization).
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Mon, 27 Dec 2010 14:22:55 +0100
parents ace6e55373eb
children 177398c6147d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
1 /*
1437
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved.
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
3 *
1437
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
5 * that is described in this document. In particular, and without limitation, these intellectual property
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
6 * rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
7 * more additional patents or pending patent applications in the U.S. and in other countries.
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
8 *
1437
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
10 * Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
11 * supplements.
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
12 *
1437
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
13 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
14 * registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
15 * are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
16 * U.S. and other countries.
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
17 *
1437
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
18 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
19 * Company, Ltd.
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
20 */
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
21 package com.sun.hotspot.c1x;
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
22
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
23 import java.io.*;
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
24 import java.lang.reflect.*;
1449
8cfe3537a0d3 Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1439
diff changeset
25 import java.util.*;
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
26
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
27 import com.sun.cri.ci.*;
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
28 import com.sun.cri.ci.CiTargetMethod.Call;
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
29 import com.sun.cri.ci.CiTargetMethod.DataPatch;
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
30 import com.sun.cri.ci.CiTargetMethod.Safepoint;
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
31 import com.sun.cri.ri.*;
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
32 import com.sun.max.asm.dis.*;
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
33 import com.sun.max.lang.*;
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
34
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
35 /**
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
36 * CRI runtime implementation for the HotSpot VM.
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
37 *
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
38 * @author Thomas Wuerthinger, Lukas Stadler
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
39 */
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
40 public class HotSpotRuntime implements RiRuntime {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
41
1439
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
42 final HotSpotVMConfig config;
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
43 final HotSpotRegisterConfig regConfig;
1470
ef7761803480 Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1465
diff changeset
44 final HotSpotRegisterConfig globalStubRegConfig;
1439
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
45
1419
7bf6a77b9c5a implement recent safepoint & exceptionobject ci changes, HotSpotVMConfig
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1417
diff changeset
46
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
47 public HotSpotRuntime(HotSpotVMConfig config) {
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
48 this.config = config;
1470
ef7761803480 Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1465
diff changeset
49 regConfig = new HotSpotRegisterConfig(config, false);
ef7761803480 Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1465
diff changeset
50 globalStubRegConfig = new HotSpotRegisterConfig(config, true);
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
51 }
1419
7bf6a77b9c5a implement recent safepoint & exceptionobject ci changes, HotSpotVMConfig
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1417
diff changeset
52
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
53 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
54 public int codeOffset() {
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
55 return 0;
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
56 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
57
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
58 @Override
1475
ace6e55373eb Sync with CRI/C1X changes.
Doug Simon <doug.simon@oracle.com>
parents: 1473
diff changeset
59 public String disassemble(byte[] code, long address) {
ace6e55373eb Sync with CRI/C1X changes.
Doug Simon <doug.simon@oracle.com>
parents: 1473
diff changeset
60 return disassemble(code, new DisassemblyPrinter(false), address);
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
61 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
62
1475
ace6e55373eb Sync with CRI/C1X changes.
Doug Simon <doug.simon@oracle.com>
parents: 1473
diff changeset
63 private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter, long address) {
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
64 final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
1439
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
65 final ISA instructionSet = ISA.AMD64;
1475
ace6e55373eb Sync with CRI/C1X changes.
Doug Simon <doug.simon@oracle.com>
parents: 1473
diff changeset
66 Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, WordWidth.BITS_64, address, null, disassemblyPrinter);
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
67 return byteArrayOutputStream.toString();
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
68 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
69
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
70 @Override
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
71 public String disassemble(final CiTargetMethod targetMethod) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
72
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
73 final DisassemblyPrinter disassemblyPrinter = new DisassemblyPrinter(false) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
74
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
75 private String toString(Call call) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
76 if (call.runtimeCall != null) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
77 return "{" + call.runtimeCall.name() + "}";
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
78 } else if (call.symbol != null) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
79 return "{" + call.symbol + "}";
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
80 } else if (call.globalStubID != null) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
81 return "{" + call.globalStubID + "}";
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
82 } else {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
83 return "{" + call.method + "}";
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
84 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
85 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
86
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
87 private String siteInfo(int pcOffset) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
88 for (Call call : targetMethod.directCalls) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
89 if (call.pcOffset == pcOffset) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
90 return toString(call);
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
91 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
92 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
93 for (Call call : targetMethod.indirectCalls) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
94 if (call.pcOffset == pcOffset) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
95 return toString(call);
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
96 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
97 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
98 for (Safepoint site : targetMethod.safepoints) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
99 if (site.pcOffset == pcOffset) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
100 return "{safepoint}";
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
101 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
102 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
103 for (DataPatch site : targetMethod.dataReferences) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
104 if (site.pcOffset == pcOffset) {
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
105 return "{" + site.constant + "}";
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
106 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
107 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
108 return null;
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
109 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
110
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
111 @Override
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
112 protected String disassembledObjectString(Disassembler disassembler, DisassembledObject disassembledObject) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
113 final String string = super.disassembledObjectString(disassembler, disassembledObject);
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
114
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
115 String site = siteInfo(disassembledObject.startPosition());
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
116 if (site != null) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
117 return string + " " + site;
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
118 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
119 return string;
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
120 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
121 };
1449
8cfe3537a0d3 Pointer verification stub. Two loose oop fixes in C1X C++ part. Logging which methods have been compiled.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1439
diff changeset
122 final byte[] code = Arrays.copyOf(targetMethod.targetCode(), targetMethod.targetCodeSize());
1475
ace6e55373eb Sync with CRI/C1X changes.
Doug Simon <doug.simon@oracle.com>
parents: 1473
diff changeset
123 return disassemble(code, disassemblyPrinter, 0L);
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
124 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
125
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
126 @Override
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
127 public String disassemble(RiMethod method) {
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
128 return "No disassembler available";
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
129 }
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
130
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
131 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
132 public RiConstantPool getConstantPool(RiMethod method) {
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
133 return ((HotSpotTypeResolved) method.holder()).constantPool();
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
134 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
135
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
136 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
137 public RiOsrFrame getOsrFrame(RiMethod method, int bci) {
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
138 return null;
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
139 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
140
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
141 @Override
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
142 public RiType getRiType(Class<?> javaClass) {
1465
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1457
diff changeset
143 return Compiler.getVMEntries().getType(javaClass);
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
144 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
145
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
146 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
147 public RiSnippets getSnippets() {
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
148 throw new UnsupportedOperationException("getSnippets");
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
149 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
150
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
151 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
152 public boolean mustInline(RiMethod method) {
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
153 return false;
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
154 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
155
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
156 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
157 public boolean mustNotCompile(RiMethod method) {
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
158 return false;
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
159 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
160
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
161 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
162 public boolean mustNotInline(RiMethod method) {
1437
9e5e83ca2259 Enabled -C1X:OPTIONS when running HotSpot/C1X. Enabled checkstyle for the HotSpotVM Java project.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
163 return Modifier.isNative(method.accessFlags());
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
164 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
165
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
166 @Override
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
167 public Object registerGlobalStub(CiTargetMethod targetMethod, String name) {
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
168 return HotSpotTargetMethod.installStub(targetMethod, name);
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
169 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
170
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
171 @Override
1457
572d4c6d6ce6 Small renaming.
Doug Simon <doug.simon@oracle.com>
parents: 1456
diff changeset
172 public int sizeOfBasicObjectLock() {
1434
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
173 // TODO shouldn't be hard coded
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
174 return 2 * 8;
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
175 }
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
176
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
177 @Override
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
178 public int basicObjectLockOffsetInBytes() {
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
179 return 8;
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
180 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
181
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
182 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
183 public RiField getRiField(Field javaField) {
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
184 throw new UnsupportedOperationException("getRiField");
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
185 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
186
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
187 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
188 public RiMethod getRiMethod(Method javaMethod) {
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
189 throw new UnsupportedOperationException("getRiMethod");
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
190 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
191
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
192 @Override
1423
760213a60e8b * rewrite of the code installation
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1422
diff changeset
193 public RiMethod getRiMethod(Constructor<?> javaConstructor) {
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
194 throw new UnsupportedOperationException("getRiMethod");
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
195 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
196
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
197 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
198 public CiConstant invoke(RiMethod method, CiMethodInvokeArguments args) {
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
199 return null;
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
200 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
201
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
202 @Override
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
203 public CiConstant foldWordOperation(int opcode, CiMethodInvokeArguments args) {
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
204 throw new UnsupportedOperationException("foldWordOperation");
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
205 }
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
206
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
207 @Override
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
208 public boolean compareConstantObjects(Object x, Object y) {
1465
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1457
diff changeset
209 return x == y;
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
210 }
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
211
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
212 @Override
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
213 public boolean recordLeafMethodAssumption(RiMethod method) {
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1423
diff changeset
214 return false;
1420
44efca8a02d6 reformatting similar to other maxine projects (tabs, etc.)
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1419
diff changeset
215 }
1417
2c41834aa270 Small adaptations
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 1416
diff changeset
216
1439
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
217 @Override
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
218 public RiRegisterConfig getRegisterConfig(RiMethod method) {
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
219 return regConfig;
d0c8d3a2a7e8 Modified domake script to use (and require) JRE7 environment variable for find the base of a JRE 7 installation. This script no also ensures that $JRE7/lib/amd64/jvm.cfg has the right value for '-client'.
Doug Simon <doug.simon@oracle.com>
parents: 1437
diff changeset
220 }
1938
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
221
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
222 /**
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
223 * HotSpots needs an area suitable for storing a program counter for temporary use during the deoptimization process.
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
224 */
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
225 @Override
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
226 public int getCustomStackAreaSize() {
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
227 return 8;
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1475
diff changeset
228 }
1416
1b41af477605 Added HotSpotVM project Java source files.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff changeset
229 }