Language Java Tutorial

You can use this information to determine which parts of a program to optimize.
java -prof TestDrive