Profile.java | Class | The Profiler is the class that actually profiles the code.
Code to be profiled is instrumented, when the byte code is loaded,
to make calls to this class:
- At the beginning of each method (calls
Profiler.start())
- At the end of each method (that is, when return is called, which
might not actaully be at the end of the method)
(calls
Profiler.end())
- When an exception is thrown (also calls
Profiler.end())
- Each time a constructor is called (optional)
Note: Instrumenting code can interfer with line numbers that are added to
the code for debugging. |