Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


8.4 userprf.cfg

userprf.cfg is a configuration file for specifying the settings for performance-based trace analysis.

Description

The configuration file userprf.cfg is used to specify information about the methods to be traced by the performance-based trace analysis function.

Syntax

specification_format,ID,subclass_flag[,[event_ID][,[trace_collection_level]]]
[#comment]
Note

To set, as the trace targets, all methods whose class name and package name match the specified conditions, specify true for the value of the jvm.userprf.ExtendedSetting property.

The items to be specified in the performance-based trace analysis configuration file are as follows:

Items to be specified

Description

specification_format

Specifies the methods to be traced.

Specify one of the following formats for specification_format:

  • To trace methods whose method name and argument type match

    package_name.class_name.method_name(argument_type_of_the_method)

  • To trace methods whose name matches the specified method

    package_name.class_name.method_name(*)

  • To trace all methods whose class name matches the specified class

    package_name.class_name

  • To trace all methods whose package name matches the specified package

    package_name.*

The items to be specified in the specification format are as follows:

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 an interface name instead of a class name and true is specified for the subclass flag, the methods that implement the specified interface will be traced.

method_name

Specify the name of the method to be traced.

argument_type_of_the_method

Specify the argument type of the method to be traced by using the fully qualified name.

ID

Specify the character string for identifying the method to be traced (hereinafter referred to as the ID).

The specifiable characters are ASCII characters from 0x21 (!) to 0x7e (~). However, you cannot specify 0x22 ("), 0x23 (#), or 0x2c (,).

The ID is output to the PRF trace file. Note that a maximum of 32 characters can be output to the PRF trace file. The 33rd and subsequent characters will be omitted, and an asterisk (*) will be output as the 33rd character.

If a subclass exists in the class for which the method to be traced is defined and the method to be traced is not overridden in the subclass, the ID specified for the method to be traced in the superclass is output.

subclass_flag

Specify true or false to indicate whether the methods of the classes that have an inheritance relationship with the classes or interfaces of the specified method are to be included as trace targets.

  • If you specify true, the specified method and the methods overriding the specified method will be traced.

  • If you specify false, only the specified method will be traced, and the methods overriding the specified method will not be traced.

event_ID

Specify the point for which trace information is to be collected (trace collection point) by using a hexadecimal value from 0xae02 to 0xae7e, or from 0xc000 to 0xcffe. The default value is 0xae00.

This value is output in the trace information that is output at the method entry. The value that is added 1 to this value is output in the trace information that is output at the method exit.

comment

A comment begins with a number sign (#). The character string from the number sign (#) to the end of the line is regarded as a comment.

The specification rules for the performance-based trace analysis configuration file are as follows:

The following is an example of the specification format of the performance-based trace analysis configuration file:

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,,

Storage location

installation_directory_for_JDK/usrconf/userprf.cfg

Examples

Note that this specification example is for an application whose package name is "com.sample" and whose class structure is as shown in the following figure:

Figure 8‒3: Example of the class structure of an application

[Figure]

The following is a specification example of a performance-based trace analysis configuration file that sets the methods whose method name and argument type match, as the trace target methods.

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 method whose name and argument type match the specified method is set as the trace target method.

The following method is to be traced:

  • methodA1(String,Object) of ClassA

No event ID is set for the trace target methods. As a result, when you invoke a trace target method, the default value 0xae00 is output as the event ID at the method entry, and 0xae01 is output at the method exit. In addition, 1000 is set for the ID, and thus 1000 is output as the ID.

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

If the subclass flag is true, in addition to the method whose name and argument type match the specified method, the methods overriding the specified method are set as the trace target methods.

The following methods are to be traced:

  • methodA2() of ClassA

  • methodA2() of ClassB that overrides methodA2() of ClassA

No event ID is set for the trace target methods. As a result, when you invoke a trace target method, the default value 0xae00 is output as the event ID at the method entry, and 0xae01 is output at the method exit. In addition, 2000 is set for the ID, and thus 2000 is output as the ID for all methods to be traced.

The following is a specification example of a performance-based trace analysis configuration file that sets the methods whose name matches the specified method, as the trace target methods.

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

If the subclass flag is false, all methods whose name matches the specified method are set as the trace target methods.

The following methods are to be traced:

  • methodA1(String,Object) of ClassA

  • methodA1(int) of ClassA

When you invoke a trace target method, 0xae30 is output as the event ID at the method entry, and 0xae31 is output at the method exit. In addition, methodA1 is output as the ID for all methods to be traced.

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

If the subclass flag is true, all methods whose name matches the specified method are set as the trace target methods. In addition to the specified method, the methods overriding the specified method are also traced.

The following methods are to be traced:

  • methodA1(String,Object) and methodA1(int) of ClassA

  • methodA1(String,Object) of ClassB that overrides methodA1(String,Object) of ClassA

  • methodA1(String,Object) of ClassC that overrides methodA1(String,Object) of ClassB

When you invoke a trace target method, 0xae30 is output as the event ID at the method entry, and 0xae31 is output at the method exit. In addition, methodA1 is output as the ID for all methods to be traced.

The following is a specification example of a performance-based trace analysis configuration file that sets all methods whose class name matches the specified class as the trace target methods, when no method or argument is specified.

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

If the subclass flag is false, all methods of the specified class name (ClassA class) are set as the trace target methods.

The following methods are to be traced:

  • methodA1(String,Object), methodA1(int), and methodA2() of ClassA

No event ID is set for the trace target methods. As a result, when you invoke a trace target method, when you invoke a trace target method, 0xae00 is output at the method entry and 0xae01 is output at the method exit. In addition, TEST01 is output as the ID for all methods to be traced.

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

If the subclass flag is true, all methods of the specified class name (ClassB class) and all methods overriding those methods are set as the trace target methods.

The following methods are to be traced:

  • methodA1(String,Object) of ClassB

  • methodA2() of ClassB

  • methodB1() of ClassB

  • methodA1(String,Object) of ClassC that overrides methodA1(String,Object) of ClassB

No event ID is set for the trace target methods. As a result, when you invoke a trace target method, when you invoke a trace target method, 0xae00 is output at the method entry and 0xae01 is output at the method exit. In addition, TEST02 is output as the ID for all methods to be traced.

The following is a specification example of a performance-based trace analysis configuration file that sets all methods of all classes whose package name matches the specified package as the trace target methods, when no class name, method name, or argument is specified.

Important note

This specification also sets subpackages as trace targets. When a subpackage is set as a trace target, the trace is output when the trace target method is invoked.

If the com.sample package has a subpackage, all methods of all classes of that subpackage are also set as trace targets.

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

If the subclass flag is false, all methods of all classes in the specified package (com.sample) are set as the trace target methods.

The following methods are to be traced:

  • All methods of ClassA, ClassB, ClassC, and ClassD

No event ID is set for the trace target methods. As a result, when you invoke a trace target method, when you invoke a trace target method, 0xae00 is output at the method entry and 0xae01 is output at the method exit. In addition, 6000 is output as the ID for all methods to be traced.

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

If the subclass flag is true, all methods of all classes in the specified package (com.sample) and all methods overriding those methods are set as the trace target methods.

The following methods are to be traced:

  • All methods of ClassA, ClassB, ClassC, and ClassD, and all methods overriding those methods

No event ID is set for the trace target methods. As a result, when you invoke a trace target method, when you invoke a trace target method, 0xae00 is output at the method entry and 0xae01 is output at the method exit. In addition, 6000 is output as the ID for all methods to be traced.

Notes