844 compressedKlassPointersEnabled = (flag == null) ? Boolean.FALSE: 845 (flag.getBool()? Boolean.TRUE: Boolean.FALSE); 846 } 847 return compressedKlassPointersEnabled.booleanValue(); 848 } 849 850 public int getObjectAlignmentInBytes() { 851 if (objectAlignmentInBytes == 0) { 852 Flag flag = getCommandLineFlag("ObjectAlignmentInBytes"); 853 objectAlignmentInBytes = (flag == null) ? 8 : (int)flag.getIntx(); 854 } 855 return objectAlignmentInBytes; 856 } 857 858 /** Indicates whether Thread-Local Allocation Buffers are used */ 859 public boolean getUseTLAB() { 860 Flag flag = getCommandLineFlag("UseTLAB"); 861 return (flag == null) ? false: flag.getBool(); 862 } 863 864 // returns null, if not available. 865 public Flag[] getCommandLineFlags() { 866 if (commandLineFlags == null) { 867 readCommandLineFlags(); 868 } 869 870 return commandLineFlags; 871 } 872 873 public Flag getCommandLineFlag(String name) { 874 if (flagsMap == null) { 875 flagsMap = new HashMap(); 876 Flag[] flags = getCommandLineFlags(); 877 for (int i = 0; i < flags.length; i++) { 878 flagsMap.put(flags[i].getName(), flags[i]); 879 } 880 } 881 return (Flag) flagsMap.get(name); 882 } 883 | 844 compressedKlassPointersEnabled = (flag == null) ? Boolean.FALSE: 845 (flag.getBool()? Boolean.TRUE: Boolean.FALSE); 846 } 847 return compressedKlassPointersEnabled.booleanValue(); 848 } 849 850 public int getObjectAlignmentInBytes() { 851 if (objectAlignmentInBytes == 0) { 852 Flag flag = getCommandLineFlag("ObjectAlignmentInBytes"); 853 objectAlignmentInBytes = (flag == null) ? 8 : (int)flag.getIntx(); 854 } 855 return objectAlignmentInBytes; 856 } 857 858 /** Indicates whether Thread-Local Allocation Buffers are used */ 859 public boolean getUseTLAB() { 860 Flag flag = getCommandLineFlag("UseTLAB"); 861 return (flag == null) ? false: flag.getBool(); 862 } 863 864 public boolean getCommandLineBooleanFlag(String name) { 865 Flag flag = getCommandLineFlag(name); 866 return (flag == null) ? Boolean.FALSE: 867 (flag.getBool()? Boolean.TRUE: Boolean.FALSE); 868 } 869 870 // returns null, if not available. 871 public Flag[] getCommandLineFlags() { 872 if (commandLineFlags == null) { 873 readCommandLineFlags(); 874 } 875 876 return commandLineFlags; 877 } 878 879 public Flag getCommandLineFlag(String name) { 880 if (flagsMap == null) { 881 flagsMap = new HashMap(); 882 Flag[] flags = getCommandLineFlags(); 883 for (int i = 0; i < flags.length; i++) { 884 flagsMap.put(flags[i].getName(), flags[i]); 885 } 886 } 887 return (Flag) flagsMap.get(name); 888 } 889 |