Actions
Valgrind » History » Revision 2
« Previous |
Revision 2/4
(diff)
| Next »
icy, 2009-06-09 14:22
Valgrind¶
Valgrind 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.
Finding Memleaks / Bugs¶
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:
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full --show-reachable=yes --leak-resolution=high <yourapplication>
Finding Bottlenecks¶
Use KCachegrind to visualize the outputs of Callgrind and Cachegrind.
Callgrind¶
Docs: http://valgrind.org/docs/manual/cl-manual.html
valgrind --tool=callgrind <yourapplication>
Cachegrind¶
Docs: http://valgrind.org/docs/manual/cg-manual.html
valgrind --tool=cachegrind <yourapplication>
Updated by icy over 15 years ago · 2 revisions