uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

7.5.3 Settings for the methods to be traced by the user-extended trace based performance analysis

Use the configuration file for the user-extended trace based performance analysis to specify the settings for the methods to be traced by the user-extended trace based performance analysis. You can code the contents of the configuration file for the user-extended trace based performance analysis in one of the following files or window:

Organization of this subsection
(1) Format of description
(2) Description items
(3) Rules of description
(4) Example of description of the configuration file for the user-extended trace based performance analysis
(5) Notes on creating the configuration file for the user-extended trace based performance analysis

(1) Format of description

The format for coding the configuration file for the user-extended trace based performance analysis is as follows:


specification-format#, identity-ID, subclass-flag [, [event-ID][,[trace-collection-level]]] [# Comment]

#1:
You can omit the items enclosed within [ ].

#2:
To trace all the methods with matching class names and package names, set up true in the value of the jvm.userprf.ExtendedSetting property.

#:
Specify specification-format in one of the following formats:

Example of coding format:

com.sample.Test.method(),TEST1,false,0xae02,A
com.sample.Test.method(),TEST1,false,0xae02
com.sample.Test.method(),TEST1,false,0xae02,
com.sample.Test.method(),TEST1,false,,A
com.sample.Test.method(),TEST1,false
com.sample.Test.method(),TEST1,false,
com.sample.Test.method(),TEST1,false,,

(2) Description items

The items coded in the configuration file for the user-extended trace based performance analysis are as follows:

Specification-format
Specify the method to be traced.
package-name
Specify the package name of the class or interface of the method to be traced.
class-name
Specify the class name or interface name of the method to be traced. If you specify the interface name instead of the class name, and if true is specified in the subclass flag, the method implementing that interface is traced.
method-name
Specify the method to be traced.
type-name-of-the-method-argument
Specify the argument type of the method to be traced using the fully qualified name.

