Lines Matching defs:stats
44 Printf("Stats: %zuM malloced (%zuM for red zones) by %zu calls\n",
46 Printf("Stats: %zuM realloced by %zu calls\n", realloced>>20, reallocs);
47 Printf("Stats: %zuM freed by %zu calls\n", freed>>20, frees);
48 Printf("Stats: %zuM really freed by %zu calls\n",
50 Printf("Stats: %zuM (%zuM-%zuM) mmaped; %zu maps, %zu unmaps\n",
55 Printf("Stats: malloc large: %zu\n", malloc_large);
58 void AsanStats::MergeFrom(const AsanStats *stats) {
60 const uptr *src_ptr = reinterpret_cast<const uptr*>(stats);
79 accumulated_stats->MergeFrom(&t->stats());
82 static void GetAccumulatedStats(AsanStats *stats) {
83 stats->Clear();
87 .RunCallbackForEachThreadLocked(MergeThreadStats, stats);
89 stats->MergeFrom(&unknown_thread_stats);
92 stats->MergeFrom(&dead_threads_stats);
97 if (max_malloced_memory < stats->malloced) {
98 max_malloced_memory = stats->malloced;
102 void FlushToDeadThreadStats(AsanStats *stats) {
104 dead_threads_stats.MergeFrom(stats);
105 stats->Clear();
109 AsanStats stats;
110 GetAccumulatedStats(&stats);
111 malloc_stats->blocks_in_use = stats.mallocs;
112 malloc_stats->size_in_use = stats.malloced;
114 malloc_stats->size_allocated = stats.mmaped;
119 return (t) ? t->stats() : unknown_thread_stats;
123 AsanStats stats;
124 GetAccumulatedStats(&stats);
127 stats.Print();
129 Printf("Stats: StackDepot: %zd ids; %zdM allocated\n",
140 AsanStats stats;
141 GetAccumulatedStats(&stats);
142 uptr malloced = stats.malloced;
143 uptr freed = stats.freed;
145 // way we update accumulated stats.
150 AsanStats stats;
151 GetAccumulatedStats(&stats);
152 return stats.mmaped - stats.munmaped;
156 AsanStats stats;
157 GetAccumulatedStats(&stats);
158 uptr total_free = stats.mmaped
159 - stats.munmaped
160 + stats.really_freed;
161 uptr total_used = stats.malloced
162 + stats.malloced_redzones;
164 // way we update accumulated stats.