Logo Search packages:      
Sourcecode: visualvm version File versions  Download package

org::netbeans::lib::profiler::ProfilerClient Class Reference

Inheritance diagram for org::netbeans::lib::profiler::ProfilerClient:

org::netbeans::lib::profiler::global::CommonConstants

List of all members.


Detailed Description

The interface between the tool and the profiling back end.

Author:
Tomas Hurka

Misha Dmitriev

Adrian Mos

Ian Formanek

Definition at line 87 of file ProfilerClient.java.


Public Member Functions

synchronized boolean cpuResultsExist () throws ClientUtils.TargetAppOrVMTerminated
boolean currentInstrTypeIsMemoryProfiling ()
boolean currentInstrTypeIsRecursiveCPUProfiling ()
void deinstrumentMemoryProfiledClasses (boolean[] unprofiledClassStatusArray) throws InstrumentationException, ClientUtils.TargetAppOrVMTerminated
synchronized void detachFromTargetJVM () throws ClientUtils.TargetAppOrVMTerminated
boolean establishConnectionWithServer (int attachMode, boolean calibrationOnlyRun)
boolean forceObtainedResultsDump (boolean liveResults) throws ClientUtils.TargetAppOrVMTerminated
boolean forceObtainedResultsDump (boolean liveResults, int retries) throws ClientUtils.TargetAppOrVMTerminated
boolean forceObtainedResultsDump () throws ClientUtils.TargetAppOrVMTerminated
synchronized int[] getAllocatedObjectsCountResults () throws ClientUtils.TargetAppOrVMTerminated
synchronized
CodeRegionResultsSnapshot 
getCodeRegionProfilingResultsSnapshot () throws ClientUtils.TargetAppOrVMTerminated
synchronized CPUResultsSnapshot getCPUProfilingResultsSnapshot (boolean dump) throws ClientUtils.TargetAppOrVMTerminated, CPUResultsSnapshot.NoDataAvailableException
synchronized CPUResultsSnapshot getCPUProfilingResultsSnapshot () throws ClientUtils.TargetAppOrVMTerminated, CPUResultsSnapshot.NoDataAvailableException
int getCurrentAgentId ()
int getCurrentInstrType ()
synchronized byte[] getCurrentThreadsLivenessStatus ()
synchronized int getDefiningClassLoaderId (String className, int initiatingLoaderId) throws ClientUtils.TargetAppOrVMTerminated
FlatProfileProvider getFlatProfileProvider ()
long getInstrProcessingTime ()
synchronized InternalStatsResponse getInternalStats () throws ClientUtils.TargetAppOrVMTerminated
CCTResultsFilter getMarkFilter ()
MemoryCCTProvider getMemoryCCTProvider ()
synchronized MemoryResultsSnapshot getMemoryProfilingResultsSnapshot (boolean dump) throws ClientUtils.TargetAppOrVMTerminated
synchronized MemoryResultsSnapshot getMemoryProfilingResultsSnapshot () throws ClientUtils.TargetAppOrVMTerminated
Marker getMethodMarker ()
synchronized String[][] getMethodNamesForJMethodIds (int[] methodIds) throws ClientUtils.TargetAppOrVMTerminated
synchronized MonitoredData getMonitoredData ()
ProfilerEngineSettings getSettings ()
ObjectInputStream getSocketInputStream ()
ProfilingSessionStatus getStatus ()
TimeCollector getTimeCollector ()
void initiateCodeRegionInstrumentation (ClientUtils.SourceCodeSelection[] s) throws ClassNotFoundException, BadLocationException, InstrumentationException, IOException, ClassFormatError, ClientUtils.TargetAppOrVMTerminated
void initiateMemoryProfInstrumentation (int instrType) throws ClientUtils.TargetAppOrVMTerminated, InstrumentationException
void initiateRecursiveCPUProfInstrumentation (ClientUtils.SourceCodeSelection[] s) throws ClassNotFoundException, BadLocationException, InstrumentationException, IOException, ClassFormatError, ClientUtils.TargetAppOrVMTerminated
synchronized boolean memoryResultsExist ()
 ProfilerClient (ProfilerEngineSettings settings, ProfilingSessionStatus status, AppStatusHandler ash, AppStatusHandler.ServerCommandHandler sch)
