Java逐行方法/函数分析 - Profiler和/或Eclipse插件 [英] Java line-by-line Method/Function Profiling - Profiler &/or Eclipse Plugin
问题描述
我正在寻找的是一个逐行热点分析器,可以帮助我缩小拍摄时间。过去使用过的非常有趣的工作就是在策略性地放置System.currentTimeMillis()打印,在更极端的情况下使用 Java CPUTime (通过JNI完成)。有几个Profiler,如Intel Parallel Amplifier,可与C& Visual Studio,但是有没有这样的Java?
这两个选项都有点乏味,所以有什么(Eclipse插件或其他),可以逐行热点分析?
JProfiler 具有行号解析。默认情况下不启用,但如果您编辑分析设置,则在方法通话记录选项卡上有一个名为记录行号并在呼叫树中显示的复选框:
免责声明:我公司开发JProfiler。
I have a few larger methods I'm trying to optimize in Java. I have been using jVisualVM to do most of my profiling as it gives method call hot spots and is a great starting point.
What I am looking for is a line-by-line hot spot profiler which can help me narrow down whats taking so long. The ovbious work around which I have used in the past is just strategically placed System.currentTimeMillis() prints and in more extreme cases using Java CPUTime (done via JNI). There are a few profilers like Intel Parallel Amplifier which works with C & Visual Studio, but is there anything like this for Java?
Both of those options are a bit tedious, so is there anything (Eclipse plug-in or otherwise) which can do line-by-line hot spot analysis?
JProfiler has line number resolution. It's not enabled by default, but if you edit the profiling settings, there's a check box named "Record line numbers and show them in the call tree" on the "Method call recording" tab:
Disclaimer: My company develops JProfiler.
这篇关于Java逐行方法/函数分析 - Profiler和/或Eclipse插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!