Lines Matching full:heap
2 //--- Massif: a heap profiling tool. ms_main.c ---*/
46 // - Add ability to draw multiple graphs, eg. heap-only, stack-only, total.
62 // perl perf/vg_perf --tools=massif --reps=3 perf/{heap,tinycc} massif
70 // heap 0.53s ma:12.4s (23.5x, -----)
87 // - (Artur Wisz) add a feature to Massif to ignore any heap blocks larger
97 desc: --heap-admin=foo
116 n1: 5 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
125 n_events: n time(ms) total(B) useful-heap(B) admin-heap(B) stacks(B)
142 Massif arguments: --heap-admin=foo
154 -------------------------------------------------------------------------------- n time(ms) total(B) useful-heap(B) admin-heap(B) stacks(B)
158 100.00% (5B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
190 // The size of the stacks and heap is tracked. The heap is tracked in a lot
194 // (Alternatively, if --pages-as-heap=yes is specified, memory is tracked at
195 // the page level, and each page is treated much like a heap block. We use
196 // "heap" throughout below to cover this case because the concepts are all the
201 // - Normal: these record the current time, total memory size, total heap
202 // size, heap admin size and stack size.
204 // detailed XTree (see below) indicating how the heap is structured.
275 static SizeT heap_szB = 0; // Live heap size
276 static SizeT heap_extra_szB = 0; // Live heap extra size -- slop + admin bytes
284 // allocated/deallocated amount; includes heap, heap-admin and stack
288 // When running with --heap=yes --pages-as-heap=no, we don't start taking
296 // When running with --heap=yes --pages-as-heap=yes, snapshots start much
429 if VG_BOOL_CLO(arg, "--heap", clo_heap) {}
430 else if VG_BINT_CLO(arg, "--heap-admin", clo_heap_admin, 0, 1024) {}
434 else if VG_BOOL_CLO(arg, "--pages-as-heap", clo_pages_as_heap) {}
473 " --heap=no|yes profile heap blocks [yes]\n"
474 " --heap-admin=<size> average admin bytes per heap block;\n"
475 " ignored if --heap=no [8]\n"
477 " --pages-as-heap=no|yes profile memory at the page level [no]\n"
480 " --ignore-fn=<name> ignore heap allocations within <name> [empty]\n"
484 " or heap bytes alloc'd/dealloc'd [i]\n"
505 // the heap are represented by a single XTree.
602 static Addr hp = 0; // current heap pointer
790 // Sanity checking: we periodically check the heap XTree with
1065 SizeT heap_extra_szB;// Heap slop + admin bytes.
1067 SXPt* alloc_sxpt; // Heap XTree root, if a detailed snapshot,
1121 // This zeroes all the fields in the snapshot, but does not free the heap
1136 // This zeroes all the fields in the snapshot, and frees the heap XTree if
1350 // Heap and heap admin.
1501 //--- Heap management ---//
1504 // Metadata for heap blocks. Each one contains a pointer to a bottom-XPt,
1563 // Update heap stats.
1634 // Update heap stats.
1654 // Actually free the chunk, and the heap block (if necessary)
1661 // could end up with negative heap sizes. This isn't a danger if we are
1682 tl_assert(!clo_pages_as_heap); // Shouldn't be here if --pages-as-heap=yes.
1756 // Update heap stats.
2141 : "(heap allocation functions) malloc/new/new[], --alloc-fns, etc."
2261 // Detailed snapshot -- print heap tree.
2354 STATS("heap allocs: %u\n", n_heap_allocs);
2355 STATS("heap reallocs: %u\n", n_heap_reallocs);
2356 STATS("heap frees: %u\n", n_heap_frees);
2357 STATS("ignored heap allocs: %u\n", n_ignored_heap_allocs);
2358 STATS("ignored heap frees: %u\n", n_ignored_heap_frees);
2359 STATS("ignored heap reallocs: %u\n", n_ignored_heap_reallocs);
2394 "--pages-as-heap=yes together with --stacks=yes", "");
2401 // If --pages-as-heap=yes we don't want malloc replacement to occur. So we
2408 clo_heap_admin = 0; // No heap admin on pages.
2486 VG_(details_description) ("a heap profiler");