callgrind

What profiler should I use to measure _real_ time (including waiting for syscalls) spend in this function, not _CPU_ one

做~自己de王妃 提交于 2019-12-01 21:22:53
The application does not calculate things, but does i/o, read files, uses network. I want profiler to show it. I expect something like something like in callgrind that calls clock_gettime each proble. Or like oprofile that interrupts my application (while it is sleeping or waiting for socket/file/whatever) to see what is it doing. I want things like "read", "connect", "nanosleep", "send" and especially "fsync" ( And all their callers ) to be bold (not things like string or number functions that perform calculations). Platform: GNU/Linux @ i386 Quickly hacked up trivial sampling profiler for

Kcachegrind/callgrind is inaccurate for dispatcher functions?

故事扮演 提交于 2019-12-01 06:32:14
I have a model code on which kcachegrind/callgrind reports strange results. It is kind of dispatcher function. The dispatcher is called from 4 places; each call says, which actual do_J function to run (so the first2 will call only do_1 and do_2 and so on) Source (this is a model of actual code) #define N 1000000 int a[N]; int do_1(int *a) { int i; for(i=0;i<N/4;i++) a[i]+=1; } int do_2(int *a) { int i; for(i=0;i<N/2;i++) a[i]+=2; } int do_3(int *a) { int i; for(i=0;i<N*3/4;i++) a[i]+=3; } int do_4(int *a) { int i; for(i=0;i<N;i++) a[i]+=4; } int dispatcher(int *a, int j) { if(j==1) do_1(a);

Kcachegrind/callgrind is inaccurate for dispatcher functions?

为君一笑 提交于 2019-12-01 04:53:07
问题 I have a model code on which kcachegrind/callgrind reports strange results. It is kind of dispatcher function. The dispatcher is called from 4 places; each call says, which actual do_J function to run (so the first2 will call only do_1 and do_2 and so on) Source (this is a model of actual code) #define N 1000000 int a[N]; int do_1(int *a) { int i; for(i=0;i<N/4;i++) a[i]+=1; } int do_2(int *a) { int i; for(i=0;i<N/2;i++) a[i]+=2; } int do_3(int *a) { int i; for(i=0;i<N*3/4;i++) a[i]+=3; } int

Make callgrind show all function calls in the kcachegrind callgraph

荒凉一梦 提交于 2019-11-30 22:33:42
I was using valgrind tool - callgrind and kcachegrind for profiling a large project and was wondering if there is a way that callgrind reports the stats from all the functions (not just the most expensive functions). To be specific - When I visualized the callgraph in kcachegrind, it included only those functions that are quite expensive, but I was wondering if there is a way to include all the functions from the project in the callgraph. Command used for generating profiling info is given below : valgrind --dsymutil=yes --tool=callgrind $EXE I am not sure if I have to give any options to

How use callgrind to profiling only a certain period of program execution?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 04:46:52
I want to use valgrind to do some profiling, since it does not need re-build the program. (the program I want to profile is already build with “-g") But valgrind(callgrind) is quite slow ... so here's what I to do: start the server ( I want to profile that server) kind of attach to that server before I do some operation on server, start collect profile data after the operation is done, end collecting profile data analyze the profiling data. I can do this kind of thing using sun studio on Solaris. (using dbx ). I just want to know is it possible to do the same thing using valgrind(callgrind)?

Callgrind: Profile a specific part of my code

柔情痞子 提交于 2019-11-30 03:57:39
I'm trying to profile (with Callgrind) a specific part of my code by removing noise and computation that I don't care about. Here is an example of what I want to do: for (int i=0; i<maxSample; ++i) { //Prepare data to be processed... //Method to be profiled with these data //Post operation on the data } My use-case is a regression test, I want to make sure that the method in question is still fast enough (something like less than 10% extra instructions since the last implementation). This is why I'd like to have the cleaner output form Callgrind. (I need a for loop in order to have a

Callgrind: Profile a specific part of my code

你说的曾经没有我的故事 提交于 2019-11-29 01:05:54
问题 I'm trying to profile (with Callgrind) a specific part of my code by removing noise and computation that I don't care about. Here is an example of what I want to do: for (int i=0; i<maxSample; ++i) { //Prepare data to be processed... //Method to be profiled with these data //Post operation on the data } My use-case is a regression test, I want to make sure that the method in question is still fast enough (something like less than 10% extra instructions since the last implementation). This is

Valgrind reporting a segment overflow

三世轮回 提交于 2019-11-28 10:39:35
When running my program with valgrind / callgrind I get the following message a lot: ==21734== brk segment overflow in thread #1: can't grow to 0x4a39000 (with different addresses) Note that it is not preceded by a stack overflow message. I can't find any documentation on this message and I have no idea what is overflowing exactly. Can anybody help me figure out what the problem is? Is this a problem of valgrind, or of my program? Piwi Line 1327 from the valgrind source code points to the user manual, "see section Limitations in user manual": Limits section item 1: On Linux, Valgrind

Windows Callgrind results browser, alternative to KCacheGrind [closed]

試著忘記壹切 提交于 2019-11-28 03:41:32
Is there any tool, other than KCacheGrind, being able to view callgrind results? Preferably for Windows platform? RandomNickName42 alleyoop and valkyrie are alternative front ends. May have enough suport for what you want, you can use mingw to compile for Windows native if SUA does not work out of the box. I have compiled kcachegrind on windows using QT4.7, here is the binary bundle (including the dot utility to generate call graph): http://sourceforge.net/projects/precompiledbin/files/kcachegrind.zip/download Mario Awad Try WebGrind: https://github.com/jokkedk/webgrind Runs on your local PHP

Windows Callgrind results browser, alternative to KCacheGrind [closed]

情到浓时终转凉″ 提交于 2019-11-27 05:12:49
问题 Is there any tool, other than KCacheGrind, being able to view callgrind results? Preferably for Windows platform? 回答1: alleyoop and valkyrie are alternative front ends. May have enough suport for what you want, you can use mingw to compile for Windows native if SUA does not work out of the box. 回答2: I have compiled kcachegrind on windows using QT4.7, here is the binary bundle (including the dot utility to generate call graph): http://sourceforge.net/projects/precompiledbin/files/kcachegrind