Valgrind » History » Revision 2
Revision 1 (icy, 2008-10-11 17:45) → Revision 2/4 (icy, 2009-06-09 14:22)
h1. Valgrind "Valgrind":http://valgrind.org is a versatile tool and highly recommended for anyone debugging applications under Linux. You can use it to find bugs or hunt down performance bottlenecks. h2. Finding Memleaks / Bugs h3. Memcheck Docs: http://valgrind.org/docs/manual/mc-manual.html It is sometimes a little bit hard to find mem-leaks in glib based applications, so just use this: <pre> G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full --show-reachable=yes --leak-resolution=high <yourapplication> </pre> h2. Finding Bottlenecks Use KCachegrind to visualize the outputs of Callgrind and Cachegrind. h3. Callgrind Docs: http://valgrind.org/docs/manual/cl-manual.html <pre> valgrind --tool=callgrind <yourapplication> </pre> h3. Cachegrind Docs: http://valgrind.org/docs/manual/cg-manual.html <pre> valgrind --tool=cachegrind <yourapplication> </pre>