mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-09 03:57:42 +00:00
Update cheatsheets
This commit is contained in:
26
valgrind
Normal file
26
valgrind
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# valgrind
|
||||
|
||||
> Wrapper for a set of expert tools for profiling, optimizing and debugging programs.
|
||||
> Commonly used tools include `memcheck`, `cachegrind`, `callgrind`, `massif`, `helgrind`, and `drd`.
|
||||
> More information: <http://www.valgrind.org>.
|
||||
|
||||
- Use the (default) Memcheck tool to show a diagnostic of memory usage by `program`:
|
||||
|
||||
`valgrind {{program}}`
|
||||
|
||||
- Use Memcheck to report all possible memory leaks of `program` in full detail:
|
||||
|
||||
`valgrind --leak-check=full --show-leak-kinds=all {{program}}`
|
||||
|
||||
- Use the Cachegrind tool to profile and log CPU cache operations of `program`:
|
||||
|
||||
`valgrind --tool=cachegrind {{program}}`
|
||||
|
||||
- Use the Massif tool to profile and log heap memory and stack usage of `program`:
|
||||
|
||||
`valgrind --tool=massif --stacks=yes {{program}}`
|
||||
Reference in New Issue
Block a user