< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java

Print this page

 130   // System.getProperties from debuggee VM
 131   private Properties   sysProps;
 132 
 133   // VM version strings come from Abstract_VM_Version class
 134   private String       vmRelease;
 135   private String       vmInternalInfo;
 136 
 137   private Flag[] commandLineFlags;
 138   private Map<String, Flag> flagsMap;
 139 
 140   private static Type intType;
 141   private static Type uintType;
 142   private static Type intxType;
 143   private static Type uintxType;
 144   private static Type sizetType;
 145   private static Type uint64tType;
 146   private static CIntegerType boolType;
 147   private Boolean sharingEnabled;
 148   private Boolean compressedOopsEnabled;
 149   private Boolean compressedKlassPointersEnabled;

 150 
 151   // command line flags supplied to VM - see struct JVMFlag in jvmFlag.hpp
 152   public static final class Flag {
 153      private String type;
 154      private String name;
 155      private Address addr;
 156      private int flags;
 157 
 158      private Flag(String type, String name, Address addr, int flags) {
 159         this.type = type;
 160         this.name = name;
 161         this.addr = addr;
 162         this.flags = flags;
 163      }
 164 
 165      public String getType() {
 166         return type;
 167      }
 168 
 169      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.getIntx();
 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 

 130   // System.getProperties from debuggee VM
 131   private Properties   sysProps;
 132 
 133   // VM version strings come from Abstract_VM_Version class
 134   private String       vmRelease;
 135   private String       vmInternalInfo;
 136 
 137   private Flag[] commandLineFlags;
 138   private Map<String, Flag> flagsMap;
 139 
 140   private static Type intType;
 141   private static Type uintType;
 142   private static Type intxType;
 143   private static Type uintxType;
 144   private static Type sizetType;
 145   private static Type uint64tType;
 146   private static CIntegerType boolType;
 147   private Boolean sharingEnabled;
 148   private Boolean compressedOopsEnabled;
 149   private Boolean compressedKlassPointersEnabled;
 150   private Boolean compactObjectHeadersEnabled;
 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() {

 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.getIntx();
 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 
< prev index next >