• Home
  • Raw
  • Download

Lines Matching full:stats

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