void registerCPUCCTProvider (CPUCCTProvider provider)
void registerFlatProfileProvider (FlatProfileProvider provider)
void registerMarkFilter (CCTResultsFilter filter)
void registerMemoryCCTProvider (MemoryCCTProvider provider)
void registerTimeCollector (TimeCollector collector)
void removeAllInstrumentation () throws InstrumentationException
void removeAllInstrumentation (boolean cleanupClient) throws InstrumentationException
void resetClientData ()
synchronized void resetProfilerCollectors () throws ClientUtils.TargetAppOrVMTerminated
synchronized void resumeTargetAppThreads () throws ClientUtils.TargetAppOrVMTerminated
synchronized void runGC () throws ClientUtils.TargetAppOrVMTerminated
void sendSetInstrumentationParamsCmd (boolean changeableOnly) throws ClientUtils.TargetAppOrVMTerminated
void setCurrentInstrType (int type)
boolean startTargetApp (boolean sendExplicitStartCommand) throws ClientUtils.TargetAppOrVMTerminated, ClientUtils.TargetAppFailedToStart
synchronized void suspendTargetAppThreads () throws ClientUtils.TargetAppOrVMTerminated
synchronized boolean takeHeapDump (String outputFile) throws ClientUtils.TargetAppOrVMTerminated
boolean targetAppIsRunning ()
boolean targetJVMIsAlive ()
synchronized void terminateTargetJVM () throws ClientUtils.TargetAppOrVMTerminated

Static Public Attributes

