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 to open this file on KCacheGrind using this command:
kcachegrind ./callgrind.out.42424
but terminal says
bash kcachegrind : command not found
I don't know why I am getting this error whereas I installed it. Do I need to be in specific directory to run this command?
You can launch KCacheGrind using command line or in the program menu if your system installed it here. Then, you have to open your profile file. The first view present a list of all the profiled functions. You can see the inclusive and the self cost of each function and the location of each one.
Compilation and Installation If you don't specify a prefix to "configure", KCachegrind will be installed into /usr/local/kde. If you don't have root permission, choose e.g. $HOME/kde as prefix.
KDE libraries (kdelibs) from KDE 3.0.x or KDE 3.1.x or KDE 3.2.x (with development package) KCachegrind will call some command line tools in the background. These are a runtime requirement, i.e. KCachegrind will warn you at runtime if they are not found. Follwoing packages should be installed: binutils.
KCachegrind will call some command line tools in the background. These are a runtime requirement, i.e. KCachegrind will warn you at runtime if they are not found.
By starting kcachegrind and selecting only the 2nd output file, you see exactly the cost of a reload action. You can already browse a profile data file while the Callgrind profiling is running in the background. When a new profile data file is dumped, choose "File/Reload" to load the new generated data.
So it should be enough to run "kcachegrind". When you have profile data files from more runs in one directory, they can still distinguished by the pid. To load the files for the run with process ID pid, start "kcachegrind cachegrind.out.pid". This time, you want to only dump profile data when choosing View/Reload in the Konqueror Menu. Do
sudo yum install kdesdk valgrind graphviz
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With