Lines Matching full:stats

43   Printf("Stats: %zuM malloced (%zuM for overhead) by %zu calls\n",  in Print()
45 Printf("Stats: %zuM realloced by %zu calls\n", realloced >> 20, reallocs); in Print()
46 Printf("Stats: %zuM freed by %zu calls\n", freed >> 20, frees); in Print()
47 Printf("Stats: %zuM really freed by %zu calls\n", really_freed >> 20, in Print()
49 Printf("Stats: %zuM (%zuM-%zuM) mmaped; %zu maps, %zu unmaps\n", in Print()
54 Printf("Stats: malloc large: %zu\n", malloc_large); in Print()
57 void MemprofStats::MergeFrom(const MemprofStats *stats) { in MergeFrom() argument
59 const uptr *src_ptr = reinterpret_cast<const uptr *>(stats); in MergeFrom()
78 accumulated_stats->MergeFrom(&t->stats()); in MergeThreadStats()
81 static void GetAccumulatedStats(MemprofStats *stats) { in GetAccumulatedStats() argument
82 stats->Clear(); in GetAccumulatedStats()
86 stats); in GetAccumulatedStats()
88 stats->MergeFrom(&unknown_thread_stats); in GetAccumulatedStats()
91 stats->MergeFrom(&dead_threads_stats); in GetAccumulatedStats()
96 if (max_malloced_memory < stats->malloced) { in GetAccumulatedStats()
97 max_malloced_memory = stats->malloced; in GetAccumulatedStats()
101 void FlushToDeadThreadStats(MemprofStats *stats) { in FlushToDeadThreadStats() argument
103 dead_threads_stats.MergeFrom(stats); in FlushToDeadThreadStats()
104 stats->Clear(); in FlushToDeadThreadStats()
109 return (t) ? t->stats() : unknown_thread_stats; in GetCurrentThreadStats()
113 MemprofStats stats; in PrintAccumulatedStats() local
114 GetAccumulatedStats(&stats); in PrintAccumulatedStats()
117 stats.Print(); in PrintAccumulatedStats()
119 Printf("Stats: StackDepot: %zd ids; %zdM allocated\n", in PrintAccumulatedStats()
130 MemprofStats stats; in __sanitizer_get_current_allocated_bytes() local
131 GetAccumulatedStats(&stats); in __sanitizer_get_current_allocated_bytes()
132 uptr malloced = stats.malloced; in __sanitizer_get_current_allocated_bytes()
133 uptr freed = stats.freed; in __sanitizer_get_current_allocated_bytes()
135 // way we update accumulated stats. in __sanitizer_get_current_allocated_bytes()
140 MemprofStats stats; in __sanitizer_get_heap_size() local
141 GetAccumulatedStats(&stats); in __sanitizer_get_heap_size()
142 return stats.mmaped - stats.munmaped; in __sanitizer_get_heap_size()
146 MemprofStats stats; in __sanitizer_get_free_bytes() local
147 GetAccumulatedStats(&stats); in __sanitizer_get_free_bytes()
148 uptr total_free = stats.mmaped - stats.munmaped + stats.really_freed; in __sanitizer_get_free_bytes()
149 uptr total_used = stats.malloced; in __sanitizer_get_free_bytes()
151 // way we update accumulated stats. in __sanitizer_get_free_bytes()