Hello guys,
I wonder if anyone knows a powerful
Java Profiler with support for profiling CPU and memory usage at the level of classes and packages that is open source or provides a proper API.
I have looked into JProfiler, YourKit, JVisualVM, JRockit Mission Control, and a bunch of open source ones. Mission Control and the open source one do not provide enough level of granularity for monitoring, JVisualVM doesn't provide an API to programmatically use it, and JProfiler and YourKit whcih do all I need, are properitary and do not expose APIs (I guess YourKit might have an API, I am playing with it just now, but still it is proprietary).
I wonder if you guys could give me some clue on a Profiler that you might have experience with. Since I would like to use the profiler within the context of OSGi which uses different class loaders for different modules, it occurs with most of the profilers that they get confused because of this multiplicity of class loaders and fail to recognize the proper packages. JProfiler and VisualVM are able to track the objects within the packages and classes of standalone modules, but some like JIP are not able to do so.
Hope I am clear with what I have explained. I highly appreciate any response.
cheers,
-Nemo
EDIT: I finished playing around with YourKit as well. It seems like it does have an API, but the filtering that it does on running threads only happens at the level of thread names. JVisualVM allows thread executions to be filtered based on methods, classes, and packages used in a thread which is a lot more fine-grained. Does anybody know any tool or API that would give me that level of freedom?