profiling

How to find memory leaks using visualvm

我怕爱的太早我们不能终老 提交于 2019-12-17 07:13:26
问题 I suspect we have a major memory leak in our ActiveMQ connection bridge - we're seeing typical memory leak patterns (app loads fine, slows down if it runs for prolonged periods of time or is restarted over and over again over short periods of time). I looked up modern best practices for finding Java memory leaks and a lot of developers seem to be abandoning traditional tools like jhat/jmap in lieu of the new(er) jvisualvm . Upon launching this tool (and spending a few hours reading over its

Profiling the C++ compilation process

空扰寡人 提交于 2019-12-17 07:01:50
问题 I tend to write rather large templated header-only C++ libraries and my users commonly complain about compilation times. After thinking about the matter, it occurred to me that I have no idea where the time is going . Is there some simple way to profile the C++ compilation process with common compilers, such as g++, icc, and xlC? For instance, is it possible to get an idea of how much time is spent within each of the phases of C++ compilation? 回答1: For GCC there are debugging options to find

Is there a simple way of obtaining all object instances of a specific class in Java

北城以北 提交于 2019-12-17 06:48:31
问题 Currently I am working on a Java agent to assemble memory stats. With the help of the instrumentation API I can get a hold of the classes (and manipulate them). With plain Java I can get an estimate of the resources used for each object. So far, so good. The question I am faced with right now is "how to get a hold of every Object instance of a specific class". I can do byte code manipulation in order to get a hold of the object instance, but I was hoping there is another API I am not aware of

How can you get the call tree with Python profilers?

前提是你 提交于 2019-12-17 06:26:31
问题 I used to use a nice Apple profiler that is built into the System Monitor application. As long as your C++ code was compiled with debug information, you could sample your running application and it would print out an indented tree telling you what percent of the parent function's time was spent in this function (and the body vs. other function calls). For instance, if main called function_1 and function_2 , function_2 calls function_3 , and then main calls function_3 : main (100%, 1% in

What tools do you recommend to profile Rails apps? [closed]

狂风中的少年 提交于 2019-12-17 06:25:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I've been looking for profiling tools for Rails for a while. I'm currently playing and testing ruby-prof and railsbench, but I kinda frustrated with the amount of tweaking and mangling required to make then work. Althought I don't mind (much) the tweaking, I'd like to know if is there any other, more straight

linux perf: how to interpret and find hotspots

最后都变了- 提交于 2019-12-17 06:24:16
问题 I tried out linux' perf utility today and am having trouble in interpreting its results. I'm used to valgrind's callgrind which is of course a totally different approach to the sampling based method of perf. What I did: perf record -g -p $(pidof someapp) perf report -g -n Now I see something like this: + 16.92% kdevelop libsqlite3.so.0.8.6 [.] 0x3fe57 ↑ + 10.61% kdevelop libQtGui.so.4.7.3 [.] 0x81e344 ▮ + 7.09% kdevelop libc-2.14.so [.] 0x85804 ▒ + 4.96% kdevelop libQtGui.so.4.7.3 [.]

Is the UNIX `time` command accurate enough for benchmarks? [closed]

梦想的初衷 提交于 2019-12-17 05:41:25
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 9 months ago . Let's say I wanted to benchmark two programs: foo.py and bar.py. Are a couple thousand runs and the respective averages of time python foo.py and time python bar.py adequate enough for profiling and comparing their speed? Edit: Additionally, if the execution of each program

Is the UNIX `time` command accurate enough for benchmarks? [closed]

两盒软妹~` 提交于 2019-12-17 05:40:40
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 9 months ago . Let's say I wanted to benchmark two programs: foo.py and bar.py. Are a couple thousand runs and the respective averages of time python foo.py and time python bar.py adequate enough for profiling and comparing their speed? Edit: Additionally, if the execution of each program

Is the UNIX `time` command accurate enough for benchmarks? [closed]

倖福魔咒の 提交于 2019-12-17 05:40:09
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 9 months ago . Let's say I wanted to benchmark two programs: foo.py and bar.py. Are a couple thousand runs and the respective averages of time python foo.py and time python bar.py adequate enough for profiling and comparing their speed? Edit: Additionally, if the execution of each program

Unknown events in nodejs/v8 flamegraph using perf_events

拜拜、爱过 提交于 2019-12-17 04:02:17
问题 I try to do some nodejs profiling using Linux perf_events as described by Brendan Gregg here. Workflow is following: run node >0.11.13 with --perf-basic-prof , which creates /tmp/perf-(PID).map file where JavaScript symbol mapping are written. Capture stacks using perf record -F 99 -p `pgrep -n node` -g -- sleep 30 Fold stacks using stackcollapse-perf.pl script from this repository Generate svg flame graph using flamegraph.pl script I get following result (which look really nice at the