Package org.openjdk.jol.vm.sa
Class ServiceabilityAgentSupport
- java.lang.Object
-
- org.openjdk.jol.vm.sa.ServiceabilityAgentSupport
-
public class ServiceabilityAgentSupport extends java.lang.ObjectHotspot Serviceability Agent support.IMPORTANT NOTE: On some UNIX based operating systems and MacOSX operation system, Hotspot Serviceability Agent (SA) process attach may fail due to insufficient privilege. So, on these operating systems, user (runs the application) must be super user and must be already authenticated for example with"sudo"command (also with password) to"/etc/sudoers"file. For more information about"sudo", please have a look: http://en.wikipedia.org/wiki/Sudo http://linux.about.com/od/commands/l/blcmdl8_sudo.htm- See Also:
Task,Result,UniverseData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classServiceabilityAgentSupport.AgentStyle
-
Field Summary
Fields Modifier and Type Field Description private ServiceabilityAgentSupport.AgentStyleagentStyleprivate static ServiceabilityAgentSupportINSTANCEprivate longprocessIdprivate booleansudoRequired
-
Constructor Summary
Constructors Modifier Constructor Description privateServiceabilityAgentSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private ResultcallAgent(Task processor)private ResultcallAgent(Task processor, boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)private java.util.List<java.lang.String>getArguments(boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)private static longgetCurrentProcId()UniverseDatagetUniverseData()static ServiceabilityAgentSupportinstance()private static booleanisSudoValidOS()private booleanneedSudo(ServiceabilityAgentSupport.AgentStyle style)private static java.lang.StringnormalizePath(java.lang.String path)private voidsenseAccess(ServiceabilityAgentSupport.AgentStyle style)private ServiceabilityAgentSupport.AgentStylesenseAgentStyle()
-
-
-
Field Detail
-
INSTANCE
private static ServiceabilityAgentSupport INSTANCE
-
processId
private final long processId
-
sudoRequired
private final boolean sudoRequired
-
agentStyle
private final ServiceabilityAgentSupport.AgentStyle agentStyle
-
-
Method Detail
-
instance
public static ServiceabilityAgentSupport instance()
-
senseAgentStyle
private ServiceabilityAgentSupport.AgentStyle senseAgentStyle()
-
needSudo
private boolean needSudo(ServiceabilityAgentSupport.AgentStyle style)
-
normalizePath
private static java.lang.String normalizePath(java.lang.String path)
-
isSudoValidOS
private static boolean isSudoValidOS()
-
getCurrentProcId
private static long getCurrentProcId()
-
callAgent
private Result callAgent(Task processor, boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)
-
senseAccess
private void senseAccess(ServiceabilityAgentSupport.AgentStyle style)
-
getArguments
private java.util.List<java.lang.String> getArguments(boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)
-
getUniverseData
public UniverseData getUniverseData()
-
-