Lines Matching refs:stats
62 void AsanStats::MergeFrom(const AsanStats *stats) { in MergeFrom() argument
64 const uptr *src_ptr = reinterpret_cast<const uptr*>(stats); in MergeFrom()
83 accumulated_stats->MergeFrom(&t->stats()); in MergeThreadStats()
86 static void GetAccumulatedStats(AsanStats *stats) { in GetAccumulatedStats() argument
87 stats->Clear(); in GetAccumulatedStats()
91 .RunCallbackForEachThreadLocked(MergeThreadStats, stats); in GetAccumulatedStats()
93 stats->MergeFrom(&unknown_thread_stats); in GetAccumulatedStats()
96 stats->MergeFrom(&dead_threads_stats); in GetAccumulatedStats()
101 if (max_malloced_memory < stats->malloced) { in GetAccumulatedStats()
102 max_malloced_memory = stats->malloced; in GetAccumulatedStats()
106 void FlushToDeadThreadStats(AsanStats *stats) { in FlushToDeadThreadStats() argument
108 dead_threads_stats.MergeFrom(stats); in FlushToDeadThreadStats()
109 stats->Clear(); in FlushToDeadThreadStats()
113 AsanStats stats; in FillMallocStatistics() local
114 GetAccumulatedStats(&stats); in FillMallocStatistics()
115 malloc_stats->blocks_in_use = stats.mallocs; in FillMallocStatistics()
116 malloc_stats->size_in_use = stats.malloced; in FillMallocStatistics()
118 malloc_stats->size_allocated = stats.mmaped; in FillMallocStatistics()
123 return (t) ? t->stats() : unknown_thread_stats; in GetCurrentThreadStats()
127 AsanStats stats; in PrintAccumulatedStats() local
128 GetAccumulatedStats(&stats); in PrintAccumulatedStats()
131 stats.Print(); in PrintAccumulatedStats()
144 AsanStats stats; in __sanitizer_get_current_allocated_bytes() local
145 GetAccumulatedStats(&stats); in __sanitizer_get_current_allocated_bytes()
146 uptr malloced = stats.malloced; in __sanitizer_get_current_allocated_bytes()
147 uptr freed = stats.freed; in __sanitizer_get_current_allocated_bytes()
154 AsanStats stats; in __sanitizer_get_heap_size() local
155 GetAccumulatedStats(&stats); in __sanitizer_get_heap_size()
156 return stats.mmaped - stats.munmaped; in __sanitizer_get_heap_size()
160 AsanStats stats; in __sanitizer_get_free_bytes() local
161 GetAccumulatedStats(&stats); in __sanitizer_get_free_bytes()
162 uptr total_free = stats.mmaped in __sanitizer_get_free_bytes()
163 - stats.munmaped in __sanitizer_get_free_bytes()
164 + stats.really_freed in __sanitizer_get_free_bytes()
165 + stats.really_freed_redzones; in __sanitizer_get_free_bytes()
166 uptr total_used = stats.malloced in __sanitizer_get_free_bytes()
167 + stats.malloced_redzones; in __sanitizer_get_free_bytes()