All Packages Class Hierarchy This Package Previous Next Index
Class Samples.ProfileNester
java.lang.Object
|
+----Samples.ProfileNester
- public class ProfileNester
- extends Object
This class provides a utility which accepts a file of
java profile information generated by the java -prof option
and prints out a call tree of the called methods,
their call counts and amounts of time.
See the main method for invocation protocol.
-
calleeTable
- The associations between the callee and the caller.
-
countsTable
- The associations between the callee-caller and the counts of calls from caller to callee.
-
TabString
- A string for formatting the indentation representing the nesting level.
-
timesTable
- The associations between the callee-caller and the amounts of time spent in the calls.
-
ProfileNester()
- Constructs an initialized ProfileNester.
-
call(String, int)
- Prints nested nodes in the call tree.
-
main(String[])
- Invokes the ProfileNester service.
-
parse(String)
- Captures the information from the profile file.
calleeTable
private Hashtable calleeTable
- The associations between the callee and the caller.
timesTable
private Hashtable timesTable
- The associations between the callee-caller and the amounts of time spent in the calls.
countsTable
private Hashtable countsTable
- The associations between the callee-caller and the counts of calls from caller to callee.
TabString
private static String TabString
- A string for formatting the indentation representing the nesting level.
ProfileNester
ProfileNester()
- Constructs an initialized ProfileNester.
parse
void parse(String filename)
- Captures the information from the profile file.
Parse the fields from the java.prof file populating association tables.
- Parameters:
- filename - the complete file name of the java.prof file
main
public static void main(String args[])
- Invokes the ProfileNester service.
To invoke this utility call ProfileNester,
Usage: ProfileNester java.prof caller_entry_point
where java.prof is the file generated by the java -prof option
and caller_entry_point is the desired root node of the call tree,
this must match exactly the desired caller as specified in the java.prof file
For example, running Samples.GetQuotes with jdk1.1.6\bin\java_g -prof
(jdk1.2beta3\bin\java -Xprof), see GetQuotes.main() for protocols,
or, running it in the debugger with a Debug option of -prof,
will produce a java.prof that this example will process.
Create the java.prof file, then from the JIG Browser,
highlight this command line and select run,
Samples.ProfileNester ..\Samples\java.prof Samples/GetQuotes.main([Ljava/lang/String;)V
- Parameters:
- args - command line argument list
call
void call(String caller,
int tab)
- Prints nested nodes in the call tree.
Recursively called method to print out the next node in the call tree.
A new nesting level is indicated by increased indentation.
- Parameters:
- caller - the name of the calling method
- tab - the numeric value of the nesting level
All Packages Class Hierarchy This Package Previous Next Index