Merge all remaining changes from branches/PTRCHECK.  These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/callgrind/bbcc.c b/callgrind/bbcc.c
index c564266..554c1ed 100644
--- a/callgrind/bbcc.c
+++ b/callgrind/bbcc.c
@@ -48,7 +48,8 @@
 
    bbccs->size    = N_BBCC_INITIAL_ENTRIES;
    bbccs->entries = 0;
-   bbccs->table = (BBCC**) CLG_MALLOC(bbccs->size * sizeof(BBCC*));
+   bbccs->table = (BBCC**) CLG_MALLOC("cl.bbcc.ibh.1",
+                                      bbccs->size * sizeof(BBCC*));
 
    for (i = 0; i < bbccs->size; i++) bbccs->table[i] = NULL;
 }
@@ -197,7 +198,8 @@
     BBCC *curr_BBCC, *next_BBCC;
 
     new_size = 2*current_bbccs.size+3;
-    new_table = (BBCC**) CLG_MALLOC(new_size * sizeof(BBCC*));
+    new_table = (BBCC**) CLG_MALLOC("cl.bbcc.rbh.1",
+                                    new_size * sizeof(BBCC*));
  
     if (!new_table) return;
  
@@ -246,7 +248,7 @@
     BBCC** bbccs;
     int i;
     
-    bbccs = (BBCC**) CLG_MALLOC(sizeof(BBCC*) * size);
+    bbccs = (BBCC**) CLG_MALLOC("cl.bbcc.nr.1", sizeof(BBCC*) * size);
     for(i=0;i<size;i++)
 	bbccs[i] = 0;
 
@@ -271,7 +273,8 @@
    /* We need cjmp_count+1 JmpData structs:
     * the last is for the unconditional jump/call/ret at end of BB
     */
-   new = (BBCC*)CLG_MALLOC(sizeof(BBCC) +
+   new = (BBCC*)CLG_MALLOC("cl.bbcc.nb.1",
+                           sizeof(BBCC) +
 			   (bb->cjmp_count+1) * sizeof(JmpData));
    new->bb  = bb;
    new->tid = CLG_(current_tid);