![]() |
|
|
|
Step 7 - Byte Code InstrumentationThis section demonstrates how to gather detailed profile information using BCI. Define classes to instrumentStart ProfilerJ-Viewer and select
"Settings /
Be sure that checkbox "Enabled" is selected. Apply instrumentationStart Example01.bat now and press
Create a snapshotTo create a snapshot select menu item "
The method runLoop(int) (called methods excluded!) consumes 15 seconds. The overhead (see table below tree view) is 0 ms. This means that the CPU-time consumed by the ProfilerJ-agent itself is negligible. On the other hand, the cumulated values show a different picture. The overhead here is 7.9 seconds or 66% of the measured 23.8 seconds. In reality (i.e. without byte code instrumentation), the method with all its called methods would have consumed (23.8 - 7.9) seconds. Show hotspotsThe hotspot view lists all methods sorted by CPU-time consumption.
Right-click the topmost entry of the tree (named "snapshot ....) and select
"
|