]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Addition of the options --xtree-memory and --xtree-memory-file
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 11 Nov 2016 14:15:45 +0000 (14:15 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 11 Nov 2016 14:15:45 +0000 (14:15 +0000)
Option is added, parsed, explained in --help
but is not used yet by any other code.
So, apart of the --help, no functional effect.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16124

coregrind/m_main.c
coregrind/m_replacemalloc/replacemalloc_core.c
none/tests/cmdline1.stdout.exp
none/tests/cmdline2.stdout.exp

index 3fbab26daec7b01de7b72675b4decf6d3126827d..cd3d7c5c8a2aa30e311d95e9b359d93ed06ec1b4 100644 (file)
@@ -145,6 +145,12 @@ static void usage_NORETURN ( Bool debug_help )
 "    --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"
index c31add04c22a1aeb23abc811909db357fa7c1aac..9033fb9b572ce259abffe304be7b547f8b3e1d58 100644 (file)
@@ -65,6 +65,16 @@ Bool VG_(replacement_malloc_process_cmd_line_option)(const HChar* arg)
             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 
index 0faec690e9317dc5063207b99ff01ac5308fa940..4e8bca40f7e9d8fff0aa6d7fcb78cddd02198444 100644 (file)
@@ -58,6 +58,12 @@ usage: valgrind [options] prog-and-args
     --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 '=')
index b124f20723f01390496e3783f71f0f78493d0403..7265c2b9e106ef19b5f43436bc056c432c096481 100644 (file)
@@ -58,6 +58,12 @@ usage: valgrind [options] prog-and-args
     --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 '=')