static final byte ADJUST_TIME = 5
static final int AGENT_ID_ANY = -1
static final int AGENT_STATE_CONNECTED = 3
static final int AGENT_STATE_DIFFERENT_ID = 4
static final int AGENT_STATE_NOT_RUNNING = 0
static final int AGENT_STATE_OTHER_SESSION_IN_PROGRESS = 5
static final int AGENT_STATE_READY_DIRECT = 2
static final int AGENT_STATE_READY_DYNAMIC = 1
static final int AGENT_VERSION_10_M10 = 2
static final int AGENT_VERSION_10_M9 = 1
static final int AGENT_VERSION_60_BETA1 = 8
static final int AGENT_VERSION_60_M10 = 7
static final int AGENT_VERSION_60_M5 = 3
static final int AGENT_VERSION_60_M6 = 4
static final int AGENT_VERSION_60_M7 = 5
static final int AGENT_VERSION_60_M8 = 6
static final int ARCH_32 = 32
static final int ARCH_64 = 64
static final byte BUFFEREVENT_PROFILEPOINT_HIT = 26
static final String CALIBRATION_PSEUDO_CLASS_NAME = "____Profiler+Calibration+Run____"
static final byte COMPACT_EVENT_FORMAT_BYTE_MASK = (byte) 0x80
static final char COMPACT_EVENT_METHOD_ID_MASK = 0x3FFF
static final int CPU_INSTR_FULL = 0
static final int CPU_INSTR_SAMPLED = 1
static final int CURRENT_AGENT_VERSION = AGENT_VERSION_60_BETA1
static final String ENGINE_WARNING = "*** Profiler engine warning: "
static final int EVENT_BUFFER_SIZE_IN_BYTES = 1200000
static final int FILTER_CONTAINS = 20
static final int FILTER_ENDS_WITH = 30
static final int FILTER_EQUALS = 40
static final int FILTER_NONE = 0
static final int FILTER_REGEXP = 50
static final int FILTER_STARTS_WITH = 10
static final int INJ_CODE_REGION = 8
static final int INJ_MAXNUMBER = 11
static final int INJ_OBJECT_ALLOCATIONS = 9
static final int INJ_OBJECT_LIVENESS = 10
static final int INJ_RECURSIVE_MARKER_METHOD = 2
static final int INJ_RECURSIVE_NORMAL_METHOD = 0
static final int INJ_RECURSIVE_ROOT_METHOD = 1
static final int INJ_RECURSIVE_SAMPLED_MARKER_METHOD = 5
static final int INJ_RECURSIVE_SAMPLED_NORMAL_METHOD = 3
static final int INJ_RECURSIVE_SAMPLED_ROOT_METHOD = 4
static final int INJ_REFLECT_METHOD_INVOKE = 6
static final int INJ_SERVLET_DO_METHOD = 7
static final int INSTR_CODE_REGION = 1
static final int INSTR_MAXNUMBER = 6
static final int INSTR_MEMORY_BASE = 4
static final int INSTR_NONE = 0
static final int INSTR_OBJECT_ALLOCATIONS = 4
static final int INSTR_OBJECT_LIVENESS = 5
static final int INSTR_RECURSIVE_FULL = 2
static final int INSTR_RECURSIVE_SAMPLED = 3
static final int INSTRSCHEME_EAGER = 2
static final int INSTRSCHEME_LAZY = 1
static final int INSTRSCHEME_TOTAL = 3
static final String INVOKE_METHOD_NAME = "invoke"
static final String INVOKE_METHOD_SIGNATURE = "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;"
static final String JAVA_LANG_REFLECT_METHOD_DOTTED_CLASS_NAME = "java.lang.reflect.Method"
static final String JAVA_LANG_REFLECT_METHOD_SLASHED_CLASS_NAME = "java/lang/reflect/Method"
static final int JDK_15 = 2
static final String JDK_15_STRING = "jdk15"
static final int JDK_16 = 3
static final String JDK_16_STRING = "jdk16"
static final int JDK_17 = 4
static final String JDK_17_STRING = "jdk17"
static final int JDK_UNSUPPORTED = -1
static final String JDK_UNSUPPORTED_STRING = "UNSUPPORTED_JDK"
static final byte MARKER_ENTRY = 3
static final byte MARKER_ENTRY_UNSTAMPED = 18
static final byte MARKER_EXIT = 4
static final byte MARKER_EXIT_UNSTAMPED = 19
static final char MAX_METHOD_ID_FOR_COMPACT_FORMAT = 0x3FFF
static final byte METHOD_ENTRY = 6
static final byte METHOD_ENTRY_COMPACT_BYTE_MASK = (byte) 0x80
static final char METHOD_ENTRY_COMPACT_MASK = 0x8000
static final byte METHOD_ENTRY_MONITOR = 22
static final byte METHOD_ENTRY_SLEEP = 24
static final byte METHOD_ENTRY_UNSTAMPED = 16
static final byte METHOD_ENTRY_WAIT = 20
static final byte METHOD_EXIT = 7
static final byte METHOD_EXIT_COMPACT_BYTE_MASK = (byte) 0xC0
static final char METHOD_EXIT_COMPACT_MASK = 0xC000
static final byte METHOD_EXIT_MONITOR = 23
static final byte METHOD_EXIT_SLEEP = 25
static final byte METHOD_EXIT_UNSTAMPED = 17
static final byte METHOD_EXIT_WAIT = 21
static final byte NEW_THREAD = 11
static final String NO_CLASS_NAME = "*NO_CLASS_NAME*"
static final String NO_METHOD_NAME = "*NO_METHOD_NAME*"
static final String NO_METHOD_SIGNATURE = "*NO_METHOD_SIGNATURE*"
static final byte OBJ_ALLOC_STACK_TRACE = 12
static final byte OBJ_GC_HAPPENED = 15
static final byte OBJ_LIVENESS_STACK_TRACE = 14
static final String PLEASE_REPORT_PROBLEM = "*** Please report this problem to feedback@profiler.netbeans.org"
static final String PROFILER_DOTTED_CLASS_PREFIX = "org.netbeans.lib.profiler."
static final String PROFILER_SEPARATE_EXEC_THREAD_NAME = "*** JFluid Separate Command Execution Thread"
static final String PROFILER_SERVER_SLASHED_CLASS_PREFIX = "org/netbeans/lib/profiler/server/"
static final String PROFILER_SERVER_THREAD_NAME = "*** Profiler Agent Communication Thread"
static final String PROFILER_SPECIAL_EXEC_THREAD_NAME = "*** Profiler Agent Special Execution Thread"
static final byte RESET_COLLECTORS = 10
static final byte ROOT_ENTRY = 1
static final byte ROOT_EXIT = 2
static final byte SERVLET_DO_METHOD = 27
static final byte SET_FOLLOWING_EVENTS_THREAD = 13
static final int SORTING_COLUMN_DEFAULT = -1
static final byte THREAD_STATUS_MONITOR = 3
static final java.awt.Color THREAD_STATUS_MONITOR_COLOR = new java.awt.Color(255, 114, 102)
static final String THREAD_STATUS_MONITOR_STRING = messages.getString("CommonConstants_ThreadStatusMonitorString")
static final byte THREAD_STATUS_RUNNING = 1
static final java.awt.Color THREAD_STATUS_RUNNING_COLOR = new java.awt.Color(58, 228, 103)
static final String THREAD_STATUS_RUNNING_STRING = messages.getString("CommonConstants_ThreadStatusRunningString")
static final byte THREAD_STATUS_SLEEPING = 2
static final java.awt.Color THREAD_STATUS_SLEEPING_COLOR = new java.awt.Color(155, 134, 221)
static final String THREAD_STATUS_SLEEPING_STRING = messages.getString("CommonConstants_ThreadStatusSleepingString")
static final byte THREAD_STATUS_UNKNOWN = -1
static final java.awt.Color THREAD_STATUS_UNKNOWN_COLOR = java.awt.Color.LIGHT_GRAY
static final String THREAD_STATUS_UNKNOWN_STRING = messages.getString("CommonConstants_ThreadStatusUnknownString")
static final byte THREAD_STATUS_WAIT = 4
static final java.awt.Color THREAD_STATUS_WAIT_COLOR = new java.awt.Color(255, 228, 90)
static final String THREAD_STATUS_WAIT_STRING = messages.getString("CommonConstants_ThreadStatusWaitString")
static final byte THREAD_STATUS_ZOMBIE = 0
static final java.awt.Color THREAD_STATUS_ZOMBIE_COLOR = java.awt.Color.BLACK
static final String THREAD_STATUS_ZOMBIE_STRING = messages.getString("CommonConstants_ThreadStatusZombieString")
static final byte THREADS_RESUMED = 9
static final byte THREADS_SUSPENDED = 8
static final byte TWO_TIMESTAMP_EVENTS = 6