identity-ID
Specify the character string for identifying the method to be traced.
The characters you can use are the ASCII characters from 0x21(!) to 0x7e(~). However, you cannot specify 0x22(") , 0x23(#), and 0x2c(,).
The identity ID is output to the PRF trace file. Note that up to 32 characters are output to the PRF trace file. The 33rd and subsequent characters are omitted and * (asterisk) is output as the 33rd character.
Note
If a subclass exists in the class defining the method to be traced and if the method to be traced is not overridden in that subclass, the specified identity ID is output for the superclass method to be traced.

subclass-flag
Specify whether to trace the methods of the class that has an inheritance relationship with the classes or interfaces of the specified method, using true or false.
  • If you specify true, the specified method and the methods overriding the specified method are traced.
  • If you specify false, only the specified method is traced, and the methods overriding the specified method are not traced.

event-ID
Specify the point for acquiring the trace information (trace collection point) using a hexadecimal value (0xae02 to 0xae7e and 0xc000 to 0xcffe). The default value is 0xae00.
This value is output in the trace information that is output at the method entry, and this value + 1 is output in the trace information that is output at the method exit.

trace-collection-level
Specify A, B, C, or their respective lower cases in the trace collection level of the methods to be traced. The default value is A.
  • A: Standard level
  • B: Advanced level
  • C: Maintenance level
Reference note
The trace collection level is the same as the PRF trace collection level of the cprflevel command. All the methods to be traced reference the levels of the Java VM layers. For details on the PRF collection levels and layers, see cprflevel (Displaying and changing PRF trace collection level) in the uCosminexus Application Server Command Reference Guide.

comment
A comment begins with # (hash mark). All the characters from # (hash mark) up to the end of the line are assumed to be a comment.

(3) Rules of description

The rules for coding the configuration file for the user-extended trace based performance analysis are as follows:

(4) Example of description of the configuration file for the user-extended trace based performance analysis

This section describes the examples of coding of the configuration file for the user-extended trace based performance analysis for each method to be traced.

Note that the examples of code assume that the package name is com.sample, and that the application has the class structure shown in the following figure.

Figure 7-8 Example of the class structure of the application

[Figure]

(a) To trace a method with matching method name and argument types

The following is an example of coding the user-extended trace based performance analysis configuration file when you want to trace a method with a matching method name and argument types:

If the subclass flag is false
 
com.sample.ClassA.methodA1(java.lang.String,java.lang.Object),1000,false
 

If the subclass flag is false, the coded method with a matching method name and argument types is traced.

Method to be traced
  • methodA1(String,Object) of the ClassA class

The event ID is not set for the method to be traced, so if you invoke the method to be traced, the default value 0xae00 is output as the event ID at the method entry, 0xae01 is output at the method exit. Also, 1000 is set in the identity ID, so 1000 is output as the identity ID.

If the subclass flag is true
 
com.sample.ClassA.methodA2(),2000,true
 

If the subclass flag is true, in addition to the method in which the method name and argument types match the code, the methods overriding the coded method are also traced.

Methods to be traced
  • methodA2() of the ClassA class
  • methodA2() of the ClassB class that overrides methodA2() of the ClassA class

The event ID is not set for the method to be traced, so if you invoke the method to be traced, the default value 0xae00 is output as the event ID at the method entry, 0xae01 is output at the method exit. Also, 2000 is set in the identity ID, so 2000 is output as the identity ID for all the methods to be traced.

(b) To trace methods with matching method names

The following is an example of coding the user-extended trace based performance analysis configuration file when you want to trace methods with matching method names:

If the subclass flag is false
 
com.sample.ClassA.methodA1(*),methodA1,false,0xae30
 

If the subclass flag is false, all the methods matching with the coded method names are traced.

Methods to be traced
  • methodA1(String,Object) of the ClassA class
  • methodA1(int) of the ClassA class

If the method to be traced is invoked, 0xae30 is output as the event ID at the method entry, and 0xae31 is output at the method exit. Also, methodA1 is output as the identity ID for all the methods to be traced.

If the subclass flag is true
 
com.sample.ClassA.methodA1(*),methodA1,true,0xae30
 

If the subclass flag is true, all the methods matching with the coded method names are traced. Also, in addition to the coded method, the methods overriding the coded method are also traced.

Methods to be traced
  • methodA1(String,Object) and methodA1(int) of the ClassA class
  • methodA1(String,Object) of the ClassB class that overrides methodA1(String,Object) of the ClassA class
  • methodA1(String,Object) of the ClassC class that overrides methodA1(String,Object) of the ClassB class

If the method to be traced is invoked, 0xae30 is output as the event ID at method entry, and 0xae31 is output at method exit. Also, methodA1 is output as the identity ID for all the methods to be traced.

(c) To trace all the methods with matching class names

The following is an example of coding the user-extended trace based performance analysis configuration file when you trace all the methods with matching class names, omitting the methods and arguments.

If the subclass flag is false
 
com.sample.ClassA,TEST01,false
 

If the subclass flag is false, all the methods with the coded class name (ClassA class) are traced.

Methods to be traced
  • methodA1(String,Object), methodA1(int), and methodA2() of the ClassA class

If the method to be traced is invoked, 0xae00 is output at method entry and 0xae01 is output at method exit because the event ID is omitted. Also, TEST01 is output as the identity ID for all the methods.

If the subclass flag is true
 
com.sample.ClassB,TEST02,true
 

If the subclass flag is true, all the methods with the coded class name (ClassB class), and all the methods that override these methods are traced.

Methods to be traced
  • methodA1(String,Object) of the ClassB class
  • methodA2() of the ClassB class
  • methodB1() of the ClassB class
  • methodA1(String,Object) of the ClassC class that overrides methodA1(String,Object) of the ClassB class

If the method to be traced is invoked, 0xae00 is output at method entry and 0xae01 is output at method exit because the event ID is omitted. Also, TEST02 is output as the identity ID for all the methods.

(d) To trace all the methods with matching package names

The following is an example of coding the user-extended trace based performance analysis configuration file when you trace all the methods of all the classes with matching package names, omitting the class names, method names, and arguments.

Note
This specification also includes the sub-packages as trace targets. When a sub-package is to be traced, the trace is output when the target method is invoked.
If the com.sample package has a sub-package, all the methods of all the classes of that sub-package are also traced.
If the subclass flag is false
 
com.sample.*,6000,false
 

If the subclass flag is false, all the methods of all the classes in the coded package (com.sample) are traced.

Methods to be traced
All the methods of ClassA, ClassB, ClassC, and ClassD are traced.

If the method to be traced is invoked, 0xae00 is output at method entry and 0xae01 is output at method exit because the event ID is omitted. Also, 6000 is output as the identity ID for all the methods.

If the subclass flag is true
 
com.sample.*,6000,false
 

If the subclass flag is true, all the methods of all the classes in the coded package (com.sample), and all the methods that override these methods are traced.

Methods to be traced
All the methods of ClassA, ClassB, ClassC, and ClassD, and all the methods that override these methods are traced.

If the method to be traced is invoked, 0xae00 is output at method entry and 0xae01 is output at method exit because the event ID is omitted. Also, 6001 is output as the identity ID for all the methods.

(5) Notes on creating the configuration file for the user-extended trace based performance analysis

The precautions to be taken when you create a configuration file for the user-extended trace based performance analysis are as follows: