| |
|
| java.lang.Object org.netbeans.lib.profiler.TargetAppRunner
TargetAppRunner | public class TargetAppRunner implements CommonConstants(Code) | | Functionality for high-level control of the Target Application (TA) execution, plus some utility methods
that seemed to fit best here.
author: Tomas Hurka author: Misha Dmitriev author: Ian Formanek |
attachToTargetJVM | public boolean attachToTargetJVM(File tvmDir) throws IOException(Code) | | Attaches to a running application. It is expected that prepareForAttach method is called before this one
to prepare the target app environment for attaching.
Parameters: tvmDir - The working directory for the target application throws: IOException - in case sending signal to target app failed |
attachToTargetVM | public boolean attachToTargetVM()(Code) | | |
attachToTargetVMOnStartup | public boolean attachToTargetVMOnStartup()(Code) | | Attach to the started and waiting target JVM using the "attach on startup" method
|
calibrateInstrumentationCode | public boolean calibrateInstrumentationCode()(Code) | | This call runs the target JVM instance just to calibrate (that is, measure the time it takes to execute)
the instrumentation code that we then inject into target app code. The results are saved to be reused
in subsequent runs.
|
connectToStartedVMAndStartTA | public boolean connectToStartedVMAndStartTA()(Code) | | Connects to the target JVM started using startTargetVM(), and starts the target application.
Error reporting happens in the same way as in runTargetApp().
|
detachFromTargetJVM | public void detachFromTargetJVM()(Code) | | |
hasSupportedJDKForHeapDump | public boolean hasSupportedJDKForHeapDump()(Code) | | |
initiateSession | public boolean initiateSession(int attachMode, boolean calibrationOnlyRun)(Code) | | Initiates profiling session
Parameters: attachMode - 0 = no attach; 1 = direct; 2 = dynamic Parameters: calibrationOnlyRun - Returns TRUE if the connection to the profiler agent has been successfuly established |
readSavedCalibrationData | public boolean readSavedCalibrationData()(Code) | | true if the calibration data was read succesfully, false otherwise |
startTargetVM | public boolean startTargetVM()(Code) | | Starts the the target JVM, that then waits for the tool to establish the socket connection and start the
TA itself). This function returns boolean indicating success or failure, however the actual problem is
reported inside it using methods of the AppStatusHandler passed to this TargetAppRunner.
|
targetAppIsRunning | public boolean targetAppIsRunning()(Code) | | |
targetAppSuspended | public boolean targetAppSuspended()(Code) | | |
targetJVMIsAlive | public boolean targetJVMIsAlive()(Code) | | |
terminateTargetJVM | public void terminateTargetJVM()(Code) | | |
|
|
|