Difference between sampling and profiling in jVisualVM(jVisualVM中采样和分析的区别)
问题描述
VisualVM 有两个单独的选项卡用于采样和分析.VisualVM 中的采样和分析有什么区别?
VisualVM has two separate tabs for sampling and profiling. What is the difference between sampling and profiling in VisualVM?
推荐答案
Sampling
意味着进行大量线程转储并分析堆栈跟踪.这通常更快,不需要在您的字节码中进行运行时更改(这可能会破坏它),但也不太准确.
Sampling
means taking lots of thread dumps and analyzing stack traces.
This is usually faster, does not require runtime changes in your bytecode (which may break it), but is also less accurate.
Profiling
表示 检测你的类和方法,所以他们报告"每当他们运行.这更准确,因为它计算每次检测方法的调用,而不仅仅是在转储完成时捕获的那些.然而检测意味着你的类的字节码被改变了,这可能会破坏你的程序.实际上,出于这个原因,在大型应用程序服务器(如 JBoss 或 WebLogic)上使用分析通常会导致一切死机或挂起.
Profiling
means instrumenting your classes and methods, so they "report" whenever they are run. This is more accurate, as it counts every invocation of instrumented method, not only those caught when the dump is done. However instrumentation means that the bytecode of your classes is changed, and this may break your program. Actually, for that reason, using profiling on large application servers (like JBoss, or WebLogic) often causes everything to die or hang.
这篇关于jVisualVM中采样和分析的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:jVisualVM中采样和分析的区别
基础教程推荐
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 降序排序:Java Map 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01