]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge r9103 and r9105 (add --ignore-fn to Massif) from the Darwin branch.
authorNicholas Nethercote <njn@valgrind.org>
Fri, 17 Apr 2009 04:26:41 +0000 (04:26 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 17 Apr 2009 04:26:41 +0000 (04:26 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9567

77 files changed:
massif/docs/ms-manual.xml
massif/ms_main.c
massif/tests/Makefile.am
massif/tests/alloc-fns-A.post.exp
massif/tests/alloc-fns-A.vgtest
massif/tests/alloc-fns-B.post.exp
massif/tests/alloc-fns-B.vgtest
massif/tests/basic.post.exp
massif/tests/basic.vgtest
massif/tests/basic2.post.exp
massif/tests/basic2.vgtest
massif/tests/big-alloc.post.exp
massif/tests/big-alloc.vgtest
massif/tests/culling1.stderr.exp
massif/tests/culling1.vgtest
massif/tests/culling2.stderr.exp
massif/tests/culling2.vgtest
massif/tests/custom_alloc.post.exp
massif/tests/custom_alloc.vgtest
massif/tests/deep-A.post.exp
massif/tests/deep-A.vgtest
massif/tests/deep-B.post.exp
massif/tests/deep-B.stderr.exp
massif/tests/deep-B.vgtest
massif/tests/deep-C.post.exp
massif/tests/deep-C.stderr.exp
massif/tests/deep-C.vgtest
massif/tests/deep-D.post.exp
massif/tests/deep-D.vgtest
massif/tests/filter_verbose
massif/tests/ignored.c [new file with mode: 0644]
massif/tests/ignored.post.exp [new file with mode: 0644]
massif/tests/ignored.stderr.exp [new file with mode: 0644]
massif/tests/ignored.vgtest [new file with mode: 0644]
massif/tests/ignoring.post.exp
massif/tests/ignoring.vgtest
massif/tests/insig.post.exp
massif/tests/insig.vgtest
massif/tests/long-names.post.exp
massif/tests/long-names.vgtest
massif/tests/long-time.post.exp
massif/tests/long-time.vgtest
massif/tests/new-cpp.post.exp
massif/tests/new-cpp.vgtest
massif/tests/no-stack-no-heap.post.exp
massif/tests/no-stack-no-heap.vgtest
massif/tests/null.post.exp
massif/tests/null.vgtest
massif/tests/one.post.exp
massif/tests/one.vgtest
massif/tests/overloaded-new.post.exp
massif/tests/overloaded-new.vgtest
massif/tests/peak.post.exp
massif/tests/peak.vgtest
massif/tests/peak2.post.exp
massif/tests/peak2.stderr.exp
massif/tests/peak2.vgtest
massif/tests/realloc.post.exp
massif/tests/realloc.stderr.exp
massif/tests/realloc.vgtest
massif/tests/thresholds_0_0.post.exp
massif/tests/thresholds_0_0.vgtest
massif/tests/thresholds_0_10.post.exp
massif/tests/thresholds_0_10.vgtest
massif/tests/thresholds_10_0.post.exp
massif/tests/thresholds_10_0.vgtest
massif/tests/thresholds_10_10.post.exp
massif/tests/thresholds_10_10.vgtest
massif/tests/thresholds_5_0.post.exp
massif/tests/thresholds_5_0.vgtest
massif/tests/thresholds_5_10.post.exp
massif/tests/thresholds_5_10.vgtest
massif/tests/zero1.post.exp
massif/tests/zero1.vgtest
massif/tests/zero2.post.exp
massif/tests/zero2.vgtest
tests/vg_regtest.in

index 81a066eeceaffecbe31cbfdcbc001973bc755eb9..7637e47e5a967b36f60d811114e0896282b51162 100644 (file)
@@ -614,6 +614,33 @@ operator new[](unsigned long, std::nothrow_t const&)
       </listitem>
   </varlistentry>
 
+  <varlistentry id="opt.ignore-fn" xreflabel="--ignore-fn">
+    <term>
+      <option><![CDATA[--ignore-fn=<name> ]]></option>
+    </term>
+    <listitem>
+      <para>Any direct heap allocation (i.e. a call to
+      <function>malloc</function>, <function>new</function>, etc, or a call
+      to a function name in a <computeroutput>--alloc-fn</computeroutput>
+      option) that occurs in a function specified by this option will be
+      ignored.  This is mostly useful for testing purposes.  This option can
+      be specified multiple times on the command line, to name multiple
+      functions.
+      </para>
+      
+      <para>Any <function>realloc</function> of an ignored block will
+      also be ignored, even if the <function>realloc</function> call does
+      not occur in an ignored function.  This avoids the possibility of
+      negative heap sizes if ignored blocks are shrunk with
+      <function>realloc</function>.
+      </para>
+      
+      <para>Note that overloaded C++ names must be written in full, as for
+      <computeroutput>--alloc-fn</computeroutput> above.
+      </para>
+      </listitem>
+  </varlistentry>
+
   <varlistentry id="opt.threshold" xreflabel="--threshold">
     <term>
       <option><![CDATA[--threshold=<m.n> [default: 1.0] ]]></option>
index ee8590857a88eb3ae207f6b82d01f32413e8b9b1..7cd2603f4a85a4e381ae210426d75ebaf90b344f 100644 (file)
@@ -233,22 +233,25 @@ Number of snapshots: 50
 //  -  15,000 XPts            800,000 XPts
 //  -   1,800 top-XPts
 
-static UInt n_heap_allocs          = 0;
-static UInt n_heap_reallocs        = 0;
-static UInt n_heap_frees           = 0;
-static UInt n_stack_allocs         = 0;
-static UInt n_stack_frees          = 0;
-static UInt n_xpts                 = 0;
-static UInt n_xpt_init_expansions  = 0;
-static UInt n_xpt_later_expansions = 0;
-static UInt n_sxpt_allocs          = 0;
-static UInt n_sxpt_frees           = 0;
-static UInt n_skipped_snapshots    = 0;
-static UInt n_real_snapshots       = 0;
-static UInt n_detailed_snapshots   = 0;
-static UInt n_peak_snapshots       = 0;
-static UInt n_cullings             = 0;
-static UInt n_XCon_redos           = 0;
+static UInt n_heap_allocs           = 0;
+static UInt n_heap_reallocs         = 0;
+static UInt n_heap_frees            = 0;
+static UInt n_ignored_heap_allocs   = 0;
+static UInt n_ignored_heap_frees    = 0;
+static UInt n_ignored_heap_reallocs = 0;
+static UInt n_stack_allocs          = 0;
+static UInt n_stack_frees           = 0;
+static UInt n_xpts                  = 0;
+static UInt n_xpt_init_expansions   = 0;
+static UInt n_xpt_later_expansions  = 0;
+static UInt n_sxpt_allocs           = 0;
+static UInt n_sxpt_frees            = 0;
+static UInt n_skipped_snapshots     = 0;
+static UInt n_real_snapshots        = 0;
+static UInt n_detailed_snapshots    = 0;
+static UInt n_peak_snapshots        = 0;
+static UInt n_cullings              = 0;
+static UInt n_XCon_redos            = 0;
 
 //------------------------------------------------------------//
 //--- Globals                                              ---//
@@ -286,6 +289,7 @@ static Bool have_started_executing_code = False;
 //------------------------------------------------------------//
 
 static XArray* alloc_fns;
+static XArray* ignore_fns;
 
 static void init_alloc_fns(void)
 {
@@ -315,18 +319,26 @@ static void init_alloc_fns(void)
    DO("operator new[](unsigned long, std::nothrow_t const&)");
 }
 
-static Bool is_alloc_fn(Char* fnname)
+static void init_ignore_fns(void)
 {
-   Char** alloc_fn_ptr;
+   // Create the (empty) list.
+   ignore_fns = VG_(newXA)(VG_(malloc), "ms.main.iif.1",
+                                        VG_(free), sizeof(Char*));
+}
+
+// Determines if the named function is a member of the XArray.
+static Bool is_member_fn(XArray* fns, Char* fnname)
+{
+   Char** fn_ptr;
    Int i;
  
    // Nb: It's a linear search through the list, because we're comparing
    // strings rather than pointers to strings.
    // Nb: This gets called a lot.  It was an OSet, but they're quite slow to
    // iterate through so it wasn't a good choice.
-   for (i = 0; i < VG_(sizeXA)(alloc_fns); i++) {
-      alloc_fn_ptr = VG_(indexXA)(alloc_fns, i);
-      if (VG_STREQ(fnname, *alloc_fn_ptr))
+   for (i = 0; i < VG_(sizeXA)(fns); i++) {
+      fn_ptr = VG_(indexXA)(fns, i);
+      if (VG_STREQ(fnname, *fn_ptr))
          return True;
    }
    return False;
@@ -395,7 +407,9 @@ static Bool ms_process_cmd_line_option(Char* arg)
    else if VG_STR_CLO(arg, "--alloc-fn", tmp_str) {
       VG_(addToXA)(alloc_fns, &tmp_str);
    }
-
+   else if VG_STR_CLO(arg, "--ignore-fn", tmp_str) {
+      VG_(addToXA)(ignore_fns, &tmp_str);
+   }
    else if VG_STR_CLO(arg, "--massif-out-file", clo_massif_out_file) {}
 
    else
@@ -412,7 +426,8 @@ static void ms_print_usage(void)
 "                               ignored if --heap=no [8]\n"
 "    --stacks=no|yes           profile stack(s) [no]\n"
 "    --depth=<number>          depth of contexts [30]\n"
-"    --alloc-fn=<name>         specify <fn> as an alloc function [empty]\n"
+"    --alloc-fn=<name>         specify <name> as an alloc function [empty]\n"
+"    --ignore-fn=<name>        ignore heap allocations within <name> [empty]\n"
 "    --threshold=<m.n>         significance threshold, as a percentage [1.0]\n"
 "    --peak-inaccuracy=<m.n>   maximum peak inaccuracy, as a percentage [1.0]\n"
 "    --time-unit=i|ms|B        time unit: instructions executed, milliseconds\n"
@@ -780,6 +795,15 @@ static void sanity_check_SXTree(SXPt* sxpt)
 // enough.
 #define BUF_LEN   2048
 
+// Determine if the given IP belongs to a function that should be ignored.
+static Bool fn_should_be_ignored(Addr ip)
+{
+   static Char buf[BUF_LEN];
+   return
+      ( VG_(get_fnname)(ip, buf, BUF_LEN) && is_member_fn(ignore_fns, buf)
+      ? True : False );
+}
+
 // Get the stack trace for an XCon, filtering out uninteresting entries:
 // alloc-fns and entries above alloc-fns, and entries below main-or-below-main.
 //   Eg:       alloc-fn1 / alloc-fn2 / a / b / main / (below main) / c
@@ -789,7 +813,7 @@ static void sanity_check_SXTree(SXPt* sxpt)
 static
 Int get_IPs( ThreadId tid, Bool is_custom_alloc, Addr ips[])
 {
-   Char buf[BUF_LEN];
+   static Char buf[BUF_LEN];
    Int n_ips, i, n_alloc_fns_removed;
    Int overestimate;
    Bool redo;
@@ -832,7 +856,7 @@ Int get_IPs( ThreadId tid, Bool is_custom_alloc, Addr ips[])
       // involves calls to VG_(malloc)/VG_(free)).
       for (i = n_alloc_fns_removed; i < n_ips; i++) {
          if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
-            if (is_alloc_fn(buf)) {
+            if (is_member_fn(alloc_fns, buf)) {
                n_alloc_fns_removed++;
             } else {
                break;
@@ -859,15 +883,22 @@ Int get_IPs( ThreadId tid, Bool is_custom_alloc, Addr ips[])
 }
 
 // Gets an XCon and puts it in the tree.  Returns the XCon's bottom-XPt.
+// Unless the allocation should be ignored, in which case we return NULL.
 static XPt* get_XCon( ThreadId tid, Bool is_custom_alloc )
 {
-   Addr ips[MAX_IPS];
+   static Addr ips[MAX_IPS];
    Int i;
    XPt* xpt = alloc_xpt;
 
    // After this call, the IPs we want are in ips[0]..ips[n_ips-1].
    Int n_ips = get_IPs(tid, is_custom_alloc, ips);
 
+   // Should we ignore this allocation?  (Nb: n_ips can be zero, eg. if
+   // 'main' is marked as an alloc-fn.)
+   if (n_ips > 0 && fn_should_be_ignored(ips[0])) {
+      return NULL;
+   }
+
    // Now do the search/insertion of the XCon.
    for (i = 0; i < n_ips; i++) {
       Addr ip = ips[i];
@@ -1489,18 +1520,27 @@ void* new_block ( ThreadId tid, void* p, SizeT req_szB, SizeT req_alignB,
    if (clo_heap) {
       VERB(3, "<<< new_mem_heap (%lu, %lu)", req_szB, slop_szB);
 
-      // Update statistics.
-      n_heap_allocs++;
+      hc->where = get_XCon( tid, is_custom_alloc );
 
-      // Update heap stats.
-      update_heap_stats(req_szB, clo_heap_admin + slop_szB);
+      if (hc->where) {
+         // Update statistics.
+         n_heap_allocs++;
 
-      // Update XTree.
-      hc->where = get_XCon( tid, is_custom_alloc );
-      update_XCon(hc->where, req_szB);
+         // Update heap stats.
+         update_heap_stats(req_szB, clo_heap_admin + slop_szB);
+
+         // Update XTree.
+         update_XCon(hc->where, req_szB);
+
+         // Maybe take a snapshot.
+         maybe_take_snapshot(Normal, "  alloc");
+
+      } else {
+         // Ignored allocation.
+         n_ignored_heap_allocs++;
 
-      // Maybe take a snapshot.
-      maybe_take_snapshot(Normal, "  alloc");
+         VERB(3, "(ignored)");
+      }
 
       VERB(3, ">>>");
    }
@@ -1522,20 +1562,27 @@ void die_block ( void* p, Bool custom_free )
    if (clo_heap) {
       VERB(3, "<<< die_mem_heap");
 
-      // Update statistics
-      n_heap_frees++;
+      if (hc->where) {
+         // Update statistics.
+         n_heap_frees++;
 
-      // Maybe take a peak snapshot, since it's a deallocation.
-      maybe_take_snapshot(Peak, "de-PEAK");
+         // Maybe take a peak snapshot, since it's a deallocation.
+         maybe_take_snapshot(Peak, "de-PEAK");
 
-      // Update heap stats.
-      update_heap_stats(-hc->req_szB, -clo_heap_admin - hc->slop_szB);
+         // Update heap stats.
+         update_heap_stats(-hc->req_szB, -clo_heap_admin - hc->slop_szB);
 
-      // Update XTree.
-      update_XCon(hc->where, -hc->req_szB);
+         // Update XTree.
+         update_XCon(hc->where, -hc->req_szB);
 
-      // Maybe take a snapshot.
-      maybe_take_snapshot(Normal, "dealloc");
+         // Maybe take a snapshot.
+         maybe_take_snapshot(Normal, "dealloc");
+
+      } else {
+         n_ignored_heap_frees++;
+
+         VERB(3, "(ignored)");
+      }
 
       VERB(3, ">>> (-%lu, -%lu)", hc->req_szB, hc->slop_szB);
    }
@@ -1546,6 +1593,12 @@ void die_block ( void* p, Bool custom_free )
       VG_(cli_free)( p );
 }
 
+// Nb: --ignore-fn is tricky for realloc.  If the block's original alloc was
+// ignored, but the realloc is not requested to be ignored, and we are
+// shrinking the block, then we have to ignore the realloc -- otherwise we
+// could end up with negative heap sizes.  This isn't a danger if we are
+// growing such a block, but for consistency (it also simplifies things) we
+// ignore such reallocs as well.
 static __inline__
 void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
 {
@@ -1553,6 +1606,7 @@ void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
    void*     p_new;
    SizeT     old_req_szB, old_slop_szB, new_slop_szB, new_actual_szB;
    XPt      *old_where, *new_where;
+   Bool      is_ignored = False;
 
    // Remove the old block
    hc = VG_(HT_remove)(malloc_list, (UWord)p_old);
@@ -1566,12 +1620,18 @@ void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
    if (clo_heap) {
       VERB(3, "<<< renew_mem_heap (%lu)", new_req_szB);
 
-      // Update statistics
-      n_heap_reallocs++;
+      if (hc->where) {
+         // Update statistics.
+         n_heap_reallocs++;
 
-      // Maybe take a peak snapshot, if it's (effectively) a deallocation.
-      if (new_req_szB < old_req_szB) {
-         maybe_take_snapshot(Peak, "re-PEAK");
+         // Maybe take a peak snapshot, if it's (effectively) a deallocation.
+         if (new_req_szB < old_req_szB) {
+            maybe_take_snapshot(Peak, "re-PEAK");
+         }
+      } else {
+         // The original malloc was ignored, so we have to ignore the
+         // realloc as well.
+         is_ignored = True;
       }
    }
 
@@ -1607,9 +1667,17 @@ void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
       // Update XTree.
       if (clo_heap) {
          new_where = get_XCon( tid, /*custom_malloc*/False);
-         hc->where = new_where;
-         update_XCon(old_where, -old_req_szB);
-         update_XCon(new_where,  new_req_szB);
+         if (!is_ignored && new_where) {
+            hc->where = new_where;
+            update_XCon(old_where, -old_req_szB);
+            update_XCon(new_where,  new_req_szB);
+         } else {
+            // The realloc itself is ignored.
+            is_ignored = True;
+
+            // Update statistics.
+            n_ignored_heap_reallocs++;
+         }
       }
    }
 
@@ -1621,11 +1689,17 @@ void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
    VG_(HT_add_node)(malloc_list, hc);
 
    if (clo_heap) {
-      // Update heap stats.
-      update_heap_stats(new_req_szB - old_req_szB, new_slop_szB - old_slop_szB);
+      if (!is_ignored) {
+         // Update heap stats.
+         update_heap_stats(new_req_szB - old_req_szB,
+                          new_slop_szB - old_slop_szB);
+
+         // Maybe take a snapshot.
+         maybe_take_snapshot(Normal, "realloc");
+      } else {
 
-      // Maybe take a snapshot.
-      maybe_take_snapshot(Normal, "realloc");
+         VERB(3, "(ignored)");
+      }
 
       VERB(3, ">>> (%ld, %ld)",
          new_req_szB - old_req_szB, new_slop_szB - old_slop_szB);
@@ -2125,25 +2199,28 @@ static void ms_fini(Int exit_status)
 
    // Stats
    tl_assert(n_xpts > 0);  // always have alloc_xpt
-   VERB(1, "heap allocs:          %u", n_heap_allocs);
-   VERB(1, "heap reallocs:        %u", n_heap_reallocs);
-   VERB(1, "heap frees:           %u", n_heap_frees);
-   VERB(1, "stack allocs:         %u", n_stack_allocs);
-   VERB(1, "stack frees:          %u", n_stack_frees);
-   VERB(1, "XPts:                 %u", n_xpts);
-   VERB(1, "top-XPts:             %u (%d%%)",
+   VERB(1, "heap allocs:           %u", n_heap_allocs);
+   VERB(1, "heap reallocs:         %u", n_heap_reallocs);
+   VERB(1, "heap frees:            %u", n_heap_frees);
+   VERB(1, "ignored heap allocs:   %u", n_ignored_heap_allocs);
+   VERB(1, "ignored heap frees:    %u", n_ignored_heap_frees);
+   VERB(1, "ignored heap reallocs: %u", n_ignored_heap_reallocs);
+   VERB(1, "stack allocs:          %u", n_stack_allocs);
+   VERB(1, "stack frees:           %u", n_stack_frees);
+   VERB(1, "XPts:                  %u", n_xpts);
+   VERB(1, "top-XPts:              %u (%d%%)",
       alloc_xpt->n_children,
       ( n_xpts ? alloc_xpt->n_children * 100 / n_xpts : 0));
-   VERB(1, "XPt init expansions:  %u", n_xpt_init_expansions);
-   VERB(1, "XPt later expansions: %u", n_xpt_later_expansions);
-   VERB(1, "SXPt allocs:          %u", n_sxpt_allocs);
-   VERB(1, "SXPt frees:           %u", n_sxpt_frees);
-   VERB(1, "skipped snapshots:    %u", n_skipped_snapshots);
-   VERB(1, "real snapshots:       %u", n_real_snapshots);
-   VERB(1, "detailed snapshots:   %u", n_detailed_snapshots);
-   VERB(1, "peak snapshots:       %u", n_peak_snapshots);
-   VERB(1, "cullings:             %u", n_cullings);
-   VERB(1, "XCon redos:           %u", n_XCon_redos);
+   VERB(1, "XPt init expansions:   %u", n_xpt_init_expansions);
+   VERB(1, "XPt later expansions:  %u", n_xpt_later_expansions);
+   VERB(1, "SXPt allocs:           %u", n_sxpt_allocs);
+   VERB(1, "SXPt frees:            %u", n_sxpt_frees);
+   VERB(1, "skipped snapshots:     %u", n_skipped_snapshots);
+   VERB(1, "real snapshots:        %u", n_real_snapshots);
+   VERB(1, "detailed snapshots:    %u", n_detailed_snapshots);
+   VERB(1, "peak snapshots:        %u", n_peak_snapshots);
+   VERB(1, "cullings:              %u", n_cullings);
+   VERB(1, "XCon redos:            %u", n_XCon_redos);
 }
 
 
@@ -2167,12 +2244,21 @@ static void ms_post_clo_init(void)
       clo_heap_admin = 0;
    }
 
-   // Print alloc-fns, if necessary.
+   // Print alloc-fns and ignore-fns, if necessary.
    if (VG_(clo_verbosity) > 1) {
       VERB(1, "alloc-fns:");
       for (i = 0; i < VG_(sizeXA)(alloc_fns); i++) {
-         Char** alloc_fn_ptr = VG_(indexXA)(alloc_fns, i);
-         VERB(1, "  %d: %s", i, *alloc_fn_ptr);
+         Char** fn_ptr = VG_(indexXA)(alloc_fns, i);
+         VERB(1, "  %d: %s", i, *fn_ptr);
+      }
+
+      VERB(1, "ignore-fns:");
+      if (0 == VG_(sizeXA)(ignore_fns)) {
+         VERB(1, "  <empty>");
+      }
+      for (i = 0; i < VG_(sizeXA)(ignore_fns); i++) {
+         Char** fn_ptr = VG_(indexXA)(ignore_fns, i);
+         VERB(1, "  %d: %s", i, *fn_ptr);
       }
    }
 
@@ -2204,12 +2290,12 @@ static void ms_pre_clo_init(void)
       "Copyright (C) 2003-2009, and GNU GPL'd, by Nicholas Nethercote");
    VG_(details_bug_reports_to)  (VG_BUGS_TO);
 
-   // Basic functions
+   // Basic functions.
    VG_(basic_tool_funcs)          (ms_post_clo_init,
                                    ms_instrument,
                                    ms_fini);
 
-   // Needs
+   // Needs.
    VG_(needs_libc_freeres)();
    VG_(needs_command_line_options)(ms_process_cmd_line_option,
                                    ms_print_usage,
@@ -2229,14 +2315,15 @@ static void ms_pre_clo_init(void)
                                    ms_malloc_usable_size,
                                    0 );
 
-   // HP_Chunks
+   // HP_Chunks.
    malloc_list = VG_(HT_construct)( "Massif's malloc list" );
 
    // Dummy node at top of the context structure.
    alloc_xpt = new_XPt(/*ip*/0, /*parent*/NULL);
 
-   // Initialise alloc_fns.
+   // Initialise alloc_fns and ignore_fns.
    init_alloc_fns();
+   init_ignore_fns();
 
    // Initialise args_for_massif.
    args_for_massif = VG_(newXA)(VG_(malloc), "ms.main.mprci.1", 
index 7fffa0fc9db0240b455d1bdcb4431ca9f9d71531..b966a6c3a1835c5df120273cac9690c4cbac02dd 100644 (file)
@@ -8,7 +8,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
        alloc-fns-B.post.exp alloc-fns-B.stderr.exp alloc-fns-B.vgtest \
        basic.post.exp basic.stderr.exp basic.vgtest \
        basic2.post.exp basic2.stderr.exp basic2.vgtest \
-       insig.post.exp insig.stderr.exp insig.vgtest \
        big-alloc.post.exp big-alloc.stderr.exp big-alloc.vgtest \
        deep-A.post.exp deep-A.stderr.exp deep-A.vgtest \
        deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \
@@ -17,7 +16,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
         culling1.stderr.exp culling1.vgtest \
         culling2.stderr.exp culling2.vgtest \
        custom_alloc.post.exp custom_alloc.stderr.exp custom_alloc.vgtest \
+       ignored.post.exp ignored.stderr.exp ignored.vgtest \
        ignoring.post.exp ignoring.stderr.exp ignoring.vgtest \
+       insig.post.exp insig.stderr.exp insig.vgtest \
        long-names.post.exp long-names.stderr.exp long-names.vgtest \
        long-time.post.exp long-time.stderr.exp long-time.vgtest \
        malloc_usable.stderr.exp malloc_usable.vgtest \
@@ -45,6 +46,7 @@ check_PROGRAMS = \
        culling1 culling2 \
        custom_alloc \
        deep \
+       ignored \
        ignoring \
        insig \
        long-names \
index 447f2c91307973bae263afec0d326e932708b1db..55783899fbf7e9647e9232df97142e82560f5e6f 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./alloc-fns
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index ab6615aa4ec0649c7bc13876555e0687c96c2975..99cd1c8f423f4ddea9c8084854c8a63252dbf5b5 100644 (file)
@@ -1,4 +1,5 @@
 prog: alloc-fns
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 372cd61bebf7cfb88e371cbd6048772e1a40031d..5dd3c79f7bfed0c4357f3a67c8b57e4a9b21c9b8 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./alloc-fns
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 44a6b60a2a06e4fcba506b81b2b5ac91a9277ed8..dd25f56b1d6fd131897b09030b652eb844b524a9 100644 (file)
@@ -1,4 +1,5 @@
 prog: alloc-fns
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index e2b8d0636041be45fa732f6b54c6dcaf1e0aa312..db309fa4398953e66bebe6d95b4123ef93b1b404 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./basic
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index a4f52a7b50f61c6f32c6c77b9440438dadcb68b5..bfe7cd8275cc444324583fcd586643a9bd353eb3 100644 (file)
@@ -1,4 +1,5 @@
 prog: basic
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 7b617d0e1e08e847dc13006015ff227e7f76635c..753761b5a4794160b2c1dfdf720d84ef882ca8d4 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./basic
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index e9d1de43ac78f38c64629f38124951f4b4ba8af0..baa43aacfe4bfd0f7f0003c5a26e7cee234d3cde 100644 (file)
@@ -1,4 +1,5 @@
 prog: basic
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 29a40f7a24c4e29f36794a510bd4bcbd74b440e9..dc9a98072884dac6f99348a69667802faa236ca2 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./big-alloc
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index abdefddde30961eccb421e200d165d8da541b68c..2937f37881c00d40fd215fbc3dc61e45f038c176 100644 (file)
@@ -1,4 +1,5 @@
 prog: big-alloc
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 2faf8ae46b74572f8a96989e350bb9aadefb56e6..566b130a12ee6fa6138d5a0075a210bfff05e975 100644 (file)
@@ -13,6 +13,11 @@ Massif:   10: operator new(unsigned, std::nothrow_t const&)
 Massif:   11: operator new[](unsigned, std::nothrow_t const&)
 Massif:   12: operator new(unsigned long, std::nothrow_t const&)
 Massif:   13: operator new[](unsigned long, std::nothrow_t const&)
+Massif: ignore-fns:
+Massif:   0: __part_load_locale
+Massif:   1: __time_load_locale
+Massif:   2: dwarf2_unwind_dyld_add_image_hook
+Massif:   3: get_or_create_key_element
 Massif: startup S.  0 (t:0, hp:0, ex:0, st:0)
 Massif:   alloc S.  1 (t:32, hp:16, ex:16, st:0)
 Massif:   alloc S.  2 (t:64, hp:32, ex:32, st:0)
@@ -419,20 +424,23 @@ Massif:   post-cull S. 47 (t:6112, hp:3056, ex:3056, st:0)
 Massif:   post-cull S. 48 (t:6240, hp:3120, ex:3120, st:0)
 Massif:   post-cull Sd 49 (t:6368, hp:3184, ex:3184, st:0)
 Massif: New time interval = 128 (between snapshots 0 and 1)
-Massif: heap allocs:          200
-Massif: heap reallocs:        0
-Massif: heap frees:           0
-Massif: stack allocs:         0
-Massif: stack frees:          0
+Massif: heap allocs:           200
+Massif: heap reallocs:         0
+Massif: heap frees:            0
+Massif: ignored heap allocs:   ...
+Massif: ignored heap frees:    ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs:          0
+Massif: stack frees:           0
 Massif: XPts:                 ...
 Massif: top-XPts:             ...
 Massif: XPt init expansions:  ...
 Massif: XPt later expansions: ...
 Massif: SXPt allocs:          ...
 Massif: SXPt frees:           ...
-Massif: skipped snapshots:    51
-Massif: real snapshots:       150
-Massif: detailed snapshots:   15
-Massif: peak snapshots:       0
-Massif: cullings:             2
+Massif: skipped snapshots:     51
+Massif: real snapshots:        150
+Massif: detailed snapshots:    15
+Massif: peak snapshots:        0
+Massif: cullings:              2
 Massif: XCon redos:           ...
index b675857cfd9b969ae0d9224ea2dace122e6cd796..c282f9bc8120824ef2d0606a20372aaa8a8e9ee2 100644 (file)
@@ -1,4 +1,5 @@
 prog: culling1
 vgopts: -v -v --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 stderr_filter: filter_verbose
 cleanup: rm massif.out
index 3f58e13ed8014582017022118e9124ebb149d2f9..a928a135d76f303cbde8050f5388273badcfe608 100644 (file)
@@ -13,6 +13,11 @@ Massif:   10: operator new(unsigned, std::nothrow_t const&)
 Massif:   11: operator new[](unsigned, std::nothrow_t const&)
 Massif:   12: operator new(unsigned long, std::nothrow_t const&)
 Massif:   13: operator new[](unsigned long, std::nothrow_t const&)
+Massif: ignore-fns:
+Massif:   0: __part_load_locale
+Massif:   1: __time_load_locale
+Massif:   2: dwarf2_unwind_dyld_add_image_hook
+Massif:   3: get_or_create_key_element
 Massif: startup S.  0 (t:0, hp:0, ex:0, st:0)
 Massif:   alloc S.  1 (t:16, hp:0, ex:16, st:0)
 Massif:   alloc S.  2 (t:432, hp:400, ex:32, st:0)
@@ -522,20 +527,23 @@ Massif:   post-cull S. 47 (t:7491504, hp:7488400, ex:3104, st:0)
 Massif:   post-cull S. 48 (t:7647136, hp:7644000, ex:3136, st:0)
 Massif:   post-cull Sd 49 (t:7883584, hp:7880400, ex:3184, st:0)
 Massif: New time interval = 113728 (between snapshots 1 and 2)
-Massif: heap allocs:          200
-Massif: heap reallocs:        0
-Massif: heap frees:           0
-Massif: stack allocs:         0
-Massif: stack frees:          0
+Massif: heap allocs:           200
+Massif: heap reallocs:         0
+Massif: heap frees:            0
+Massif: ignored heap allocs:   ...
+Massif: ignored heap frees:    ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs:          0
+Massif: stack frees:           0
 Massif: XPts:                 ...
 Massif: top-XPts:             ...
 Massif: XPt init expansions:  ...
 Massif: XPt later expansions: ...
 Massif: SXPt allocs:          ...
 Massif: SXPt frees:           ...
-Massif: skipped snapshots:    1
-Massif: real snapshots:       200
-Massif: detailed snapshots:   20
-Massif: peak snapshots:       0
-Massif: cullings:             3
+Massif: skipped snapshots:     1
+Massif: real snapshots:        200
+Massif: detailed snapshots:    20
+Massif: peak snapshots:        0
+Massif: cullings:              3
 Massif: XCon redos:           ...
index 3e8fa0ce0205151d4d588c4a3a5cd103368a5205..9cd6032ae4d19bc78464cd179a9a1776222820dc 100644 (file)
@@ -1,4 +1,5 @@
 prog: culling2
 vgopts: -v -v --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 stderr_filter: filter_verbose
 cleanup: rm massif.out
index 57d57012fa90c5b208a99b32eca2bae2bd124d3a..a1c0ee091b5118f57aef0a378a56855c071ec4bb 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./custom_alloc
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 429f77beac8460813b7890250aa71fc324c1a122..3d5e916dd91f1972e22e4c89698ae28208c378ce 100644 (file)
@@ -1,4 +1,5 @@
 prog: custom_alloc
 vgopts: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 57da33513dd783bae252ddf14adbbb6358b5e2ce..84eaf568cdccf7556da7e6987b96078cfedc5a25 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./deep
-Massif arguments:   --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 20a81a77277f0b2c3c45213eff526f157a36233b..840aae67f514307f65fd7840c41c30ae2528270d 100644 (file)
@@ -1,4 +1,5 @@
 prog: deep
 vgopts: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 66b9aba5dd200ff1062aada235dcc0c43a39f94b..c1a164d347cd49fb249df18d17c98de5eafd3c2c 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./deep
-Massif arguments:   --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 0723baa2a4d0bc5c1e937062eaf982ebafeec198..59fe6eec1fded977628dc804446acd819ed4b3c7 100644 (file)
@@ -20,6 +20,11 @@ Massif:   17: a9
 Massif:   18: a10
 Massif:   19: a11
 Massif:   20: a12
+Massif: ignore-fns:
+Massif:   0: __part_load_locale
+Massif:   1: __time_load_locale
+Massif:   2: dwarf2_unwind_dyld_add_image_hook
+Massif:   3: get_or_create_key_element
 Massif: startup S.  0 (t:0, hp:0, ex:0, st:0)
 Massif:   alloc S.  1 (t:408, hp:400, ex:8, st:0)
 Massif:   alloc S.  2 (t:816, hp:800, ex:16, st:0)
@@ -31,20 +36,23 @@ Massif:   alloc S.  7 (t:2856, hp:2800, ex:56, st:0)
 Massif:   alloc S.  8 (t:3264, hp:3200, ex:64, st:0)
 Massif:   alloc Sd  9 (t:3672, hp:3600, ex:72, st:0)
 Massif:   alloc S. 10 (t:4080, hp:4000, ex:80, st:0)
-Massif: heap allocs:          10
-Massif: heap reallocs:        0
-Massif: heap frees:           0
-Massif: stack allocs:         0
-Massif: stack frees:          0
+Massif: heap allocs:           10
+Massif: heap reallocs:         0
+Massif: heap frees:            0
+Massif: ignored heap allocs:   ...
+Massif: ignored heap frees:    ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs:          0
+Massif: stack frees:           0
 Massif: XPts:                 ...
 Massif: top-XPts:             ...
 Massif: XPt init expansions:  ...
 Massif: XPt later expansions: ...
 Massif: SXPt allocs:          ...
 Massif: SXPt frees:           ...
-Massif: skipped snapshots:    0
-Massif: real snapshots:       11
-Massif: detailed snapshots:   1
-Massif: peak snapshots:       0
-Massif: cullings:             0
+Massif: skipped snapshots:     0
+Massif: real snapshots:        11
+Massif: detailed snapshots:    1
+Massif: peak snapshots:        0
+Massif: cullings:              0
 Massif: XCon redos:           ...
index 46c305e7f6a41b6f502e7ec9e9ba62984cc11810..f6e390d833b4c10730da09fcac0a86afd89fb768 100644 (file)
@@ -1,5 +1,6 @@
 prog: deep
 vgopts: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 -v -v --depth=8 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 stderr_filter: filter_verbose
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 59f6ea38e346a55a649bb452c40b010e512834eb..c36054eae930207d353abb7b85d0e7dea8eafb69 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./deep
-Massif arguments:   --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 457d1701132d306bd58e7f8751ab112c05ed9dd5..3577914505cdb265cbda8d6a6085ddc53eb7340b 100644 (file)
@@ -23,6 +23,11 @@ Massif:   20: a9
 Massif:   21: a10
 Massif:   22: a11
 Massif:   23: a12
+Massif: ignore-fns:
+Massif:   0: __part_load_locale
+Massif:   1: __time_load_locale
+Massif:   2: dwarf2_unwind_dyld_add_image_hook
+Massif:   3: get_or_create_key_element
 Massif: startup S.  0 (t:0, hp:0, ex:0, st:0)
 Massif:   alloc S.  1 (t:408, hp:400, ex:8, st:0)
 Massif:   alloc S.  2 (t:816, hp:800, ex:16, st:0)
@@ -34,20 +39,23 @@ Massif:   alloc S.  7 (t:2856, hp:2800, ex:56, st:0)
 Massif:   alloc S.  8 (t:3264, hp:3200, ex:64, st:0)
 Massif:   alloc Sd  9 (t:3672, hp:3600, ex:72, st:0)
 Massif:   alloc S. 10 (t:4080, hp:4000, ex:80, st:0)
-Massif: heap allocs:          10
-Massif: heap reallocs:        0
-Massif: heap frees:           0
-Massif: stack allocs:         0
-Massif: stack frees:          0
+Massif: heap allocs:           10
+Massif: heap reallocs:         0
+Massif: heap frees:            0
+Massif: ignored heap allocs:   ...
+Massif: ignored heap frees:    ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs:          0
+Massif: stack frees:           0
 Massif: XPts:                 ...
 Massif: top-XPts:             ...
 Massif: XPt init expansions:  ...
 Massif: XPt later expansions: ...
 Massif: SXPt allocs:          ...
 Massif: SXPt frees:           ...
-Massif: skipped snapshots:    0
-Massif: real snapshots:       11
-Massif: detailed snapshots:   1
-Massif: peak snapshots:       0
-Massif: cullings:             0
+Massif: skipped snapshots:     0
+Massif: real snapshots:        11
+Massif: detailed snapshots:    1
+Massif: peak snapshots:        0
+Massif: cullings:              0
 Massif: XCon redos:           ...
index 9cda9ed441f1024df9f2ba6040cd33d376116a73..b40ba36da37bfcd5276275ded74c86ff4749685f 100644 (file)
@@ -1,5 +1,6 @@
 prog: deep
 vgopts: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 -v -v --depth=8 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 stderr_filter: filter_verbose
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 78ea7c29ff78ed6a07e7c5e4663f3e463eb4dd2f..cdecf89c08d687b12991a2333c462ea4f66fd0a5 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./deep
-Massif arguments:   --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 27b92adb376419a566016a2af2652d1ec7ab6ac1..7e10dbfc8a34daf2c8a754e71f00ebc33d4bffc8 100644 (file)
@@ -1,4 +1,5 @@
 prog: deep
 vgopts: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ../../tests/filter_libc
 cleanup: rm massif.out
index e972c69887fea29dd881030dd905659390ce85de..5f159c3ab99551396fbae923abc79e2c98f61a70 100755 (executable)
@@ -11,6 +11,11 @@ $dir/filter_stderr |
 # lines by default, and the 'p' means do print those that match the pattern.
 sed -n "/Massif:/p" |
 
+# These ignored heap counts could vary from machine to machine.
+sed "s/\(Massif: ignored heap allocs:\).*/\1   .../" |
+sed "s/\(Massif: ignored heap frees:\).*/\1    .../" |
+sed "s/\(Massif: ignored heap reallocs:\).*/\1 .../" |
+
 # These XPt counts vary from machine to machine, because the size of the
 # stack trace can vary -- eg. some machines have more stack frames below
 # zero than other machines.  So filter them out.
diff --git a/massif/tests/ignored.c b/massif/tests/ignored.c
new file mode 100644 (file)
index 0000000..be16f69
--- /dev/null
@@ -0,0 +1,49 @@
+#include <stdlib.h>
+
+// All sizes are divisible by 16 -- no slop.
+
+int* ignore1(void)
+{
+   // Allocating/freeing in an ignored function: ignored.
+   int* ignored_x1 = malloc(400);
+   int* ignored_x2 = malloc(400);
+   free(ignored_x2);
+   return ignored_x1;
+}
+
+void ignore2(int* x, int* ignored_x)
+{
+   // Growing/shrinking a non-ignored block in an ignored function: ignored.
+   x = realloc(x, 800);   
+   x = realloc(x, 400);   
+
+   // Growing/shrinking an ignored block in an ignored function: ignored.
+   ignored_x = realloc(ignored_x, 800);   
+   ignored_x = realloc(ignored_x, 400);   
+}
+
+int main(void)
+{
+   int* x;
+   int* ignored_x;
+
+   // Not ignored.
+   x = malloc(400);
+
+   // Get an ignored block.
+   ignored_x = ignore1();
+
+   // Growing/shrinking a non-ignored block in a non-ignored function:
+   // not ignored.
+   x = realloc(x, 800);
+   x = realloc(x, 400);
+
+   // Growing/shrinking an ignored block in a non-ignored function: ignored.
+   ignored_x = realloc(ignored_x, 800);
+   ignored_x = realloc(ignored_x, 400);
+
+   ignore2(x, ignored_x);
+
+   x = realloc(ignored_x, 0);    // equivalent to 'free(ignored_x)'.
+}
+
diff --git a/massif/tests/ignored.post.exp b/massif/tests/ignored.post.exp
new file mode 100644 (file)
index 0000000..b1e3492
--- /dev/null
@@ -0,0 +1,50 @@
+--------------------------------------------------------------------------------
+Command:            ./ignored
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=ignore1 --ignore-fn=ignore2 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
+ms_print arguments: massif.out
+--------------------------------------------------------------------------------
+
+
+     B
+  800^                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                                                       #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+     |                                    :                                  #
+   0 +----------------------------------------------------------------------->B
+     0                                                                     800
+
+Number of snapshots: 5
+ Detailed snapshots: [3 (peak)]
+
+--------------------------------------------------------------------------------
+  n        time(B)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
+--------------------------------------------------------------------------------
+  0              0                0                0             0            0
+  1            400              400              400             0            0
+  2            800              800              800             0            0
+  3            800              800              800             0            0
+100.00% (800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
+->100.00% (800B) 0x........: main (ignored.c:38)
+| 
+->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
+
+--------------------------------------------------------------------------------
+  n        time(B)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
+--------------------------------------------------------------------------------
+  4            800              800              400           400            0
diff --git a/massif/tests/ignored.stderr.exp b/massif/tests/ignored.stderr.exp
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/massif/tests/ignored.vgtest b/massif/tests/ignored.vgtest
new file mode 100644 (file)
index 0000000..fed7c26
--- /dev/null
@@ -0,0 +1,6 @@
+prog: ignored
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=ignore1 --ignore-fn=ignore2
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
+post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
+cleanup: rm massif.out
index efe7c09214879f8115d81dd6e8f8961126657ce9..04eaf846e606061b09bde4c8d18183d1fded6fd9 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./ignoring
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 0a22e40c740d4fc7da9dec417deda49c8e8a8d45..9bcb8bd4bbd8589ef31ad8640984972232e14c3c 100644 (file)
@@ -1,4 +1,5 @@
 prog: ignoring
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 177dcf9baa3a2dafd297dec53f840b7cd09aae23..3c187ead351c80cdc31b79c79414225e2d2625e0 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./insig
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 16857af390c37e082dafe939375642452de216d8..cb167dfa8346e77ca1ba245fbc7b80e47e578c35 100644 (file)
@@ -1,4 +1,5 @@
 prog: insig
 vgopts: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index a425c0efa41f977bc694a5e39ce1e9e8e6b596d7..1a5dc37143034f205ccd424cb012a96152d2c50a 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./long-names
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index f071366978e5c5ec137249cc919f52d97de4e2aa..38d8d6d1f8f7d9acb7c657ce20cf72229b07f130 100644 (file)
@@ -1,4 +1,5 @@
 prog: long-names
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 79f4e3d4af6da8506f50a24deda43e291f9a1f4a..1388d282e433318af059728736556fa1b8a66be7 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./long-time
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 83757eea512673da4f19fbb35a781cb4dd939392..5c80658a3b605f097f2dda950e6e42e26b5ddb45 100644 (file)
@@ -1,4 +1,5 @@
 prog: long-time
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index fec6638863211aace415ffa0a60299d86ade04cd..dd33ddf1b6a67fb5c403ce3cadffdcef62cf7b74 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./new-cpp
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 72471d4d204fe74cc5dc541172108ad92fb62d11..df2d3aa1029bebdc2172b69d5ab06e195231252c 100644 (file)
@@ -1,4 +1,5 @@
 prog: new-cpp
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index b8caf841a4d113d4bb2d4a9b4baa7e10c2600082..1f3d27ec432dd2580a7c8a3560c751bb1bab7a6e 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./basic
-Massif arguments:   --stacks=no --heap=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --heap=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 17308b1e6ab2019f2b6e65802a9c039c88e49b8b..b984fc0604ef526d057226f3a5425c8e961be0a0 100644 (file)
@@ -1,4 +1,5 @@
 prog: basic
 vgopts: --stacks=no --heap=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index b02f5e7c7d486d576b320c751f324c39d5cd9261..e81091a0f06172fc03fe4b6a411af5ae22d5fdc0 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./null
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 72ac65cc22eb4eb0095daab552855fadd8f2d825..5063f8eeb8e2f548f243b367ff9689ec2bd2f3da 100644 (file)
@@ -1,4 +1,5 @@
 prog: null
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 6b7fec26ff83b28b641997ea944c753d72d1d825..989c85dc89445453ac73c28535edbd35967bddf0 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./one
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 38e0f7f5f7ce198c88be3b02bb96ca810fc97e4d..9a154677155bb6fefb323788fcb65a4bfd377954 100644 (file)
@@ -1,4 +1,5 @@
 prog: one
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index fdae0221b26f06d06ca16de3e914ddc618b47416..698dc8e6e3052b23a611d45cffd8d906d3016a6f 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./overloaded-new
-Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 50d2ad03006bd4362d7c6a6f159ad79297f9cdad..b35673b903203f9471d0b0d1343d1d28f1f906ea 100644 (file)
@@ -1,4 +1,5 @@
 prog: overloaded-new
 vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index ad7afae6e1ef2ad9d7ceeb2d29f30961f5216d6f..1cbb8b4eefc719ad1f91e9d4d75213136e1fae39 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./peak
-Massif arguments:   --stacks=no --time-unit=B --peak-inaccuracy=0 --heap-admin=128 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --peak-inaccuracy=0 --heap-admin=128 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index f30efe80bae11062e0119efcf538538ac3d89360..5cc22559e9949545df2fd6f0343d90ae467446f9 100644 (file)
@@ -1,4 +1,5 @@
 prog: peak
 vgopts: --stacks=no --time-unit=B --peak-inaccuracy=0 --heap-admin=128 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index af8946d102b9331b301a920908e4d88e5a37727c..2dd12754c68a8f08a62abc661755e3e337f8d062 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./peak
-Massif arguments:   --stacks=no --time-unit=B --peak-inaccuracy=10.0 --heap-admin=128 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --peak-inaccuracy=10.0 --heap-admin=128 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index fd1b97266c448e6df50fed79962f84f755bb3707..39527b0ca129746a50e7d5eba58911cc0cf90c1c 100644 (file)
@@ -13,6 +13,11 @@ Massif:   10: operator new(unsigned, std::nothrow_t const&)
 Massif:   11: operator new[](unsigned, std::nothrow_t const&)
 Massif:   12: operator new(unsigned long, std::nothrow_t const&)
 Massif:   13: operator new[](unsigned long, std::nothrow_t const&)
+Massif: ignore-fns:
+Massif:   0: __part_load_locale
+Massif:   1: __time_load_locale
+Massif:   2: dwarf2_unwind_dyld_add_image_hook
+Massif:   3: get_or_create_key_element
 Massif: startup S.  0 (t:0, hp:0, ex:0, st:0)
 Massif:   alloc S.  1 (t:1728, hp:1600, ex:128, st:0)
 Massif:   alloc S.  2 (t:1872, hp:1616, ex:256, st:0)
@@ -89,20 +94,23 @@ Massif:   alloc S. 72 (t:40032, hp:32000, ex:2560, st:0)
 Massif:   alloc S. 73 (t:40176, hp:32016, ex:2688, st:0)
 Massif: de-PEAK Sp 74 (t:40176, hp:32016, ex:2688, st:0)
 Massif: dealloc S. 75 (t:40320, hp:32000, ex:2560, st:0)
-Massif: heap allocs:          40
-Massif: heap reallocs:        0
-Massif: heap frees:           20
-Massif: stack allocs:         0
-Massif: stack frees:          0
+Massif: heap allocs:           40
+Massif: heap reallocs:         0
+Massif: heap frees:            20
+Massif: ignored heap allocs:   ...
+Massif: ignored heap frees:    ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs:          0
+Massif: stack frees:           0
 Massif: XPts:                 ...
 Massif: top-XPts:             ...
 Massif: XPt init expansions:  ...
 Massif: XPt later expansions: ...
 Massif: SXPt allocs:          ...
 Massif: SXPt frees:           ...
-Massif: skipped snapshots:    0
-Massif: real snapshots:       76
-Massif: detailed snapshots:   15
-Massif: peak snapshots:       15
-Massif: cullings:             0
+Massif: skipped snapshots:     0
+Massif: real snapshots:        76
+Massif: detailed snapshots:    15
+Massif: peak snapshots:        15
+Massif: cullings:              0
 Massif: XCon redos:           ...
index 0ea5926cf46a9d8080c134580c1187ab267343e1..91a6e496429bdc263ae89af594ab0fa88a046aa3 100644 (file)
@@ -1,5 +1,6 @@
 prog: peak
 vgopts: --stacks=no --time-unit=B -v -v --peak-inaccuracy=10.0 --heap-admin=128 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 stderr_filter: filter_verbose
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 3dd24d5cb077848e3706983ce752de2be74a4d91..3298d7d15735d7c774afa39a3380272e7576aaec 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./realloc
-Massif arguments:   --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: --threshold=0 massif.out
 --------------------------------------------------------------------------------
 
index f802dd5d920f9b91548048475ab64b3932e283fe..d8fcf7ef1700ea8531dc6f8cab6c9fca2413a8e1 100644 (file)
@@ -13,6 +13,11 @@ Massif:   10: operator new(unsigned, std::nothrow_t const&)
 Massif:   11: operator new[](unsigned, std::nothrow_t const&)
 Massif:   12: operator new(unsigned long, std::nothrow_t const&)
 Massif:   13: operator new[](unsigned long, std::nothrow_t const&)
+Massif: ignore-fns:
+Massif:   0: __part_load_locale
+Massif:   1: __time_load_locale
+Massif:   2: dwarf2_unwind_dyld_add_image_hook
+Massif:   3: get_or_create_key_element
 Massif: startup S.  0 (t:0, hp:0, ex:0, st:0)
 Massif:   alloc S.  1 (t:800, hp:800, ex:0, st:0)
 Massif: realloc S.  2 (t:800, hp:800, ex:0, st:0)
@@ -21,20 +26,23 @@ Massif: realloc S.  4 (t:800, hp:400, ex:400, st:0)
 Massif: realloc S.  5 (t:1200, hp:1200, ex:0, st:0)
 Massif: de-PEAK Sp  6 (t:1200, hp:1200, ex:0, st:0)
 Massif: dealloc S.  7 (t:2400, hp:0, ex:0, st:0)
-Massif: heap allocs:          1
-Massif: heap reallocs:        3
-Massif: heap frees:           1
-Massif: stack allocs:         0
-Massif: stack frees:          0
+Massif: heap allocs:           1
+Massif: heap reallocs:         3
+Massif: heap frees:            1
+Massif: ignored heap allocs:   ...
+Massif: ignored heap frees:    ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs:          0
+Massif: stack frees:           0
 Massif: XPts:                 ...
 Massif: top-XPts:             ...
 Massif: XPt init expansions:  ...
 Massif: XPt later expansions: ...
 Massif: SXPt allocs:          ...
 Massif: SXPt frees:           ...
-Massif: skipped snapshots:    0
-Massif: real snapshots:       8
-Massif: detailed snapshots:   2
-Massif: peak snapshots:       2
-Massif: cullings:             0
+Massif: skipped snapshots:     0
+Massif: real snapshots:        8
+Massif: detailed snapshots:    2
+Massif: peak snapshots:        2
+Massif: cullings:              0
 Massif: XCon redos:           ...
index c50bad1a510f962d0f7857904777432737acfb80..4344328979cf979b7f5ecbd86b1e31ed10e6ff85 100644 (file)
@@ -1,5 +1,6 @@
 prog: realloc
 vgopts: -v -v --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 stderr_filter: filter_verbose
 post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 5bdcc595d3fcd6349504d696990125e2ea0a6025..0d1b86e91ea20f2124c2fa5a8cbf11f61f877735 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./thresholds
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out --threshold=0
 --------------------------------------------------------------------------------
 
index 5b9f7c685068bd783c767a493b53f81cb2dd5d82..f848c3eb213fc57ae36dc6c478f084979457d83e 100644 (file)
@@ -1,4 +1,5 @@
 prog: thresholds
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses
 cleanup: rm massif.out
index 9d9b3e4bc95699607f0c82f445351749480e9cc5..cefc5d06a88ffa9435be8e20a82ae048cc9190c0 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./thresholds
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out --threshold=10
 --------------------------------------------------------------------------------
 
index 58f2a948236579d9766161cbfdd0cc029f5b5342..bca31081b67cb338561514f02d69cd5eb1cdb998 100644 (file)
@@ -1,4 +1,5 @@
 prog: thresholds
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses
 cleanup: rm massif.out
index e5823f8c103b292779c6b291a554bc7a9bba6ca3..981f08cb4ceda2f7e5b16d717cd21872f95d0d43 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./thresholds
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out --threshold=0
 --------------------------------------------------------------------------------
 
index 8c9dd13ddaaf9848feb846df14b67a3db94d6ca0..cc8f09af5567e3618f3cfd66b777d4912e6bcc1a 100644 (file)
@@ -1,4 +1,5 @@
 prog: thresholds
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses
 cleanup: rm massif.out
index 1374375909d67655dce1382b738d062a607d3c18..948b71f40764e1218b72726a55c4f7480fbf8f5e 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./thresholds
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out --threshold=10
 --------------------------------------------------------------------------------
 
index 0b9083b00af7caecf93ad4c4622159ac3580212e..5dd37299bef3e355108d3245339e26bcaab720fb 100644 (file)
@@ -1,4 +1,5 @@
 prog: thresholds
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses
 cleanup: rm massif.out
index 911225d99aaaaa586af446987e1f65b4dc06a777..7da2416d3f665f9d9d7fc7c739223ba7e8961971 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./thresholds
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out --threshold=0
 --------------------------------------------------------------------------------
 
index cb5f4457b292ecdd3da907cb35deedca5ae32926..08500c281ca05cefc0821b311801122921f7ef64 100644 (file)
@@ -1,4 +1,5 @@
 prog: thresholds
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses
 cleanup: rm massif.out
index 4be87b19afe27d261a402fe4a11bf9458068d0f2..ee79ee391b1bd455dc74ca5e179222b855fa4195 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./thresholds
-Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file=massif.out
+Massif arguments:   --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out --threshold=10
 --------------------------------------------------------------------------------
 
index 86a0781032ebb1b0841a3a19cc4cf9dd6c93b22f..4a61ba8811bc78b3dccb8dab90ff7774a37b2f4b 100644 (file)
@@ -1,4 +1,5 @@
 prog: thresholds
 vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses
 cleanup: rm massif.out
index faffb809626a0d43bb68e78c5df1d96c5a41e936..db640cb6790351672a05517649de7f156e161e12 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./zero
-Massif arguments:   --stacks=no --heap-admin=0 --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --heap-admin=0 --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: --threshold=0 massif.out
 --------------------------------------------------------------------------------
 
index 95641db1448058ca35164869672bfc426a5c632d..56835e828a4c451f69cc467c8b8f13238a1c5ce4 100644 (file)
@@ -1,4 +1,5 @@
 prog: zero
 vgopts: --stacks=no --heap-admin=0 --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 75d8e7d03124a9a1959135a97fca89b6345ceee7..1a8b5aed83a7ef94bb4f785ffb63e38df506fb54 100644 (file)
@@ -1,6 +1,6 @@
 --------------------------------------------------------------------------------
 Command:            ./zero
-Massif arguments:   --stacks=no --heap-admin=0 --time-unit=B --massif-out-file=massif.out
+Massif arguments:   --stacks=no --heap-admin=0 --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 ms_print arguments: massif.out
 --------------------------------------------------------------------------------
 
index 0549a5aa68a04a323e22e268fa6c142c954cd84e..8c422246c0a63569e7bdbcb1373140a22d4b2193 100644 (file)
@@ -1,4 +1,5 @@
 prog: zero
 vgopts: --stacks=no --heap-admin=0 --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
 post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
 cleanup: rm massif.out
index 8bcb050de290a8fbdabce1667133c279e6d329fe..15c53f14a5a6796afa57e58cb45e4fe44a0f1272 100755 (executable)
@@ -51,7 +51,8 @@
 # following lines, in any order:
 #   - prog:   <prog to run>                         (compulsory)
 #   - args:   <args for prog>                       (default: none)
-#   - vgopts: <Valgrind options>                    (default: none)
+#   - vgopts: <Valgrind options>                    (default: none;
+#                                                    multiple are allowed)
 #   - stdout_filter: <filter to run stdout through> (default: none)
 #   - stderr_filter: <filter to run stderr through> (default: ./filter_stderr)
 #   - prereq: <prerequisite command>                (default: none)
@@ -216,7 +217,7 @@ sub read_vgtest_file($)
         if      ($line =~ /^\s*#/ || $line =~ /^\s*$/) {
            next;
        } elsif ($line =~ /^\s*vgopts:\s*(.*)$/) {
-            $vgopts = $1;
+            $vgopts = $vgopts . " " . $1;   # Nb: Make sure there's a space!
         } elsif ($line =~ /^\s*prog:\s*(.*)$/) {
             $prog = validate_program(".", $1, 0, 0);
         } elsif ($line =~ /^\s*args:\s*(.*)$/) {