98 questions
2
votes
1
answer
78
views
Find out why program is slow processing files from network share using Valgrind
I have an open source C/C++ program on Linux amd64 that processes a PDF input file and that I did not write by myself. So I'm not familiar with its code.
Processing a PDF file read from local disk ...
0
votes
1
answer
145
views
KCachegrind Cannot Display Control Flow Graph Despite dot Installed and Working on WSL2
I'm having trouble visualizing the control flow graph in KCachegrind when analyzing my callgrind output. Although I have both dot (GraphViz) and objdump installed and working, KCachegrind fails to ...
1
vote
0
answers
161
views
kcachegrind can't connect to display
For a school project I have to use Valgrind and other tools to help optimise a program. I'm on macOS 14.0 and using a Lima VM to run the profiling tools, but this is my first time using an environment ...
1
vote
1
answer
646
views
PHP profiling in VS Code is not showing call times
I'm using VS Code and particularly the "PHP" extension to open cachegrind files that I have xdebug generating. When I open the file in Qcachegrind, it shows everything correctly including ...
1
vote
0
answers
74
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 ...
0
votes
0
answers
187
views
KCachegrind output
I don't understand why my Kcachegrind's output is in this form
I'm compiling with
$valgrind --tool=callgrind --callgrind-out-file=outputfile ./main.c
$kcachegrind outputfile
Can someone help me with ...
0
votes
0
answers
228
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
852
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
314
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 ...
1
vote
1
answer
478
views
Boost graph: speeding up add_edge
I have a boost graph application where I need to call the function add_edge( ) [documentation available here].
Profiling this application with KCachegrind reveals the following breakup of time spent:
...
0
votes
0
answers
134
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 ...
0
votes
0
answers
123
views
Simple constant getter is creating a cache miss? (C++)
I am currently benchmarking a program on a Linux system with Valgrind.
I have this strange cache miss with the getter method const int GetID() const,
but I can't really explain where it came from. ...
8
votes
1
answer
1k
views
Python profiling: KCacheGrind + Yappi keeps displaying an unknown function
I want to profile my Python program to understand why it is so slow. I decided to use Yappi - because my program is multithreaded - and to diplay the results with KCacheGrind. Here is how I do it:
# ...
0
votes
1
answer
106
views
Cachegring file very small
I am new to profiling. I am trying to profile my PHP with xdebug.
The cachegrind file is created but has no significant content
I have set xdebug.profiler_enable_trigger = 1
xdebug....
2
votes
1
answer
852
views
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, ...
0
votes
1
answer
719
views
how to install kcachegrind on linux or cirrus?
I am working on a cirrus machine, having my C code profiled. I have Valgrind installed on it. But the output I get from --tool=callgrind is barely understandable, hence I want to use kcachegrind tool. ...
1
vote
1
answer
2k
views
read debug symbols when source file was relocated
When using kcachegrind or just objdump -C -l -d somelib.so I noticed that some debug information in my shared libraries is not up to date, due to the copy process from the local file system of the ...
3
votes
2
answers
659
views
KCachegrind output for optimized vs unoptimized builds
I run valgrind --tool=callgrind ./executable on the executable file generated by the following code:
#include <cstdlib>
#include <stdio.h>
using namespace std;
class XYZ{
public:
int ...
5
votes
1
answer
2k
views
What is the meaning of <cycle 5> function in the output of cProfile analyzed using KchacheGrind?
I want to analyze the performance of the python code, I have used cProfile module for that and generated the .cprof file as mentioned in the python documentation. I am using pyprof2calltree python ...
4
votes
1
answer
5k
views
Xdebug profiler output file
X debug is returning output as parts instead of just one file.
I am using ubuntu 16 and don't know why suddenly the output is in several files.
The problem that i have is that i cannot open this ...
5
votes
2
answers
5k
views
Callgrind performance analysis with cycle detection
I'm trying to use Callgrind/Kcachegrind for the first time to profile my C++ application and what I noticed is that the two functions that take more time are:
< cycle 1 > (50% self) and
do_lookup_x ...
2
votes
1
answer
2k
views
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 ...
6
votes
1
answer
5k
views
kcachegrind unable to open callgrind file
I'm using callgrind to profile a small piece of code. Callgrind output files are well generated, their content looks ok, but I'm unable to open them with kcachegrind: I get the following error message:...
13
votes
4
answers
4k
views
Kcachegrind. Show only functions from my code
I want to profile my code. So I do:
valgrind --tool=callgrind my_program [programm arguments]
kcachegrind callgrind.out.x
Now I have kcachegrind window like this:
There is a lot of core and library ...
0
votes
1
answer
45
views
What is closure in KCacheGrind?
what is the meaning of closure in KCacheGrind? I have it with one of my functions and it is pointing out the spl_autoload_register() function, spl_autoload_call in KCacheGrind. And the self time of ...
0
votes
0
answers
757
views
QCachegrind is not displaying any data for php profiling, Configuration issue may be
I have installed the xdebug , and qCachegrind, which is the windows ver of KCachegrind.. but could not see any profiling data on this interface.
May be i am unable to configure it correctly.
Let me ...
1
vote
1
answer
589
views
qcachegrind "flat profile" dock panel disappeared. how to restore?
I installed qcachegrind on OS X via brew. No problems. I generated a few *.callgrind files and viewed them with qcachegrind. Again, no problem. While viewing one file I accidentally closed the "flat ...
7
votes
2
answers
2k
views
Kcachegrind cycle estimation
After going to their github page and seeing some pdf manual form their kde docs site, I am still confused. Suppose there are these two lines in a test code:
double a1 {asinh(1 / ep)}; ...
3
votes
0
answers
377
views
C++ profiling reveals vector hotspot. How to optimize?
I am profiling some signal processing code using callgrind / qcachegrind involving many operations on std::vector<float>.
I'm getting quite a serious hotspot from the Mac OS builtin nearbyint ...
5
votes
1
answer
746
views
How do I get back to the beginning in kcachegrind?
Sometimes I run kcachegrind, click around awhile, hit the little 'x' that closes the left panel (oops! no idea how to get it back), click around some more, get totally lost, then exit kcachegrind.
...
8
votes
3
answers
14k
views
Make callgrind show all function calls in the kcachegrind callgraph
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 ...
6
votes
2
answers
3k
views
How to use KCachegrind and Callgrind to measure only parts of my code?
I want to use valgrind to analyze my code. The problem is, that I have a huge startup sequence which I'm not interested in.
I found defines in the valgrind/callgrind.h that should help me:
...
7
votes
2
answers
2k
views
What default extension of KCachegrind
I installed KCachegrind on Ubuntu 14.10
When i click open button, i see Open dialog with default filter of file "Callgrind Profile Data" and not see my file. I must select "All files" in filter and ...
9
votes
1
answer
610
views
How to source annotate python when using qcachegrind to process profilestats output
Kcachegrind serves as a wonderful utility to visually represent the hotspot to the source line level when profiling code. I found it pretty useful when micro optimizing my C++ code base.
For my ...
10
votes
1
answer
8k
views
How to interpret Kcachegrind graphs?
I have started using Kcachegrind for performance analysis. But I don't understand the GUI and the output graphs.
For example for this call graph
SignatureIterator::iterate_parameters() I don't ...
0
votes
1
answer
91
views
Is it possible to use the MVC path in XDebugs profiler outout filename?
I am using XDebug to profile a large MVC application and it would be much easier to profile individual requests by their URI rather than filename (.php) as several requests are made via internal ...
3
votes
1
answer
2k
views
kcachegrind: How to draw the full call graph?
I like kcachegrind's call graph. But I have been unable to make it graph the full call graph.
I would imagine I just had to set:
Graph > Caller Depth > Unlimited
Graph > Callee Depth > Unlimited
...
1
vote
0
answers
298
views
First RSpec test incredibly slow after migration to new machine
My RSpec examples were running respectably until I migrated to a new Mac. Now, it seems the 1st test will take 1-3 minutes. The next time the tests are run (in a different order) that same test might ...
3
votes
1
answer
2k
views
C++ profiling: clock cycle count
I'm using valgrind --tool=callgrind to profile a critical part of my C++ program.
The part itself takes less that a microsecond to execute so I'm profiling over a large number of loops over that part....
0
votes
0
answers
456
views
Pinpointing performance optimizations between gcc-4.1.2 and gcc-4.8.1
Context:
I am currently investigating the performance increase between my team's current build environment, which still uses gcc-4.1.2, and a build using gcc-4.8.1. The results were astounding, with ...
1
vote
0
answers
560
views
Cachegrind not showing function-level results?
I am profiling my C++ application with Valgrind's Cachegrind, using this terminal line:
valgrind --branch-sim=yes --tool=cachegrind ./myProgram
and from the online guides I have seen this should ...
1
vote
0
answers
91
views
Meaning of the grey dot in KCacheGrind
Doing some profiling I found KCacheGrind visualizing an arrow to a little grey dot. What does it mean?
0
votes
1
answer
1k
views
Understanding Kcachegrind callgraph number output
Hi I am new to using this tool and I don't have much documentation on it other that what I was able to google a bit. I have a compiled c++ program that I am running callgrind on and I see the call ...
29
votes
1
answer
16k
views
How to interpret results from kcachegrind
Could anyone tell me how to interest the results from kcachegrind.
I had two versions of my code (v1, v2) both compiled in debug mode. I ran them through valgrind with options:
valgrind --tool=...
9
votes
1
answer
7k
views
KCachegrind: command not found
I installed valgrind on Centos using this command:
yum install valgrind kcachegrind graphviz
I then used the callgrind tool for my c++ program. It generated its callgrind.out.42424 file.
Now, I want ...
6
votes
1
answer
5k
views
kcachegrind: there is no source available for the following function
I am trying to view the annotated source using $ valgrind --tool=callgrind ./myProgram followed by $ kcachegrind using Ubuntu 12.04 (and I'm having the same problem with $ qcachegrind using Mac OSX).
...
0
votes
1
answer
187
views
call graph for MySQL sessions
I am trying to create a valgrind (cachegrind) analysis of MySQL client connections.
I am running valgrind with --trace-children=yes.
What I want to find is one of the internal method calls, to see ...
3
votes
2
answers
2k
views
How do you output call tree profiling for KCacheGrind with ruby-prof for a Rails app?
According to the documentation, you can profile Rails apps
http://ruby-prof.rubyforge.org/
I added this to my config.ru
if Rails.env.development?
use Rack::RubyProf, :path => 'tmp/profile'
end
...
1
vote
1
answer
896
views
How do I open python profile data with kCacheGrind?
I am having trouble examining profile data with qcachegrind on mac.I am using django-extensions to generate the profile data. I am able to open a normal profile log using cProfile in the code with ...
0
votes
1
answer
104
views
Using KCachegring with JRuby profiler
Is it possible to convert JRuby profiler graph output to valgrind format (or any other way to visualise profiling output in KCachegrind)?