Lines Matching full:stats

43   Printf("Stats: %zuM malloced (%zuM for red zones) 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", 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 AsanStats::MergeFrom(const AsanStats *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(AsanStats *stats) { in GetAccumulatedStats() argument
82 stats->Clear(); in GetAccumulatedStats()
86 .RunCallbackForEachThreadLocked(MergeThreadStats, 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(AsanStats *stats) { in FlushToDeadThreadStats() argument
103 dead_threads_stats.MergeFrom(stats); in FlushToDeadThreadStats()
104 stats->Clear(); in FlushToDeadThreadStats()
108 AsanStats stats; in FillMallocStatistics() local
109 GetAccumulatedStats(&stats); in FillMallocStatistics()
110 malloc_stats->blocks_in_use = stats.mallocs; in FillMallocStatistics()
111 malloc_stats->size_in_use = stats.malloced; in FillMallocStatistics()
113 malloc_stats->size_allocated = stats.mmaped; in FillMallocStatistics()
118 return (t) ? t->stats() : unknown_thread_stats; in GetCurrentThreadStats()
122 AsanStats stats; in PrintAccumulatedStats() local
123 GetAccumulatedStats(&stats); in PrintAccumulatedStats()
126 stats.Print(); in PrintAccumulatedStats()
128 Printf("Stats: StackDepot: %zd ids; %zdM allocated\n", in PrintAccumulatedStats()
139 AsanStats stats; in __sanitizer_get_current_allocated_bytes() local
140 GetAccumulatedStats(&stats); in __sanitizer_get_current_allocated_bytes()
141 uptr malloced = stats.malloced; in __sanitizer_get_current_allocated_bytes()
142 uptr freed = stats.freed; in __sanitizer_get_current_allocated_bytes()
144 // way we update accumulated stats. in __sanitizer_get_current_allocated_bytes()
149 AsanStats stats; in __sanitizer_get_heap_size() local
150 GetAccumulatedStats(&stats); in __sanitizer_get_heap_size()
151 return stats.mmaped - stats.munmaped; in __sanitizer_get_heap_size()
155 AsanStats stats; in __sanitizer_get_free_bytes() local
156 GetAccumulatedStats(&stats); in __sanitizer_get_free_bytes()
157 uptr total_free = stats.mmaped in __sanitizer_get_free_bytes()
158 - stats.munmaped in __sanitizer_get_free_bytes()
159 + stats.really_freed; in __sanitizer_get_free_bytes()
160 uptr total_used = stats.malloced in __sanitizer_get_free_bytes()
161 + stats.malloced_redzones; in __sanitizer_get_free_bytes()
163 // way we update accumulated stats. in __sanitizer_get_free_bytes()