Questions tagged [callgrind]
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.
callgrind
126
questions
1
vote
0
answers
33
views
Why is Callgrind not working on my project?
I tried using callgrind on my program written in C language but it is not working. This is the output it gives me when I try to launch it:
(https://i.sstatic.net/pBeyJRYf.png)
It was working before, ...
-2
votes
1
answer
91
views
Why is my program spending 79.26% of its time in _dl_start?
I'm trying to profile a C++ program with callgrind, and I was certainly not expecting it to spend most of its time opening dynamic libraries.
I don't see any of the functions that I know to take time (...
0
votes
0
answers
71
views
Error Using Valgrind's callgrind and kcachegrind on a C++
I've been trying to analyze a simple C++ program that uses fork() to create a child process. The program compiles and runs fine. But, when I try to use Valgrind's callgrind tool to profile the program,...
0
votes
0
answers
17
views
Filtering callgrind capture based on shared library name
I would like to have a coarse filter for my callgrind output.
If I ask callgrind to capture a run, I want to tell it to prune at a .so level.
For instance, I would like to tell it that it should not ...
0
votes
0
answers
40
views
Callgrind for CUDA program, execution time in percentages do not add up to 100%
I have a CNN image classification C++ program that uses LibTorch(Pytorch)/CUDA to improve the inference performance. I try using Callgrind:
valgrind --tool=callgrind ./my-bin
to profile it and find ...
0
votes
2
answers
80
views
valgrind 'callgrind' instruction fetch differs between runs
I'm currently profiling C++ executable to determine if code change affects performance. For profiling I am using 'valgrind/callgrind'.
I can't find any documentation, why 'Ir' (instructions read) ...
0
votes
1
answer
229
views
-toggle-collect option in valgrind/callgrind not working
When I run callgrind with "--toggle-collect=fun" or "--toggle-collect=main" it does not work.
I tried with adding return type also but nothing worked. "--toggle-collect=void ...
0
votes
0
answers
124
views
How do I profile some code using callgrind_control in c++?
I am trying to see where my code spends time on many instructions (doesn't have to be time, just number of instructions).
I see many recommendations for callgrind, which I did start using, but I don't ...
1
vote
0
answers
44
views
How can I visualize GNU remake profile data for multithreaded processes
I'm trying to profile a large multi-threaded Make-based system.
I recently found GNU remake and was able to use it as a drop-in replacement for gmake.
Since my system is multi-threaded and also has ...
1
vote
2
answers
239
views
Using `callgrind` to count function calls in Linux
I am trying to track function call counts on a program I'm interested in. If I run the program on its own, it will run fine. If I try to run it with valgrind using the command seen below I seem to be ...
0
votes
0
answers
199
views
KCacheGrind/CallGrind - wrong relative timing
I am using valgrind to profile a program. The valgrind measurements shows a wrong relative runtime - it seems from the callgrind log that function1 has a longer runtime than function 2, although when ...
0
votes
1
answer
669
views
Callgrind / kcachegrind why does running a program in valgrind increase sysCall time?
I've been profiling some code which likely spends a lot of it's execution time in system calls. Timing some functions manually and with callgrind, callgrind reports system call times of around 20, 30 ...
0
votes
0
answers
250
views
Callgrind / kcachegrind call graph output implies functions call eachother when they don't
I'm profiling C++ code using callgrind and then visualizing it in kcachegrind.
For example, if my program is:
main() {
function1();
function2();
}
I would expect main() to have two edges, one ...
0
votes
1
answer
442
views
Should I trust profiling inside or outside of callgrind for a function that calls glibc's sin()?
I'm working on an audio library in which the sine of a number needs to be calculated within a very tight loop. Various levels of inaccuracy in the results might be tolerable for the user depending on ...
0
votes
0
answers
118
views
Valgrind ignore templates in output
I'm using valgrind [callgrind] to profile a C++ executable, and KCachegrind to display the results. However, the function names are all but unreadable due to endless template names before the actual ...