jVisualVM中采样和分析的区别

Difference between sampling and profiling in jVisualVM(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中采样和分析的区别

基础教程推荐