TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.jvmti.client.internal.launcher
Class TIDelegateHelper

java.lang.Object
  extended byorg.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper

public class TIDelegateHelper
extends java.lang.Object

This delegate helper is shared between all launch configuration types (e.g. local Java application, external Java application, Eclipse application, and etc...). The logic behind the launch is the same. The only difference is the process parameters. The following sequence of tasks starts the profiling session:

This is a singleton class whose instance is locked when the launch method is invoked.


Nested Class Summary
 class TIDelegateHelper.ACDataProcessorAdapter
          A data process adapter that turns the current data processor that we use for our trace model to a data processor that is acceptable by the new Agent Controller.
static class TIDelegateHelper.NOOPCommandHandler
          A dummy command handler that doesn't do anything in response to a command that is sent
 
Field Summary
protected static java.lang.String EXEC_JAVA
          The executable that's run
protected static java.lang.String TI_JVM_FLAG
          The JVM argument used to launch a Java application with the JVMTI flag
 
Method Summary
 org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.tptp.platform.execution.client.core.IAgentController agentController, org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy, org.eclipse.tptp.platform.execution.client.core.IProcess process, org.eclipse.core.runtime.IProgressMonitor monitor)
          Attaches to the JVMTI agent based on a previous attach.
static TIDelegateHelper getInstance()
          Returns the instance of this singleton class
static org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters getProcessParameter(org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters processParameters)
           
 void launch(ILauncherParameterProvider launcher, org.eclipse.debug.core.ILaunchConfiguration launchConfiguration, java.lang.String mode, org.eclipse.debug.core.ILaunch launch, org.eclipse.core.runtime.IProgressMonitor monitor)
          Launches a profiling session
static org.eclipse.tptp.platform.execution.client.agent.ICollector locateTIAgent(org.eclipse.tptp.platform.execution.client.core.IAgentController agentController, long processId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXEC_JAVA

protected static final java.lang.String EXEC_JAVA
The executable that's run

See Also:
Constant Field Values

TI_JVM_FLAG

protected static final java.lang.String TI_JVM_FLAG
The JVM argument used to launch a Java application with the JVMTI flag

See Also:
Constant Field Values
Method Detail

getInstance

public static TIDelegateHelper getInstance()
Returns the instance of this singleton class


launch

public void launch(ILauncherParameterProvider launcher,
                   org.eclipse.debug.core.ILaunchConfiguration launchConfiguration,
                   java.lang.String mode,
                   org.eclipse.debug.core.ILaunch launch,
                   org.eclipse.core.runtime.IProgressMonitor monitor)
            throws org.eclipse.core.runtime.CoreException
Launches a profiling session

Parameters:
launcher - The launcher
launchConfiguration - The launch configuration
mode - The mode of the launch
launch - The launch
monitor - The progress monitor
Throws:
org.eclipse.core.runtime.CoreException - In case of an error

attachToAgent

public org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.tptp.platform.execution.client.core.IAgentController agentController,
                                                                       org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy,
                                                                       org.eclipse.tptp.platform.execution.client.core.IProcess process,
                                                                       org.eclipse.core.runtime.IProgressMonitor monitor)
Attaches to the JVMTI agent based on a previous attach. This method is used to reattach to the detached agent "agentProxy". The configuration of "agentProxy" is used to re-attach to the JVMTI agent.

Parameters:
agentController - The agent controller connection
agentProxy - The agent proxy that the user is re-attaching to
process - The execution process
monitor - The monitor.
Returns:
The agent proxy that is created as a result of a re-attach. This value can be null if an unexpected error occurrs.

locateTIAgent

public static org.eclipse.tptp.platform.execution.client.agent.ICollector locateTIAgent(org.eclipse.tptp.platform.execution.client.core.IAgentController agentController,
                                                                                        long processId)

getProcessParameter

public static org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters getProcessParameter(org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters processParameters)

TPTP 4.2.0 Platform Project
Internal API Specification