131 // System.getProperties from debuggee VM
132 private Properties sysProps;
133
134 // VM version strings come from Abstract_VM_Version class
135 private String vmRelease;
136 private String vmInternalInfo;
137
138 private Flag[] commandLineFlags;
139 private Map<String, Flag> flagsMap;
140
141 private static Type intType;
142 private static Type uintType;
143 private static Type intxType;
144 private static Type uintxType;
145 private static Type sizetType;
146 private static Type uint64tType;
147 private static CIntegerType boolType;
148 private Boolean sharingEnabled;
149 private Boolean compressedOopsEnabled;
150 private Boolean compressedKlassPointersEnabled;
151
152 // command line flags supplied to VM - see struct JVMFlag in jvmFlag.hpp
153 public static final class Flag {
154 private String type;
155 private String name;
156 private Address addr;
157 private int flags;
158
159 private Flag(String type, String name, Address addr, int flags) {
160 this.type = type;
161 this.name = name;
162 this.addr = addr;
163 this.flags = flags;
164 }
165
166 public String getType() {
167 return type;
168 }
169
170 public String getName() {
943 }
944
945 public boolean isCompressedOopsEnabled() {
946 if (compressedOopsEnabled == null) {
947 Flag flag = getCommandLineFlag("UseCompressedOops");
948 compressedOopsEnabled = (flag == null) ? Boolean.FALSE:
949 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
950 }
951 return compressedOopsEnabled.booleanValue();
952 }
953
954 public boolean isCompressedKlassPointersEnabled() {
955 if (compressedKlassPointersEnabled == null) {
956 Flag flag = getCommandLineFlag("UseCompressedClassPointers");
957 compressedKlassPointersEnabled = (flag == null) ? Boolean.FALSE:
958 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
959 }
960 return compressedKlassPointersEnabled.booleanValue();
961 }
962
963 public int getObjectAlignmentInBytes() {
964 if (objectAlignmentInBytes == 0) {
965 Flag flag = getCommandLineFlag("ObjectAlignmentInBytes");
966 objectAlignmentInBytes = (flag == null) ? 8 : (int)flag.getInt();
967 }
968 return objectAlignmentInBytes;
969 }
970
971 /** Indicates whether Thread-Local Allocation Buffers are used */
972 public boolean getUseTLAB() {
973 Flag flag = getCommandLineFlag("UseTLAB");
974 return (flag == null) ? false: flag.getBool();
975 }
976
977 public boolean getCommandLineBooleanFlag(String name) {
978 Flag flag = getCommandLineFlag(name);
979 return (flag == null) ? Boolean.FALSE:
980 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
981 }
982
|
131 // System.getProperties from debuggee VM
132 private Properties sysProps;
133
134 // VM version strings come from Abstract_VM_Version class
135 private String vmRelease;
136 private String vmInternalInfo;
137
138 private Flag[] commandLineFlags;
139 private Map<String, Flag> flagsMap;
140
141 private static Type intType;
142 private static Type uintType;
143 private static Type intxType;
144 private static Type uintxType;
145 private static Type sizetType;
146 private static Type uint64tType;
147 private static CIntegerType boolType;
148 private Boolean sharingEnabled;
149 private Boolean compressedOopsEnabled;
150 private Boolean compressedKlassPointersEnabled;
151 private Boolean compactObjectHeadersEnabled;
152
153 // command line flags supplied to VM - see struct JVMFlag in jvmFlag.hpp
154 public static final class Flag {
155 private String type;
156 private String name;
157 private Address addr;
158 private int flags;
159
160 private Flag(String type, String name, Address addr, int flags) {
161 this.type = type;
162 this.name = name;
163 this.addr = addr;
164 this.flags = flags;
165 }
166
167 public String getType() {
168 return type;
169 }
170
171 public String getName() {
944 }
945
946 public boolean isCompressedOopsEnabled() {
947 if (compressedOopsEnabled == null) {
948 Flag flag = getCommandLineFlag("UseCompressedOops");
949 compressedOopsEnabled = (flag == null) ? Boolean.FALSE:
950 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
951 }
952 return compressedOopsEnabled.booleanValue();
953 }
954
955 public boolean isCompressedKlassPointersEnabled() {
956 if (compressedKlassPointersEnabled == null) {
957 Flag flag = getCommandLineFlag("UseCompressedClassPointers");
958 compressedKlassPointersEnabled = (flag == null) ? Boolean.FALSE:
959 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
960 }
961 return compressedKlassPointersEnabled.booleanValue();
962 }
963
964 public boolean isCompactObjectHeadersEnabled() {
965 if (compactObjectHeadersEnabled == null) {
966 Flag flag = getCommandLineFlag("UseCompactObjectHeaders");
967 compactObjectHeadersEnabled = (flag == null) ? Boolean.FALSE:
968 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
969 }
970 return compactObjectHeadersEnabled.booleanValue();
971 }
972
973 public int getObjectAlignmentInBytes() {
974 if (objectAlignmentInBytes == 0) {
975 Flag flag = getCommandLineFlag("ObjectAlignmentInBytes");
976 objectAlignmentInBytes = (flag == null) ? 8 : (int)flag.getInt();
977 }
978 return objectAlignmentInBytes;
979 }
980
981 /** Indicates whether Thread-Local Allocation Buffers are used */
982 public boolean getUseTLAB() {
983 Flag flag = getCommandLineFlag("UseTLAB");
984 return (flag == null) ? false: flag.getBool();
985 }
986
987 public boolean getCommandLineBooleanFlag(String name) {
988 Flag flag = getCommandLineFlag(name);
989 return (flag == null) ? Boolean.FALSE:
990 (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
991 }
992
|