developers

    Forum Stats

  • 3,873,880 Users
  • 2,266,627 Discussions
  • 7,911,650 Comments

Discussions

Java Mission control sampling count vs. method performance

a585ceb2-a0cc-422a-81e6-29a0a8d0030d
edited Sep 26, 2016 3:40PM in Java Mission Control

I ran Java mission control on my application using flight recorder. There is a column called sampling count shown across the methods that were sampled.

Can you let me know if the sample count is same as time taken for the method to execute?

Thanks

Answers

  • Erik - Hotspot Engineer-Oracle
    edited Sep 26, 2016 3:40PM

    Sampling count refers to the number of times JFR stopped a thread and found that particular frame on the stack.

    The sampling algorithm may differ between JVM versions, so I don't want to go into details how it works, but the contract is that sampling count should reflect a statistical correct picture of the methods being executed by the VM. For instance, a method with a sample count of 20 should on average occur twice as often as one with sample count 10.

    The purpose of the value is to indicate how reliable the data is. A low sample count means it could be coincidence that the sampler found the method.

This discussion has been closed.
developers