profiling

Is there a way to find performance of individual functions in a process using perf tool?

安稳与你 提交于 2021-02-18 22:25:50
问题 I am trying to get performance of individual functions within a process. How can I do it using perf tool? Is there any other tool for this? For example, let's say, main function calls functions A , B , C . I want to get performance of main function as well as functions A,B,C individually . Is there a good document for understating perf source code? Thank you. 回答1: What you want to do is user-land probing. Perf can only do part of it. Try sudo perf top -p [pid] and then watch the scoreboard.

VisualVM launcher error

五迷三道 提交于 2021-02-18 10:16:23
问题 I'm trying to use the Eclipse VisualVM launcher. It seems pretty nice, except that it seems to spawn an instance if VisualVM too late to do any profiling of my application. My application finishes execution before the profiler is even initialized; once it starts up, an error window pops up, saying: cannot open requested application . It then shows VM running Eclipse (labeled "org.eclipse.equinox.launcher.Main"). How can I get it to wait for my application and do proper profiling? 回答1: I know

VisualVM launcher error

孤者浪人 提交于 2021-02-18 10:14:31
问题 I'm trying to use the Eclipse VisualVM launcher. It seems pretty nice, except that it seems to spawn an instance if VisualVM too late to do any profiling of my application. My application finishes execution before the profiler is even initialized; once it starts up, an error window pops up, saying: cannot open requested application . It then shows VM running Eclipse (labeled "org.eclipse.equinox.launcher.Main"). How can I get it to wait for my application and do proper profiling? 回答1: I know

VisualVM launcher error

巧了我就是萌 提交于 2021-02-18 10:14:03
问题 I'm trying to use the Eclipse VisualVM launcher. It seems pretty nice, except that it seems to spawn an instance if VisualVM too late to do any profiling of my application. My application finishes execution before the profiler is even initialized; once it starts up, an error window pops up, saying: cannot open requested application . It then shows VM running Eclipse (labeled "org.eclipse.equinox.launcher.Main"). How can I get it to wait for my application and do proper profiling? 回答1: I know

How to interpret Chromium & Firefox performance profiling results of same JavaScript code snippet

蹲街弑〆低调 提交于 2021-02-11 14:03:57
问题 While being a web developer for over 3 years, I now realize that I know nothing about browsers and that they can differ in many aspects from each other as day & night. As an illustration to this,- I've tried to construct somewhat a "fair-test" for profiling a JavaScript parity check code, which version of it runs faster, this x => (x%2)==0 or that x => (x&1)==0 . I suspect that checking only right-most bit, should be faster way, but in a browser world ... you may never know. Here's a complete

Profiling instructions

独自空忆成欢 提交于 2021-02-08 06:26:13
问题 I want to count several cpu instructions in my code. e.g. I would like to know how many additions, how many multiplications, how many float operations, how many branches my code executes. I currently use gprof under Linux for profiling my c++ code but it only gives the number of calls to my functions, and I manually estimate the number of instructions. Are there any tools that might do the trick for me? Maybe some virtual machine? 回答1: You may be able to use Valgrind's Callgrind with the -

Multithreading - How to use CPU as much as possible?

霸气de小男生 提交于 2021-02-07 11:08:46
问题 I'm currently implementing Tensorflow custom op(for custom data fetcher) using C++ in order to speed up my Tensorflow model. Since my Tensorflow model doesn't use GPU a lot, I believe I can achieve maximal performance using multiple worker threads concurrently. The problem is, even though I have enough workers, my program doesn't utilize all CPU. In my development machine, (4 physical core) it uses about 90% of user time, 4% of sys time with 4 worker threads and tf.ConfigProto(inter_op

Multithreading - How to use CPU as much as possible?

旧街凉风 提交于 2021-02-07 11:07:04
问题 I'm currently implementing Tensorflow custom op(for custom data fetcher) using C++ in order to speed up my Tensorflow model. Since my Tensorflow model doesn't use GPU a lot, I believe I can achieve maximal performance using multiple worker threads concurrently. The problem is, even though I have enough workers, my program doesn't utilize all CPU. In my development machine, (4 physical core) it uses about 90% of user time, 4% of sys time with 4 worker threads and tf.ConfigProto(inter_op

Celery tasks profiling

我只是一个虾纸丫 提交于 2021-02-07 06:26:25
问题 As I can see in top utility celery procecess consume a lot of CPU time. So I want to profile it. I can do it manually on developer machine like so: python -m cProfile -o test-`date +%Y-%m-%d-%T`.prof ./manage.py celeryd -B But to have accurate timings I need to profile it on production machine. On that machine (Fedora 14) celery is launched by init scripts. E.g. service celeryd start I have figured out these scripts eventually call manage.py celeryd_multi eventually. So my question is how can