Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7072

Set callgrind as default tool of valgrind

$
0
0

I need to profile a program with callgrind which is started by some script, I don't have control over. I can tell the script to start valgrind, but I cant tell the script which tools or parameters to use.

I found in the valgrind manual (section 2.7.7, "Setting Default Options"), that it is possible to use a variable $VALGRIND_OPTS, or a .valgrindrc file.This works for tool specific options. For instance, I can write in the ~/.valgrindrc

--callgrind:callgrind-out-file=<somefile>

And when I execute some test program a.out

valgrind --tool=callgrind a.out

the output file is written as defined in .valgrindrc.But I can't specify the tool (callgrind) I want to use.

I have tried:

--tool=callgrind

and

--valgrind:tool=callgrind

Both have no effect and memcheck is started as default.Any hints would be appreciated!


Viewing all articles
Browse latest Browse all 7072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>