Revision 4 as of 2017-01-03 23:47:41

Clear message

Back to developer page.

Profiling

Profiling Running Time

Here is an example of how to run the callgrind tool of valgrind to profile the search component.

To set up, run the translator component:

./fast-downward.py --translate PROBLEM.PDDL

To profile, run the search component manually under valgrind (substitute the appropriate build and search options):

valgrind --tool=callgrind --callgrind-out-file=callgrind.out \
    --dump-instr=yes --collect-jumps=yes \
    ./builds/release64/bin/downward --search "astar(blind())" < output.sas

To browse the profiling results:

# either this:
kcachegrind callgrind.out

# or this:
qcachegrind callgrind.out

Installing QCacheGrind

QCacheGrind is KCacheGrind without the KDE bindings and is part of the same source archive as KCacheGrind. You may want to try it if you would rather not install all the KDE dependencies that KCacheGrind brings in.

To download and build QCacheGrind:

sudo apt-get install qt5-default graphviz
# Download December 2016 release. Alternatively, check
# https://github.com/KDE/kcachegrind/releases for something more recent.
wget https://github.com/KDE/kcachegrind/archive/v16.12.0.tar.gz
tar xvzf v16.12.0.tar.gz
cd kcachegrind-16.12.0
qmake && make -j4

Then copy the executable qcachegrind/qcachegrind to your preferred place, for example:

cp qcachegrind/qcachegrind ~/bin/

All other files can be deleted. Alternatively, for a system-wide install that includes metadata for the desktop:

sudo install -m 755 qcachegrind/qcachegrind /usr/local/bin/
sudo install -m 644 qcachegrind/qcachegrind.desktop \
     /usr/local/share/applications/
sudo install -m 644 kcachegrind/hi32-app-kcachegrind.png \
    /usr/local/share/icons/hicolor/32x32/apps/kcachegrind.png
sudo install -m 644 kcachegrind/hi48-app-kcachegrind.png \
    /usr/local/share/icons/hicolor/48x48/apps/kcachegrind.png