mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
doc: sandbox: Document how to run sandbox with valgrind
This documents how to get more detailed results from valgrind made possible by the last two commits. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
bdaeea1b68
commit
02fc867810
1 changed files with 10 additions and 4 deletions
|
@ -477,14 +477,20 @@ Using valgrind / memcheck
|
|||
|
||||
It is possible to run U-Boot under valgrind to check memory allocations::
|
||||
|
||||
valgrind u-boot
|
||||
valgrind ./u-boot
|
||||
|
||||
For more detailed results, enable `CONFIG_VALGRIND`. There are many false
|
||||
positives due to `malloc` itself. Suppress these with::
|
||||
|
||||
valgrind --suppressions=scripts/u-boot.supp ./u-boot
|
||||
|
||||
If you are running sandbox SPL or TPL, then valgrind will not by default
|
||||
notice when U-Boot jumps from TPL to SPL, or from SPL to U-Boot proper. To
|
||||
fix this, use::
|
||||
|
||||
valgrind --trace-children=yes u-boot
|
||||
fix this, use `--trace-children=yes`. To show who alloc'd some troublesome
|
||||
memory, use `--track-origins=yes`. To uncover possible errors, try running all
|
||||
unit tests with::
|
||||
|
||||
valgrind --track-origins=yes --suppressions=scripts/u-boot.supp ./u-boot -Tc 'ut all'
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
|
Loading…
Add table
Reference in a new issue