Private Member Functions

void checkForInstrMethodsLimitReached ()
void checkForTargetAppRunning () throws ClientUtils.TargetAppOrVMTerminated
void checkForTargetVMAlive () throws ClientUtils.TargetAppOrVMTerminated
void clearPreviousInstrumentationInServer () throws InstrumentationException, ClientUtils.TargetAppOrVMTerminated
void closeConnection ()
boolean connectToServer (int attachMode, boolean calibrationOnlyRun)
void executeInSeparateThread (Command cmd)
synchronized Response getAndCheckLastResponse (String errMessage) throws ClientUtils.TargetAppOrVMTerminated
synchronized boolean getCalibrationData (boolean getStoredData) throws ClientUtils.TargetAppOrVMTerminated
synchronized Response getLastResponse () throws ClientUtils.TargetAppOrVMTerminated
boolean handleFakeClassLoad (RootClassLoadedCommand cmd)
void handleIOExceptionOnSend (IOException ex) throws ClientUtils.TargetAppOrVMTerminated
void instrumentMethodGroupFollowUp (Command cmd)
void instrumentMethodGroupFromRoot (final RootClassLoadedCommand cmd)
void readAndProcessProfilingResults (EventBufferDumpedCommand cmd)
synchronized String sendCommandAndGetResponse (Command cmd) throws ClientUtils.TargetAppOrVMTerminated
void sendComplexCmdToServer (Command cmd) throws ClientUtils.TargetAppOrVMTerminated
void sendComplexRespToServer (Response resp)
void sendSimpleCmdToServer (int cmdType) throws ClientUtils.TargetAppOrVMTerminated
synchronized String sendSimpleCommandAndGetResponse (int cmdType) throws ClientUtils.TargetAppOrVMTerminated
void sendSimpleRespToServer (boolean val, String errorMessage)
void setLastResponse (Response r)
boolean setVMProperties (VMPropertiesResponse resp, boolean terminateOnError)

