Terrasoft ProfilerJTerrasoft ProfilerJ
Home | Features | Screenshots | Documentation | Download | Evaluate | Buy | Contact | About
ProfilerJ
Agent
Snapshot file format
ProfilerJ Console
Command line reference
Installation
Content of distribution
Installation
Tutorial
Step 1 - Download files
Step 2 - Deploy agent
Step 3 - Run ProfilerJ Console
Step 4 - Get a license key
Step 5 - Run ProfilerJ Viewer
Step 6 - Sampling
Step 7 - Byte Code Instrumentation
Step 8 - Code Coverage
ProfilerJ Viewer

Step 2 - Deploy agent

ProfilerJ utilizes the java.lang.instrument package to instrument the byte code of the application to be profiled. All the instrumentation stuff along with a transfer-handler allowing remote access via sockets is in com.terrasoft.jrc.agent.jar. To deploy the agent, modify example01.bat so that it looks like:

set profiler=-Xbootclasspath/a:com.terrasoft.jrc.agent.jar -javaagent:com.terrasoft.jrc.agent.jar=suspend=y,waitonexit=y
java %profiler% -cp examples.jar com.terrasoft.profilerj.tutorial.Example01

Start example01.bat now and you will see something like this:

profilerJ Agent V1.4.0-b7, Copyright (c) 2006 Terrasoft Software GmbH. All rights reserved.
socket_transport listening at localhost:9000
Redefine 0 classes ...
done.
Process is suspended ...

The switch "...suspend=y,..." causes the agent to suspend execution until it receives a "resume" command. Shortly speaking, we need a ProfilerJ-Client (which connects to localhost:9000 ) in order to send a "resume". Currently we provide two clients:

  • ProfilerJ-console, a Command line client: Royalty free, but admittedly rather cumbersome to work with
  • ProfilerJ-viewer, a Swing-based client: Offers a easy to handle user interface. To use it you have to purchase a license or request an evaluation license.

«previous   next »

Copyright © 2006 Terrasoft Software GmbH. All rights reserved.