- All Implemented Interfaces:
- StackCollector
public final class FastStackCollector
extends AbstractStackCollector
This is a high performance sampling collector.
The goal is for the sampling overhead to be minimal.
This is better than the SimpleStackCollector in 2 ways:
1) No HashMap is created during sampling. Resulting in less garbage generated by sampling.
2) Stack trace for the sampling Thread is not created at all, saving some time and creating less garbage.
in java 1.7 the reflective invocations can probably be further optimized using:
http://docs.oracle.com/javase/7/docs/api/java/lang/invoke/MethodHandle.html
http://stackoverflow.com/questions/14146570/
calling-a-getter-in-java-though-reflection-whats-the-fastest-way-to-repeatedly
- Author:
- zoly