Package org.adoptopenjdk.jitwatch.core
Class JITWatchConfig
- java.lang.Object
-
- org.adoptopenjdk.jitwatch.core.JITWatchConfig
-
public class JITWatchConfig extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJITWatchConfig.BackgroundCompilationstatic classJITWatchConfig.CompressedOopsstatic classJITWatchConfig.OnStackReplacementstatic classJITWatchConfig.TieredCompilation
-
Field Summary
Fields Modifier and Type Field Description private JITWatchConfig.BackgroundCompilationbackgroundCompilationModeprivate java.util.List<java.lang.String>classLocationsprivate intcompileThresholdprivate JITWatchConfig.CompressedOopscompressedOopsModeprivate java.lang.StringCONFIG_OVERRIDEprivate booleandisableInliningprivate java.util.List<java.lang.String>editorPanesprivate java.lang.StringextraVMCompilationSwitchesprivate java.lang.StringextraVMRuntimeSwitchesprivate intfreqInlineSizeprivate booleanhideInterfacesprivate booleanintelModeprivate static java.lang.StringKEY_CLASS_LOCATIONSprivate static java.lang.StringKEY_LAST_LOG_DIRprivate static java.lang.StringKEY_LAST_PROFILEprivate static java.lang.StringKEY_LAST_SANDBOX_EDITOR_PANESprivate static java.lang.StringKEY_NO_PROMPT_HSDISprivate static java.lang.StringKEY_SANDBOX_BACKGROUND_COMPILATIONprivate static java.lang.StringKEY_SANDBOX_COMPILER_THRESHOLDprivate static java.lang.StringKEY_SANDBOX_COMPRESSED_OOPS_MODEprivate static java.lang.StringKEY_SANDBOX_DISABLE_INLININGprivate static java.lang.StringKEY_SANDBOX_EXTRA_VM_COMPILATION_SWITCHESprivate static java.lang.StringKEY_SANDBOX_EXTRA_VM_RUNTIME_SWITCHESprivate static java.lang.StringKEY_SANDBOX_FREQ_INLINE_SIZEprivate static java.lang.StringKEY_SANDBOX_INTEL_MODEprivate static java.lang.StringKEY_SANDBOX_MAX_INLINE_SIZEprivate static java.lang.StringKEY_SANDBOX_ON_STACK_REPLACEMENTprivate static java.lang.StringKEY_SANDBOX_PRINT_ASSEMBLYprivate static java.lang.StringKEY_SANDBOX_TIERED_MODEprivate static java.lang.StringKEY_SANDBOX_WORKING_DIRprivate static java.lang.StringKEY_SHOW_HIDE_INTERFACESprivate static java.lang.StringKEY_SHOW_JIT_ONLY_CLASSESprivate static java.lang.StringKEY_SHOW_JIT_ONLY_MEMBERSprivate static java.lang.StringKEY_SHOW_NOTHING_MOUNTEDprivate static java.lang.StringKEY_SOURCE_LOCATIONSprivate static java.lang.StringKEY_TRIVIEW_LOCAL_ASM_LABELSprivate static java.lang.StringKEY_TRIVIEW_TRILINK_MOUSE_FOLLOWprivate static java.lang.StringKEY_VM_LANGUAGE_PATHprivate java.lang.StringlastLogDirprivate java.util.PropertiesloadedPropsprivate booleanlocalAsmLabelsprivate static com.chrisnewland.freelogj.Loggerloggerprivate intmaxInlineSizeprivate booleanmouseFollowprivate booleannoPromptHsdisprivate JITWatchConfig.OnStackReplacementonStackReplacementModeprivate ParsedClasspathparsedClasspathprivate java.lang.StringpreSandboxProfileprivate booleanprintAssemblyprivate java.lang.StringprofileNameprivate static java.lang.StringPROPERTIES_FILENAMEprivate java.io.FilepropertiesFileprivate static java.lang.StringSANDBOX_PREFIXprivate java.lang.StringsandboxWorkingDirprivate booleanshowNothingMountedprivate booleanshowOnlyCompiledClassesprivate booleanshowOnlyCompiledMembersprivate java.util.List<java.lang.String>sourceLocationsprivate JITWatchConfig.TieredCompilationtieredCompilationMode
-
Constructor Summary
Constructors Constructor Description JITWatchConfig()JITWatchConfig(java.io.File propertiesFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOrUpdateVMLanguage(java.lang.String language, java.lang.String path)voidaddSourceFolder(java.io.File sourceFolder)JITWatchConfigclone()voiddeleteProfile(java.lang.String name)java.util.List<java.lang.String>getAllClassLocations()JITWatchConfig.BackgroundCompilationgetBackgroundCompilationMode()intgetCompileThreshold()JITWatchConfig.CompressedOopsgetCompressedOopsMode()java.util.List<java.lang.String>getConfiguredClassLocations()java.lang.StringgetExtraVMCompilationSwitches()java.lang.StringgetExtraVMRuntimeSwitches()intgetFreqInlineSize()java.util.List<java.lang.String>getLastEditorPaneList()java.lang.StringgetLastLogDir()intgetMaxInlineSize()JITWatchConfig.OnStackReplacementgetOnStackReplacementMode()ParsedClasspathgetParsedClasspath()java.lang.StringgetProfileName()java.util.Set<java.lang.String>getProfileNames()private java.lang.StringgetProfilePropertyName(java.lang.String propertyName)private java.lang.StringgetProperty(java.util.Properties props, java.lang.String propertyName)private java.lang.StringgetProperty(java.util.Properties props, java.lang.String propertyName, java.lang.String defaultValue)java.lang.StringgetSandboxWorkingDir()java.util.List<java.lang.String>getSourceLocations()JITWatchConfig.TieredCompilationgetTieredCompilationMode()java.util.List<java.lang.String>getVMLanguageList()java.lang.StringgetVMLanguagePath(java.lang.String language)private voidinitialise()booleanisBuiltInProfile(java.lang.String profileName)booleanisDisableInlining()booleanisHideInterfaces()booleanisLocalAsmLabels()booleanisNoPromptHsdis()booleanisPrintAssembly()booleanisSandboxIntelMode()private booleanisSandboxProperty(java.lang.String propertyName)booleanisShowNothingMounted()booleanisShowOnlyCompiledClasses()booleanisShowOnlyCompiledMembers()booleanisTriViewMouseFollow()private voidloadBackgroundCompilationMode()private booleanloadBooleanFromProperty(java.util.Properties props, java.lang.String propertyName, boolean defaultValue)private java.util.List<java.lang.String>loadCommaSeparatedListFromProperty(java.util.Properties props, java.lang.String propertyName)private voidloadCompressedOopsMode()private intloadIntFromProperty(java.util.Properties props, java.lang.String propertyName, int defaultValue)private voidloadOnStackReplacementMode()private voidloadPropertiesFromFile()private voidloadTieredMode()voidmarshalConfigToProperties()private voidputProperty(java.util.Properties props, java.lang.String propertyName, java.lang.String value)private voidsaveBackgroundCompilationMode()private voidsaveCompressedOopsMode()voidsaveConfig()private voidsaveOnStackReplacementMode()voidsavePropertiesToFile()private voidsaveTieredCompilationMode()voidsetBackgroundCompilationMode(JITWatchConfig.BackgroundCompilation backgroundCompilationMode)voidsetClassLocations(java.util.List<java.lang.String> classLocations)voidsetCompileThreshold(int compileThreshold)voidsetCompressedOopsMode(JITWatchConfig.CompressedOops compressedOopsMode)voidsetDisableInlining(boolean disableInlining)voidsetExtraVMCompilationSwitches(java.lang.String extraVMCompilationSwitches)voidsetExtraVMRuntimeSwitches(java.lang.String extraVMRuntimeSwitches)voidsetFreqInlineSize(int freqInlineSize)voidsetHideInterfaces(boolean hideInterfaces)voidsetLastEditorPaneList(java.util.List<java.lang.String> editorPanes)voidsetLastLogDir(java.lang.String lastLogDir)voidsetLocalAsmLabels(boolean localAsmLabels)voidsetMaxInlineSize(int maxInlineSize)voidsetNoPromptHsdis(boolean noPromptHsdis)voidsetOnStackReplacementMode(JITWatchConfig.OnStackReplacement onStackReplacementMode)voidsetPrintAssembly(boolean printAssembly)voidsetProfileName(java.lang.String name)voidsetSandboxIntelMode(boolean intelMode)voidsetSandboxWorkingDir(java.lang.String sandboxWorkingDir)voidsetShowNothingMounted(boolean showNothingMounted)voidsetShowOnlyCompiledClasses(boolean showOnlyCompiledClasses)voidsetShowOnlyCompiledMembers(boolean showOnlyCompiledMembers)voidsetSourceLocations(java.util.List<java.lang.String> sourceLocations)voidsetTieredCompilationMode(JITWatchConfig.TieredCompilation tieredCompilation)voidsetTriViewMouseFollow(boolean mouseFollow)voidswitchFromSandbox()voidswitchToSandbox()voidunmarshalPropertiesToConfig()
-
-
-
Field Detail
-
logger
private static final com.chrisnewland.freelogj.Logger logger
-
PROPERTIES_FILENAME
private static final java.lang.String PROPERTIES_FILENAME
- See Also:
- Constant Field Values
-
KEY_SOURCE_LOCATIONS
private static final java.lang.String KEY_SOURCE_LOCATIONS
- See Also:
- Constant Field Values
-
KEY_CLASS_LOCATIONS
private static final java.lang.String KEY_CLASS_LOCATIONS
- See Also:
- Constant Field Values
-
KEY_VM_LANGUAGE_PATH
private static final java.lang.String KEY_VM_LANGUAGE_PATH
- See Also:
- Constant Field Values
-
KEY_SHOW_JIT_ONLY_MEMBERS
private static final java.lang.String KEY_SHOW_JIT_ONLY_MEMBERS
- See Also:
- Constant Field Values
-
KEY_SHOW_JIT_ONLY_CLASSES
private static final java.lang.String KEY_SHOW_JIT_ONLY_CLASSES
- See Also:
- Constant Field Values
-
KEY_SHOW_HIDE_INTERFACES
private static final java.lang.String KEY_SHOW_HIDE_INTERFACES
- See Also:
- Constant Field Values
-
KEY_SHOW_NOTHING_MOUNTED
private static final java.lang.String KEY_SHOW_NOTHING_MOUNTED
- See Also:
- Constant Field Values
-
KEY_LAST_LOG_DIR
private static final java.lang.String KEY_LAST_LOG_DIR
- See Also:
- Constant Field Values
-
KEY_LAST_SANDBOX_EDITOR_PANES
private static final java.lang.String KEY_LAST_SANDBOX_EDITOR_PANES
- See Also:
- Constant Field Values
-
KEY_TRIVIEW_TRILINK_MOUSE_FOLLOW
private static final java.lang.String KEY_TRIVIEW_TRILINK_MOUSE_FOLLOW
- See Also:
- Constant Field Values
-
KEY_TRIVIEW_LOCAL_ASM_LABELS
private static final java.lang.String KEY_TRIVIEW_LOCAL_ASM_LABELS
- See Also:
- Constant Field Values
-
SANDBOX_PREFIX
private static final java.lang.String SANDBOX_PREFIX
- See Also:
- Constant Field Values
-
KEY_SANDBOX_INTEL_MODE
private static final java.lang.String KEY_SANDBOX_INTEL_MODE
- See Also:
- Constant Field Values
-
KEY_SANDBOX_TIERED_MODE
private static final java.lang.String KEY_SANDBOX_TIERED_MODE
- See Also:
- Constant Field Values
-
KEY_SANDBOX_COMPRESSED_OOPS_MODE
private static final java.lang.String KEY_SANDBOX_COMPRESSED_OOPS_MODE
- See Also:
- Constant Field Values
-
KEY_SANDBOX_FREQ_INLINE_SIZE
private static final java.lang.String KEY_SANDBOX_FREQ_INLINE_SIZE
- See Also:
- Constant Field Values
-
KEY_SANDBOX_MAX_INLINE_SIZE
private static final java.lang.String KEY_SANDBOX_MAX_INLINE_SIZE
- See Also:
- Constant Field Values
-
KEY_SANDBOX_PRINT_ASSEMBLY
private static final java.lang.String KEY_SANDBOX_PRINT_ASSEMBLY
- See Also:
- Constant Field Values
-
KEY_SANDBOX_DISABLE_INLINING
private static final java.lang.String KEY_SANDBOX_DISABLE_INLINING
- See Also:
- Constant Field Values
-
KEY_SANDBOX_COMPILER_THRESHOLD
private static final java.lang.String KEY_SANDBOX_COMPILER_THRESHOLD
- See Also:
- Constant Field Values
-
KEY_SANDBOX_EXTRA_VM_COMPILATION_SWITCHES
private static final java.lang.String KEY_SANDBOX_EXTRA_VM_COMPILATION_SWITCHES
- See Also:
- Constant Field Values
-
KEY_SANDBOX_EXTRA_VM_RUNTIME_SWITCHES
private static final java.lang.String KEY_SANDBOX_EXTRA_VM_RUNTIME_SWITCHES
- See Also:
- Constant Field Values
-
KEY_SANDBOX_BACKGROUND_COMPILATION
private static final java.lang.String KEY_SANDBOX_BACKGROUND_COMPILATION
- See Also:
- Constant Field Values
-
KEY_SANDBOX_ON_STACK_REPLACEMENT
private static final java.lang.String KEY_SANDBOX_ON_STACK_REPLACEMENT
- See Also:
- Constant Field Values
-
KEY_SANDBOX_WORKING_DIR
private static final java.lang.String KEY_SANDBOX_WORKING_DIR
- See Also:
- Constant Field Values
-
KEY_LAST_PROFILE
private static final java.lang.String KEY_LAST_PROFILE
- See Also:
- Constant Field Values
-
KEY_NO_PROMPT_HSDIS
private static final java.lang.String KEY_NO_PROMPT_HSDIS
- See Also:
- Constant Field Values
-
sourceLocations
private java.util.List<java.lang.String> sourceLocations
-
classLocations
private java.util.List<java.lang.String> classLocations
-
editorPanes
private java.util.List<java.lang.String> editorPanes
-
showOnlyCompiledMembers
private boolean showOnlyCompiledMembers
-
showOnlyCompiledClasses
private boolean showOnlyCompiledClasses
-
hideInterfaces
private boolean hideInterfaces
-
showNothingMounted
private boolean showNothingMounted
-
lastLogDir
private java.lang.String lastLogDir
-
intelMode
private boolean intelMode
-
mouseFollow
private boolean mouseFollow
-
localAsmLabels
private boolean localAsmLabels
-
tieredCompilationMode
private JITWatchConfig.TieredCompilation tieredCompilationMode
-
compressedOopsMode
private JITWatchConfig.CompressedOops compressedOopsMode
-
backgroundCompilationMode
private JITWatchConfig.BackgroundCompilation backgroundCompilationMode
-
onStackReplacementMode
private JITWatchConfig.OnStackReplacement onStackReplacementMode
-
freqInlineSize
private int freqInlineSize
-
maxInlineSize
private int maxInlineSize
-
printAssembly
private boolean printAssembly
-
disableInlining
private boolean disableInlining
-
compileThreshold
private int compileThreshold
-
extraVMCompilationSwitches
private java.lang.String extraVMCompilationSwitches
-
extraVMRuntimeSwitches
private java.lang.String extraVMRuntimeSwitches
-
sandboxWorkingDir
private java.lang.String sandboxWorkingDir
-
profileName
private java.lang.String profileName
-
CONFIG_OVERRIDE
private final java.lang.String CONFIG_OVERRIDE
-
propertiesFile
private java.io.File propertiesFile
-
loadedProps
private java.util.Properties loadedProps
-
preSandboxProfile
private java.lang.String preSandboxProfile
-
noPromptHsdis
private boolean noPromptHsdis
-
parsedClasspath
private ParsedClasspath parsedClasspath
-
-
Method Detail
-
initialise
private void initialise()
-
switchToSandbox
public void switchToSandbox()
-
switchFromSandbox
public void switchFromSandbox()
-
getParsedClasspath
public ParsedClasspath getParsedClasspath()
-
clone
public JITWatchConfig clone()
- Overrides:
clonein classjava.lang.Object
-
setProfileName
public void setProfileName(java.lang.String name)
-
getProfileName
public java.lang.String getProfileName()
-
deleteProfile
public void deleteProfile(java.lang.String name)
-
isBuiltInProfile
public boolean isBuiltInProfile(java.lang.String profileName)
-
getProfileNames
public java.util.Set<java.lang.String> getProfileNames()
-
loadPropertiesFromFile
private void loadPropertiesFromFile()
-
unmarshalPropertiesToConfig
public void unmarshalPropertiesToConfig()
-
loadTieredMode
private void loadTieredMode()
-
loadCompressedOopsMode
private void loadCompressedOopsMode()
-
loadBackgroundCompilationMode
private void loadBackgroundCompilationMode()
-
loadOnStackReplacementMode
private void loadOnStackReplacementMode()
-
saveTieredCompilationMode
private void saveTieredCompilationMode()
-
saveCompressedOopsMode
private void saveCompressedOopsMode()
-
saveBackgroundCompilationMode
private void saveBackgroundCompilationMode()
-
saveOnStackReplacementMode
private void saveOnStackReplacementMode()
-
loadBooleanFromProperty
private boolean loadBooleanFromProperty(java.util.Properties props, java.lang.String propertyName, boolean defaultValue)
-
loadIntFromProperty
private int loadIntFromProperty(java.util.Properties props, java.lang.String propertyName, int defaultValue)
-
loadCommaSeparatedListFromProperty
private java.util.List<java.lang.String> loadCommaSeparatedListFromProperty(java.util.Properties props, java.lang.String propertyName)
-
getProperty
private java.lang.String getProperty(java.util.Properties props, java.lang.String propertyName)
-
getProperty
private java.lang.String getProperty(java.util.Properties props, java.lang.String propertyName, java.lang.String defaultValue)
-
putProperty
private void putProperty(java.util.Properties props, java.lang.String propertyName, java.lang.String value)
-
getProfilePropertyName
private java.lang.String getProfilePropertyName(java.lang.String propertyName)
-
isSandboxProperty
private boolean isSandboxProperty(java.lang.String propertyName)
-
saveConfig
public void saveConfig()
-
marshalConfigToProperties
public void marshalConfigToProperties()
-
savePropertiesToFile
public void savePropertiesToFile()
-
getConfiguredClassLocations
public java.util.List<java.lang.String> getConfiguredClassLocations()
-
getAllClassLocations
public java.util.List<java.lang.String> getAllClassLocations()
-
getSourceLocations
public java.util.List<java.lang.String> getSourceLocations()
-
getLastEditorPaneList
public java.util.List<java.lang.String> getLastEditorPaneList()
-
addSourceFolder
public void addSourceFolder(java.io.File sourceFolder)
-
setSourceLocations
public void setSourceLocations(java.util.List<java.lang.String> sourceLocations)
-
setClassLocations
public void setClassLocations(java.util.List<java.lang.String> classLocations)
-
setLastEditorPaneList
public void setLastEditorPaneList(java.util.List<java.lang.String> editorPanes)
-
isShowOnlyCompiledMembers
public boolean isShowOnlyCompiledMembers()
-
setShowOnlyCompiledMembers
public void setShowOnlyCompiledMembers(boolean showOnlyCompiledMembers)
-
isShowOnlyCompiledClasses
public boolean isShowOnlyCompiledClasses()
-
setShowOnlyCompiledClasses
public void setShowOnlyCompiledClasses(boolean showOnlyCompiledClasses)
-
isHideInterfaces
public boolean isHideInterfaces()
-
setHideInterfaces
public void setHideInterfaces(boolean hideInterfaces)
-
isShowNothingMounted
public boolean isShowNothingMounted()
-
setShowNothingMounted
public void setShowNothingMounted(boolean showNothingMounted)
-
getLastLogDir
public java.lang.String getLastLogDir()
-
setLastLogDir
public void setLastLogDir(java.lang.String lastLogDir)
-
isSandboxIntelMode
public boolean isSandboxIntelMode()
-
setSandboxIntelMode
public void setSandboxIntelMode(boolean intelMode)
-
getTieredCompilationMode
public JITWatchConfig.TieredCompilation getTieredCompilationMode()
-
setTieredCompilationMode
public void setTieredCompilationMode(JITWatchConfig.TieredCompilation tieredCompilation)
-
getFreqInlineSize
public int getFreqInlineSize()
-
setFreqInlineSize
public void setFreqInlineSize(int freqInlineSize)
-
getMaxInlineSize
public int getMaxInlineSize()
-
setMaxInlineSize
public void setMaxInlineSize(int maxInlineSize)
-
isPrintAssembly
public boolean isPrintAssembly()
-
setPrintAssembly
public void setPrintAssembly(boolean printAssembly)
-
isDisableInlining
public boolean isDisableInlining()
-
setDisableInlining
public void setDisableInlining(boolean disableInlining)
-
getCompileThreshold
public int getCompileThreshold()
-
setCompileThreshold
public void setCompileThreshold(int compileThreshold)
-
getExtraVMCompilationSwitches
public java.lang.String getExtraVMCompilationSwitches()
-
setExtraVMCompilationSwitches
public void setExtraVMCompilationSwitches(java.lang.String extraVMCompilationSwitches)
-
getSandboxWorkingDir
public java.lang.String getSandboxWorkingDir()
-
setSandboxWorkingDir
public void setSandboxWorkingDir(java.lang.String sandboxWorkingDir)
-
getExtraVMRuntimeSwitches
public java.lang.String getExtraVMRuntimeSwitches()
-
setExtraVMRuntimeSwitches
public void setExtraVMRuntimeSwitches(java.lang.String extraVMRuntimeSwitches)
-
getCompressedOopsMode
public JITWatchConfig.CompressedOops getCompressedOopsMode()
-
setCompressedOopsMode
public void setCompressedOopsMode(JITWatchConfig.CompressedOops compressedOopsMode)
-
getBackgroundCompilationMode
public JITWatchConfig.BackgroundCompilation getBackgroundCompilationMode()
-
setBackgroundCompilationMode
public void setBackgroundCompilationMode(JITWatchConfig.BackgroundCompilation backgroundCompilationMode)
-
getOnStackReplacementMode
public JITWatchConfig.OnStackReplacement getOnStackReplacementMode()
-
setOnStackReplacementMode
public void setOnStackReplacementMode(JITWatchConfig.OnStackReplacement onStackReplacementMode)
-
addOrUpdateVMLanguage
public void addOrUpdateVMLanguage(java.lang.String language, java.lang.String path)
-
getVMLanguagePath
public java.lang.String getVMLanguagePath(java.lang.String language)
-
getVMLanguageList
public java.util.List<java.lang.String> getVMLanguageList()
-
isTriViewMouseFollow
public boolean isTriViewMouseFollow()
-
setTriViewMouseFollow
public void setTriViewMouseFollow(boolean mouseFollow)
-
isLocalAsmLabels
public boolean isLocalAsmLabels()
-
setLocalAsmLabels
public void setLocalAsmLabels(boolean localAsmLabels)
-
isNoPromptHsdis
public boolean isNoPromptHsdis()
-
setNoPromptHsdis
public void setNoPromptHsdis(boolean noPromptHsdis)
-
-