Java Instrumentation Launcher - javic

Purpose

The Instrumentation Launcher provides a means of instrumenting and compiling Java source files with minimal changes to your usual compilation sequence. The Instrumentation Launcher is used by Performance Profiling, Runtime Tracing and Code Coverage.

Syntax

javic [<options>] -- <compilation_command>

where:

Description

The Instrumentation Launcher (javic) fits into your compilation sequence with minimal changes.

The Instrumentation Launcher is suitable for use with only one compiler and only one Target Deployment Port. To view information about the driver, run javic with no parameters.

The javic (or javic.exe) binary is located in the cmd subdirectory of the Target Deployment Port.

The Java Instrumentation Launcher automatically sets the $ATLTGT environment variable if it is not already set.

The $CLASSPATH or $EDG_CLASSPATH environment variable must point to the native classes required by the Instrumentor. Alternatively, you can specify one or several additional classpaths by using the -CLASSPATH option of the Java Instrumentor. The -CLASSPATH option overrides the $CLASSPATH and $EDG_CLASSPATH environment variables -in that order- during instrumentation.

Command line options can be abbreviated to their shortest unambiguous number of characters and are not case-sensitive.

Customization

The javic (or javic.exe) binary is a copy of the perllauncher (or perllauncher.exe) binary located in <InstallDir>/bin/<platform>/<os>.

The launcher runs the javic.pl perl script which is located in the cmd subdirectory and produces the products.java file that contains the default configuration settings. These are copied from <InstallDir>/lib/scripts/BatchJavaDefault.pl.

The javic.pl included with the product is for the Sun JDK 1.3.1 or 1.4.0 compiler. This script can be changed in the TDP Editor, allowing you to customize the default settings, which are based on the BatchJavaDefault.pl script, before the call to PrepareJavaTargetPackage.

Options

The Instrumentation Launcher accepts all command line options designed for the Java Instrumentor (javi). The following additional options are specific to javic:

  --atl_threads_max=<number>

      Sets the maximum number of threads at the same time. The default value is 64.

 

  --atl_buffer_size=<bytes>

      Sets the size of the Dump Buffer in bytes. The default value is 16384.

 

  --address=<IPaddress>

      Address of the Socket Trace Receiver Host. The default address is 127.0.0.1.

 

  --uploader_port=<port number>

      Port number listened to by the Socket Trace Receiver Host. The default port number is 7777.

 

  --atl_run_gc_at_exit=0|1

      Set this setting to 1 to run finalizers invoking the Garbage Collector upon exit. 0 disables the option. Default is 1.

 

  --atj_check_stub=0|1

      Check Component Testing for Java stubs. Default is 0.

 

  --atj_display_stub=0|1

      Display Component Testing for Java stubs in Runtime Tracing. Default is 0.

 

  --att_on_the_fly=0|1

      If set to 1, implies that each tdf lines are flushed immediately in order to be read on-the-fly by Runtime Tracing. Default is 1.

 

  --att_partial_dump=0|1

      Partial Message Dump is on if set to 1 in Runtime Tracing. Default is 0.

 

  --att_timestamp=0|1

      If 1 record and display Time Stamp in Runtime Tracing. Default is 1.

 

  --att_heap_size=0|1

      Record and Display Current Heap Size in Runtime Tracing. Default is 1.

 

  --att_thread_info=0|1

      Record and Display Thread Information in Runtime Tracing. Default is 1.

 

  --att_record_max_stack=0|1

      Record and Display Max Stack in a note in Runtime Tracing. Default is 1.

Example

The following command launches Runtime Tracing instrumentation of program1.java and its dependencies, then compiles the instrumented classes in the java.jir directory.

javic -trace -- javac program1.java

 

The following command launches Code Coverage instrumentation of program2.java and program3.java, as well as their dependencies, and generates the instrumented classes in the tmpclasses directory.

javic -proc=r -block=l -- javac program1.java program2.java -d tmpclasses

 

In this example, tmpclasses will contain the compiled TDP classes only if they are not already in the TDP directory. The -d option creates these TDP .class files in the same location as the source files. Make sure that you set a correct CLASSPATH when running the application.

Related Topics

Java Instrumentation Launcher for AntC and C++ Instrumentation Launcher