![]() |
|
|
|
Step 6 - SamplingConfigure SamplingNow we gather profile data using the sampling mechanism. First, activate the sampler either from the Overview panel or by selecting the menu "Settings / Sampling and instrumentation rules":
The "Sampling and instrumentation rules" dialog appears:
Select the "enabled" checkbox and save the settings. Apply samplingNext, send the sampling and instrumentation rules to the remote VM. Click the toolbar item highlighted below or select the menu "remote VM / apply rules":
Resume Process
Next, resume Example01 by clicking "
Create a snapshotTo create a snapshot select menu item "
The code of method AbstractStringBuilder.append() (called methods excluded!) consumes 44% of the total CPU-time of thread "main". CPU-time consumption for append() and all called methods (i.e. cumulated CPU time) is 72% of total thread CPU time. The respective numbers for elapsed time are 44% and 67%.
Show hotspotsThe hotspot view lists all methods sorted by CPU-time consumption.
Right-click the topmost entry of the tree (named "snapshot ....) and select
"
AbstractStringBuilder.append() consumes the most CPU time, followed by expandCapacity(). |