Callgrind is a profiling tool that records call history among functions in a program's run as a call-graph. By default, the collected data consists of the number of instructions executed, their relationship to source lines, the caller/callee relationship between functions, and the numbers of such calls. Optionally, cache simulation and/or branch prediction (similar to Cachegrind) can produce further information about the runtime behavior of an application.
Questions tagged [callgrind]
121 questions
3
votes
1 answer
Callgrind Profile Format inclusive/self cost
I'm trying to understand the Callgrind Profile Format. I found the online description
I thought I understood it fairly well until I encountered the 'Extended Example':
events: Instructions
fl=file1.c
fn=main
16 20
cfn=func1
calls=1 50
16 400…

Arnout Engelen
- 6,709
- 1
- 25
- 36
2
votes
1 answer
Does Valgrind callgrind uses total time or "execution time" to create data
I have a problem where my application scales linearly with the number of threads(think 800 threads gives doubly the performance of 400 threads on dual core CPU). And my gut feeling is telling me that threads are sleeping or are being blocked... but…

NoSenseEtAl
- 28,205
- 28
- 128
- 277
2
votes
2 answers
About callgrind output
I am using
http://valgrind.org/docs/manual/cl-manual.html
to profile my application.
But I have a question about it's o/p does it shows
time consumed inside that function
OR
cpU consumed inside that function call
What I guess is
Currently…

Vivek Goel
- 22,942
- 29
- 114
- 186
2
votes
1 answer
valgrind reports malloc assertion failure, memcheck doesn't report any errors
Callgrind reported an assertion violation in malloc although memcheck and a usual run reveals no errors:
stp: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct…

Ayrat
- 1,221
- 1
- 18
- 36
2
votes
1 answer
How do I let Callgrind access my Qt project's source code?
I built a Qt project in Debug mode with Qt Creator, ran Callgrind to generate profiling data and tried loading it into Cachegrind. I noticed that I only see profiling information for Qt classes, so I figured I must have forgotten to turn on a…

Pieter
- 31,619
- 76
- 167
- 242
2
votes
0 answers
Run callgrind only on specified libraries
I'm running callgrind on an executable in an attempt to see what functions are being called and from where in my application. I'm converting the output of callgrind into a dot file using gprof2dot so that I can view the call graph.
The issue is that…

nbubis
- 2,304
- 5
- 31
- 46
2
votes
3 answers
attaching callgrind/valgrind to program in mid-way of its execution
I use Valgrind to detect issues by running a program from the beginning.
Now I have memory/performance issues in a very specific moment in the program. Unfortunately there is no feasible way to make a shortcut to this place from the start.
Is there…

libxelar.so
- 473
- 4
- 16
2
votes
1 answer
How to use callgrind on Centos Linux 5.5
I am trying to use the callgrind profiler to profile my C++ program. I am using Valgrind version 3.6,1 on Linux Centos Version 5.5 on a Intel 32-bit processor. I keep getting the following error(shown below) when I try to profile my program.
…

Frank
- 1,406
- 2
- 16
- 42
2
votes
1 answer
Callgrind: how to pass relative path to source code?
I'm using valgrind's callgrind to profile a program and then kcachegrind to view the profile data. I've copied callgrind's output file to a different machine and have a copy of the source code there, but apparently the path information of the source…

Leroy
- 544
- 3
- 14
2
votes
1 answer
interpreting _dl_runtime_resolve_xsave'2 in callgrind output
Looking at the output of callgrind for my program run, I see that 125% !!! of the cycles are spent in _dl_runtime_resolve_xsave'2 (apparently part of the dynamic linker) while 100% is spent in main. But it also says that almost all the time spent…

Bernard GODARD
- 89
- 1
- 7
2
votes
1 answer
Minimum callgrind command for callgraph generation and profiling
I want to use callgrind to profile my program, but it is slowed down too much. What I want to do is generate a callgraph using kcachegrind where every node shows how much percentage the program spent in which function. Can you tell me which features…

Desperado17
- 835
- 6
- 12
2
votes
1 answer
valgrind doesnt work on my 32bit executable in linux ubuntu 16.04
I'm trying to run the valgrind tool on my 32bit executable(sample), I built under the linux Ubuntu host 16.04(64bit), but it failed to run, error: wrong ELF.
sample application is built to run in arm32, cross-compiled in my host linux machine.
This…

danglingpointer
- 4,708
- 3
- 24
- 42
2
votes
1 answer
c++ - profiling to get an overview of the called functions
I want to profile my program not for performance reason but to see the logic of the program.
If function A calls B then C and D it would be something like:
A -> B
-> C -> E
-> F
-> D
Presently I use valgrind/callgrind. It is very…

user3092216
- 63
- 3
2
votes
2 answers
callgrind : how to check whether a line executed or not
Is it possible to use callgrind to produce the output like one given by gcov/lcov ?
I'm reading their docs unable to find the exact option for callgrind_annotate

webminal.org
- 44,948
- 37
- 94
- 125
2
votes
1 answer
Callgrind output does not include function calls
I have a simple .c program that makes a call to a function delcared and implemented in the same file.
I compile it using gcc:
gcc myProgram.c -o myProgram -g
Then I use valgrind with callgrind to generate the callgrind.out.* file.
valgrind…

user847988
- 984
- 1
- 16
- 30