Thread sampling

Thread sampling is a hotspot detection method that works by periodically examining where in a program the executing threads spend their time. Typically, threads are stopped and their instruction pointers are cross-referenced against a table of known methods/regions. Enough samples in a given method means that the method is hot and should be optimized. Thread sampling can, if the number of samples is large enough, also be used on a more fine-grained level, determining which code paths or regions inside a method are hotter than others.

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.