Pre-applying a Probe

When you pre-apply a probe, Probekit instruments your application by inserting probe code and calls to the probe's classes into your application's class files. You can specify the names of application class files, jar files, or folders on the command line that invokes the Probekit instrumentation engine.

To run the Probekit instrumentation engine and pre-apply a probe:
  1. Ensure that your CLASSPATH environment variable contains the full path and filename of the probekit.jar file. The probekit.jar file is located in the org.eclipse.hyades.probekit subfolder of your Eclipse plugins folder.
  2. Ensure that your PATH environment variable contains the full path to the subfolder of org.eclipse.hyades.probekit that is appropriate for your platform:
    • Windows platform icon os\win32\x86 for Microsoft® Windows®
    • Solaris platform icon os/solaris/sparc for Solaris
    • Linux platform icon os/linux/x86 for Linux™
  3. At the command prompt, enter the command: java ProbeInstrumenter, followed by the name of the .probescript file for the probe you want to use, and a list of items to instrument. The list items can be class files, jar files, or folders. For example:
    java ProbeInstrumenter myprobe.probescript c:\myproject_path\myprogram.jar
    The application class files that match the probe's targeting rules are instrumented.
The instrumentation engine processes your application files and folders as follows:
  • When a class file is instrumented, the uninstrumented *.class file is copied to a file named *.class.bak, and calls to the probe's classes are inserted into the *.class file.
  • When a jar file is instrumented, the uninstrumented *.jar file is copied to a file named *.jar.bak, and calls to the probe's classes are inserted into the class files inside the *.jar file.
  • When the contents of a folder are instrumented, the Probekit instrumentation engine descends into the folder tree recursively and processes the class files and jar files as described above.
Note: The Probekit instrumentation engine will not re-instrument class files and jar files that have already been instrumented. You must remove existing probe instrumentation first.

Parent topic: Collecting Probe Data Outside of the Workbench

Related tasks
Removing Probekit Instrumentation

Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.