Skip to content
Michał Nowicki edited this page Mar 16, 2018 · 3 revisions

Prerequisites

To install necessary applications on Ubuntu 14.04 run command:

sudo apt-get install valgrind kcachegrind

Compiling PUTSLAM

To add debugging information to a compiled code, modify CMAKE_CXX_FLAGS in CMakeLists.txt file and add -g option. After the modification, the appropriate line should look like this:

...
SET(CMAKE_CXX_FLAGS "-std=c++11 -pthread -g")
...

Compile the PUTSLAM with a command executed in the main directory:

./build.sh

Running the profiler

To run the application and gather a profiling information, go to build/bin directory and execute:

valgrind --tool=callgrind ./demoMatching

The program will run slowly and, at the end, the file callgrind.out.PID will be created (where PID is the PID of the process that was executed). The file contains informations about the application's run.

To visualize results run (substitute PID with a correct number):

kcachegrind callgrind.out.PID

Clone this wiki locally