Private Attributes

AppStatusHandler appStatusHandler
Socket clientSocket
InitiateInstrumentationCommand commandOnStartup = null
volatile boolean connectionWithServerOpen
CPUCCTProvider cpuCctProvider
int currentAgentId = -1
Command execInSeparateThreadCmd
Object execInSeparateThreadLock = new Object()
FlatProfileProvider flatProvider
volatile boolean forceObtainedResultsDumpCalled
Object forceObtainedResultsDumpLock = new Object()
volatile boolean handlingEventBufferDump
volatile boolean instrMethodsLimitReported
long instrProcessingTime
Object instrumentationLock = new Object()
Instrumentor instrumentor
Response lastResponse
CCTResultsFilter markFilter
MemoryCCTProvider memCctProvider
Object responseLock = new Object()
long resultsStart
int[] savedAllocatedObjectsCountResults
SeparateCmdExecutionThread separateCmdExecThread
boolean serverClassesInitialized
AppStatusHandler.ServerCommandHandler serverCommandHandler
ServerListener serverListener
ProfilerEngineSettings settings
boolean shouldDisplayDialog = true
ObjectInputStream socketIn
ObjectOutputStream socketOut
ProfilingSessionStatus status
volatile boolean targetVMAlive
volatile boolean terminateOrDetachCommandIssued
TimeCollector timeCollector
Object wdLock = new Object()
WireIO wireIO

Static Private Attributes

static final String a = "AAQ"
static final String CANNOT_OPEN_SERVER_TEMPFILE_MSG = messages.getString("ProfilerClient_CannotOpenServerTempFileMsg")
static final String CLASS_NOT_FOUND_MSG = messages.getString("ProfilerClient_ClassNotFoundMsg")
static final String CONNECT_VM_MSG = messages.getString("ProfilerClient_ConnectVmMsg")
static final String CORRUPTED_TARGET_CALIBRATION_DATA_MSG = messages.getString("ProfilerClient_CorruptedTargetCalibrationDataMsg")
static final String ERROR_GETTING_CALIBRATION_DATA_MSG = messages.getString("ProfilerClient_ErrorGettingCalibrationDataMsg")
static final String INCORRECT_AGENT_VERSION_MSG = messages.getString("ProfilerClient_IncorrectAgentVersionMsg")
static final String INSTRUMENTATION_LIMIT_REACHED_MSG = messages.getString("ProfilerClient_InstrumentationLimitReachedMsg")
static final String INVALID_CODE_REGION_MSG = messages.getString("ProfilerClient_InvalidCodeRegionMsg")
static final ResourceBundle messages = ResourceBundle.getBundle("org.netbeans.lib.profiler.Bundle")
static final String MUST_CALIBRATE_FIRST_MSG = messages.getString("ProfilerClient_MustCalibrateFirstMsg")
static final String MUST_CALIBRATE_FIRST_SHORT_MSG = messages.getString("ProfilerClient_MustCalibrateFirstShortMsg")
static final String OUT_OF_MEMORY_MSG = messages.getString("ProfilerClient_OutOfMemoryMsg")
static final String PERFORMING_INSTRUMENTATION_STRING = messages.getString("ProfilerClient_PerformingInstrumentationString")
static final String TARGET_JVM_ERROR_MSG = messages.getString("ProfilerClient_TargetJvmErrorMsg")
static final String UNSUPPORTED_JVM_MSG = messages.getString("ProfilerClient_UnsupportedJvmMsg")

Classes

class  SeparateCmdExecutionThread
class  ServerListener

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index