]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Have block_list showing heuristic used for a block (if block was
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 31 Aug 2015 22:08:47 +0000 (22:08 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 31 Aug 2015 22:08:47 +0000 (22:08 +0000)
found via an heuristic)

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

NEWS
memcheck/docs/mc-manual.xml
memcheck/mc_leakcheck.c

diff --git a/NEWS b/NEWS
index 49bcb1bd088721ddd5beefa457e7e9cdc9ef04bc..da441a299b19b75ccdc3fcb119402a2f15e0e0df 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -53,7 +53,8 @@ X86/MacOSX 10.10 and 10.11 and AMD64/MacOSX 10.10 and 10.11.
 
   - The 'block_list' monitor command now accepts an optional argument
     'limited <max_blocks>' to control the nr of block addresses
-    printed.
+    printed. If a block has been found using an heuristic, then
+    'block_list' will now show the heuristic after the block size.
 
   - The C helper functions used to instrument loads on x86-linux and
     arm-linux (both 32-bit only) have been replaced by handwritten
index 170fe1ddb8664d5c194e1f3b991a8257fd4f8211..11ad980cd8d1100132bc4db79883f52987f2bfe9 100644 (file)
@@ -1918,7 +1918,8 @@ Address 0x8049E28 len 1 defined
     by a loss record number.
     The <varname>block_list</varname> command shows the loss record information
     followed by the addresses and sizes of the blocks which have been
-    merged in the loss record.
+    merged in the loss record. If a block was found using an heuristic, the block size
+    is followed by the heuristic.
     </para>
 
     <para> If a directly lost block causes some other blocks to be indirectly
index ba48b4c275f34f26adc876dfa781fe791f9236d2..e2f752bce90967505f78522e2a006d53977e0784 100644 (file)
@@ -1585,8 +1585,13 @@ Bool MC_(print_block_list) ( UInt loss_record_nr, UInt max_blocks)
          // We found an existing loss record matching this chunk.
          // If this is the loss record we are looking for, output the pointer.
          if (old_lr == lr_array[loss_record_nr]) {
-            VG_(umsg)("%p[%lu]\n",
-                      (void *)ch->data, (SizeT)ch->szB);
+            if (ex->heuristic)
+               VG_(umsg)("%p[%lu] (found via heuristic %s)\n",
+                         (void *)ch->data, (SizeT)ch->szB,
+                         pp_heuristic (ex->heuristic));
+            else
+               VG_(umsg)("%p[%lu]\n",
+                         (void *)ch->data, (SizeT)ch->szB);
             remaining--;
             if (ex->state != Reachable) {
                // We can print the clique in all states, except Reachable.