Profiling resources

The term, profiling resource, refers to the level of granularity used to open the profiling views. The levels of resource are found in the Profiling Monitor view. Selecting a resource enables you to open an aggregated view based on that resource. For example, a view opened from the host level enables you to see profile data from processes and agents that had been associated with the selected host. The available resources are listed below.

 

Projects and Folders

A Java project contains source code and related files for building a Java program. A Java project also maintains a model of its contents. This model includes information about the type hierarchy, references and declarations of Java elements. A folder (or directory) is a container that may contain any kind of file.

By default, these objects are hidden from view. You can make them visible by using the Preferences window (Window > Preferences > Profiling and Logging > Appearance) and clearing the Folders check box.

 

Monitors

A monitor is a logical container for profiling information that is collected from a group of processes. The views at the monitor level show profiling data collected from these processes. Monitors are useful for aggregating profiling data collected from processes running in a distributed application.

Monitors are represented by monitor objects. By default, these objects are hidden from view. You can make the monitor objects visible by selecting Distributed layout on the Profiling Monitor toolbar.

 

Hosts

A host is a machine, or a machine execution partition, on which an application under test resides. The host owns the processes that are profiled. A host runs processes. You can specify a host either by its name or by its IP address.

Different monitors may have hosts with the same name. Such hosts are unique for each monitor because the resources in the Profiling Monitor view are identified by their full path.

By default, these objects are hidden from view. You can make the monitor objects visible by selecting Distributed layout on the Profiling Monitor toolbar.

 

Processes

The process object represents the application being profiled.

Processes are identified by the name of the process and the ID number. The name of the process takes two forms, depending on how the process was launched:

  1. If the process was launched from the workbench, the name of the process is the Java class. For example:
          HelloWorld [PID:3048]

  2. If the process is already running, and you attach to it, the process name is either java, if the process is a Java process, or it is the process image name. For example:
        java [PID:168]
        NewProcess.exe [PID:346]

Once you start profiling a Java application, the process and the associated agents are displayed in the Profiling Monitor view.

 

Agents

In the Agent Controller deployment model, an agent is a reusable binary file that provides services to the host process and, more importantly, provides a portal by which application data can be forwarded to attached clients. Agents collect data about the execution of an application program. The views of the Profiling and Logging Perspective provide visualizations of the information that is collected by agents. The Java Profiling Agent is a profiling agent.

The Java Profiling Agent runs in the JVM (Java Virtual Machine) process and receives notifications of JVM events. Until Java 1.5, the standard profiling interface offered was an experimental profiling interface for tool vendors, called the Java Virtual Machine Profiling Interface (JVMPI). The JVMPI was not standardized and its behavior varied considerably across different JVMs. In addition, the JVMPI had problems when profiling very large heaps. With Java 1.5, the JVM Tool Interface (JVMTI) was added to the Java platform to overcome these problems. Java Profiler supports JVMPI on Java 1.4 and supports JVMTI interface on Java 1.5 and higher java virtual machines.

The profiling agent allows interactive profiling and has the following states of operation:

Paused

The agent is started (it is running), but it is not monitoring (data collection is paused).

Monitoring

The agent is running and monitored.  Whenever the agent receives data from the application being monitored, the word, "...collecting" appears next to the agent's name.

Terminated

The agent is no longer alive. In the case of the profiling agent, which maps to the lifetime of the process, the symbol indicates that the application has run to completion, and the agent has exited or completed its work.

Detached

The process may be running but the current workbench client is not attached to the agent. Any other workbench can attach to this agent and start monitoring the application. If the process terminates while the agent is detached, the agent status will not be updated to terminated.

 

Profiling sets

A profiling set is a set of criteria that is used to narrow down the scope of the profiling data collected. The profiling sets allow you to collect specific information for analysis. The Profiling Tool provides three profiling sets:

Memory Analysis *

Captures heap dump and performs memory analysis.

Time Analysis

Captures code execution history.

Code Coverage

Captures code coverage information.

Thread Statistics **

Captures application threading execution

Thread Visualizer **

Provides a over time view of the application threading behavior

* Supported for Java 1.4 and lower profiling.

** Supported for Java 1.5 and higher profiling

Related concepts
Overview of the Profiling Tool

Related tasks
Profiling an application
Using the Profiling Monitor view