From d513fcfe77f378f8f87579c234b17a482c3a5aaa Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sun, 20 Nov 2016 11:41:25 +0000 Subject: [PATCH] xtree: some documentation and --help-debug fine tuning git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16146 --- NEWS | 43 ++++++++++++++-------------------- coregrind/m_main.c | 1 + helgrind/docs/hg-manual.xml | 5 ++++ massif/docs/ms-manual.xml | 5 ++++ memcheck/docs/mc-manual.xml | 13 +++++++++- none/tests/cmdline2.stdout.exp | 1 + 6 files changed, 41 insertions(+), 27 deletions(-) diff --git a/NEWS b/NEWS index 188721203b..e1bcf64b14 100644 --- a/NEWS +++ b/NEWS @@ -12,19 +12,19 @@ MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/MacOSX 10.10 and AMD64/MacOSX 10.10. There is also preliminary support for X86/MacOSX 10.11/12, AMD64/MacOSX 10.11/12 and TILEGX/Linux. -A significant change in 3.13 is the addition of the 'xtree' concept: -An xtree is a tree of stacktraces with data associated to the stacktraces. -This xtree is used by various tools (memcheck, helgrind, massif) to -report the heap consumption of your program. The xtree reporting -is controlled by the new options --xtree-memory=none|allocs|full and ---xtree-memory-file=. -An heap xtree memory profiling can also be produced on demand using -a gdbserver monitor command. -The xtree can be output in 2 formats: 'callgrind format' -and 'massif format. The existing visualisers for these formats (e.g. -callgrind_annotate, kcachegrind, ms_print) can be used to visualise -and analyse these reports. -For more details, read the user manual. +* The 'xtree concept' was added in 3.13: + An xtree is a tree of stacktraces with data associated to the stacktraces. + This xtree is used by various tools (memcheck, helgrind, massif) to + report the heap consumption of your program. The xtree reporting + is controlled by the new options --xtree-memory=none|allocs|full and + --xtree-memory-file=. + An heap xtree memory profiling can also be produced on demand using + the gdbserver monitor command 'xtmemory []>'. + The xtree can be output in 2 formats: 'callgrind format' + and 'massif format. The existing visualisers for these formats (e.g. + callgrind_annotate, kcachegrind, ms_print) can be used to visualise + and analyse these reports. + For more details, read the user manual. * ================== PLATFORM CHANGES ================= @@ -32,28 +32,18 @@ For more details, read the user manual. * Memcheck: - - Support for --xtree-memory profiling. - - - A new monitor command 'xtmemory []>' produces a - heap usage profile report. + - Support for --xtree-memory and 'xtmemory []>'. * Massif: - - Support for --xtree-memory profiling. - - - A new monitor command 'xtmemory []>' produces a - heap usage profile report. + - Support for --xtree-memory and 'xtmemory []>'. - For some workloads (typically, for big applications), Massif memory consumption and CPU consumption decreases significantly. * Helgrind: - - Support for --xtree-memory profiling. - - - A new monitor command 'xtmemory []>' produces a - heap usage profile report. - + - Support for --xtree-memory and 'xtmemory []>'. * ==================== OTHER CHANGES ==================== @@ -62,6 +52,7 @@ For more details, read the user manual. will append the inner guest stacktrace to the inner host stacktrace. This helps to investigate the errors reported by the outer, when they are caused by the inner guest program (such as an inner regtest). + See README_DEVELOPERS for more info. * ==================== FIXED BUGS ==================== diff --git a/coregrind/m_main.c b/coregrind/m_main.c index cd3d7c5c8a..daa08d691a 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -294,6 +294,7 @@ static void usage_NORETURN ( Bool debug_help ) "\n" " debugging options for Valgrind tools that replace malloc:\n" " --trace-malloc=no|yes show client malloc details? [no]\n" +" --xtree-compress-strings=no|yes compress strings in xtree callgrind format [yes]\n" "\n"; const HChar usage3[] = diff --git a/helgrind/docs/hg-manual.xml b/helgrind/docs/hg-manual.xml index 28d4d9b482..ff7d65bdce 100644 --- a/helgrind/docs/hg-manual.xml +++ b/helgrind/docs/hg-manual.xml @@ -64,6 +64,11 @@ primitives, you can describe their behaviour to Helgrind using the ANNOTATE_* macros defined in helgrind.h. +Helgrind also provides memory + profiling using the command line + option --xtree-memory and the monitor command + xtmemory. + Following those is a section containing diff --git a/massif/docs/ms-manual.xml b/massif/docs/ms-manual.xml index 4c555a9702..b33033509e 100644 --- a/massif/docs/ms-manual.xml +++ b/massif/docs/ms-manual.xml @@ -46,6 +46,11 @@ program is using, it also gives very detailed information that indicates which parts of your program are responsible for allocating the heap memory. +Massif also provides memory + profiling using the command line + option --xtree-memory and the monitor command + xtmemory. + diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index 0fdd266d6d..084773a377 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -57,8 +57,12 @@ problems that are common in C and C++ programs. Problems like these can be difficult to find by other means, often remaining undetected for long periods, then causing occasional, -difficult-to-diagnose crashes. + difficult-to-diagnose crashes. +Memcheck also provides memory + profiling using the command line + option --xtree-memory and the monitor command + xtmemory. @@ -1040,6 +1044,13 @@ is and/or by using a smaller value for the option --num-callers. + + If you want to use + --xtree-memory=full memory profiling + (see ), then you cannot + specify --keep-stacktraces=free + or --keep-stacktraces=none. + diff --git a/none/tests/cmdline2.stdout.exp b/none/tests/cmdline2.stdout.exp index 7265c2b9e1..644013c47e 100644 --- a/none/tests/cmdline2.stdout.exp +++ b/none/tests/cmdline2.stdout.exp @@ -205,6 +205,7 @@ usage: valgrind [options] prog-and-args debugging options for Valgrind tools that replace malloc: --trace-malloc=no|yes show client malloc details? [no] + --xtree-compress-strings=no|yes compress strings in xtree callgrind format [yes] debugging options for Nulgrind: (none) -- 2.47.2