Author: philippe
Date: Fri Nov 11 14:15:45 2016
New Revision: 16124
Log:
Addition of the options --xtree-memory and --xtree-memory-file
Option is added, parsed, explained in --help
but is not used yet by any other code.
So, apart of the --help, no functional effect.
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_replacemalloc/replacemalloc_core.c
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Fri Nov 11 14:15:45 2016
@@ -145,6 +145,12 @@
" --alignment=<number> set minimum alignment of heap allocations [%s]\n"
" --redzone-size=<number> set minimum size of redzones added before/after\n"
" heap blocks (in bytes). [%s]\n"
+" --xtree-memory=none|allocs|full profile heap memory in an xtree [none]\n"
+" and produces a report at the end of the execution\n"
+" none: no profiling, allocs: current allocated\n"
+" size/blocks, full: profile current and cumulative\n"
+" allocated size/blocks and freed size/blocks.\n"
+" --xtree-memory-file=<file> xtree memory report file [xtmemory.kcg.%%p]\n"
"\n"
" uncommon user options for all Valgrind tools:\n"
" --fullpath-after= (with nothing after the '=')\n"
Modified: trunk/coregrind/m_replacemalloc/replacemalloc_core.c
==============================================================================
--- trunk/coregrind/m_replacemalloc/replacemalloc_core.c (original)
+++ trunk/coregrind/m_replacemalloc/replacemalloc_core.c Fri Nov 11 14:15:45 2016
@@ -65,6 +65,16 @@
VG_MIN_MALLOC_SZB);
}
}
+ else if VG_XACT_CLO(arg, "--xtree-memory=none",
+ VG_(clo_xtree_memory), Vg_XTMemory_None) {}
+ else if VG_XACT_CLO(arg, "--xtree-memory=allocs",
+ VG_(clo_xtree_memory), Vg_XTMemory_Allocs) {}
+ else if VG_XACT_CLO(arg, "--xtree-memory=full",
+ VG_(clo_xtree_memory), Vg_XTMemory_Full) {}
+ else if VG_STR_CLO (arg, "--xtree-memory-file",
+ VG_(clo_xtree_memory_file)) {}
+ else if VG_BOOL_CLO(arg, "--xtree-compress-strings",
+ VG_(clo_xtree_compress_strings)) {}
else if VG_BOOL_CLO(arg, "--trace-malloc", VG_(clo_trace_malloc)) {}
else
Modified: trunk/none/tests/cmdline1.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline1.stdout.exp (original)
+++ trunk/none/tests/cmdline1.stdout.exp Fri Nov 11 14:15:45 2016
@@ -58,6 +58,12 @@
--alignment=<number> set minimum alignment of heap allocations [not used by this tool]
--redzone-size=<number> set minimum size of redzones added before/after
heap blocks (in bytes). [not used by this tool]
+ --xtree-memory=none|allocs|full profile heap memory in an xtree [none]
+ and produces a report at the end of the execution
+ none: no profiling, allocs: current allocated
+ size/blocks, full: profile current and cumulative
+ allocated size/blocks and freed size/blocks.
+ --xtree-memory-file=<file> xtree memory report file [xtmemory.kcg.%p]
uncommon user options for all Valgrind tools:
--fullpath-after= (with nothing after the '=')
Modified: trunk/none/tests/cmdline2.stdout.exp
==============================================================================
--- trunk/none/tests/cmdline2.stdout.exp (original)
+++ trunk/none/tests/cmdline2.stdout.exp Fri Nov 11 14:15:45 2016
@@ -58,6 +58,12 @@
--alignment=<number> set minimum alignment of heap allocations [not used by this tool]
--redzone-size=<number> set minimum size of redzones added before/after
heap blocks (in bytes). [not used by this tool]
+ --xtree-memory=none|allocs|full profile heap memory in an xtree [none]
+ and produces a report at the end of the execution
+ none: no profiling, allocs: current allocated
+ size/blocks, full: profile current and cumulative
+ allocated size/blocks and freed size/blocks.
+ --xtree-memory-file=<file> xtree memory report file [xtmemory.kcg.%p]
uncommon user options for all Valgrind tools:
--fullpath-after= (with nothing after the '=')
|