Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Valgrind

Joy Arulraj edited this page Nov 28, 2015 · 6 revisions

Valgrind

Valgrind is useful for performing dynamic analysis. Valgrind tools can automatically detect many memory management and threading bugs, and profile Peloton in detail.

Memory Leaks

Here's the command for using memcheck for detecting common memory errors.

valgrind --trace-children=yes --track-origins=yes peloton -D ./data

valgrind --trace-children=yes --track-origins=yes ./test/catalog_test

Profiling

Here's the command for using callgrind for profiling Peloton.

    valgrind --tool=callgrind --trace-children=yes ./src/peloton -D data &> /dev/null &

    pg_ctl -D ./data stop

You can use kcachegrind for viewing the collected profile files (i.e. the callgrind.out.* files).

    kcachegrind
Clone this wiki locally