VisualVM 分析正在污染结果 [英] VisualVM profiling is polluting results
问题描述
我正在使用 VisualVM 内存分析来分析应用程序的内存分配行为.不幸的是,分析过程本身似乎污染了我的结果.
I am using VisualVM memory profiling to analyse the memory allocation behavior of an application. Unfortunately, it seems the profiling process itself is polluting my results.
我不断看到在 5 分钟的时间范围内分配了 80Mb,这是由于内存分析结果通过 JMXBean RMI 连接进行序列化.这个内存总是在第 1 代,当我要求它时会立即被 GC,但它出现仍然很烦人.
I continually see 80Mb being allocated over the timeframe of 5 minutes, which is due to memory profiling results being serialised over the JMXBean RMI connection. This memory is always in generation 1 and is immediately GC'd when I ask for it, but it is still annoying that this is showing up.
我可以根据进行分配的类来过滤内存分析结果吗?
Can I filter memory profiling results based on the class that did the allocation?
推荐答案
尝试 JProfiler,它不使用堆资源.你可以在这里看到:
Try JProfiler, it does not use heap resources. You can see here:
在分析一个空的应用程序时,visualvm 甚至分配了很多东西.
that visualvm even allocates lots of stuff when profiling an empty application.
这篇关于VisualVM 分析正在污染结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!