OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // --- | 5 // --- |
6 // Author: Sainbayar Sukhbaatar | 6 // Author: Sainbayar Sukhbaatar |
7 // Dai Mikurube | 7 // Dai Mikurube |
8 // | 8 // |
9 // This file contains a class DeepHeapProfile and its public function | 9 // This file contains a class DeepHeapProfile and its public function |
10 // DeepHeapProfile::FillOrderedProfile() which works as an alternative of | 10 // DeepHeapProfile::FillOrderedProfile() which works as an alternative of |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 // Returns the number of resident (including swapped) bytes of the memory | 193 // Returns the number of resident (including swapped) bytes of the memory |
194 // region starting at |first_address| and ending at |last_address| inclusive. | 194 // region starting at |first_address| and ending at |last_address| inclusive. |
195 static size_t GetCommittedSize(int pagemap_fd, | 195 static size_t GetCommittedSize(int pagemap_fd, |
196 uint64 first_address, | 196 uint64 first_address, |
197 uint64 last_address); | 197 uint64 last_address); |
198 | 198 |
199 // Write re-formatted /proc/self/maps into a file which has |filename_prefix| | 199 // Write re-formatted /proc/self/maps into a file which has |filename_prefix| |
200 // with using |buffer| of size |buffer_size|. | 200 // with using |buffer| of size |buffer_size|. |
201 static void WriteMapsToFile(const char* filename_prefix, | 201 static void WriteMapsToFile(const char* filename_prefix, |
| 202 unsigned count, |
202 int buffer_size, | 203 int buffer_size, |
203 char buffer[]); | 204 char buffer[]); |
204 | 205 |
205 // Compute the global statistics from /proc/self/maps and |pagemap_fd|, and | 206 // Compute the global statistics from /proc/self/maps and |pagemap_fd|, and |
206 // store the statistics in |stats|. | 207 // store the statistics in |stats|. |
207 static void SnapshotGlobalStatsWithoutMalloc(int pagemap_fd, | 208 static void SnapshotGlobalStatsWithoutMalloc(int pagemap_fd, |
208 GlobalStats* stats, | 209 GlobalStats* stats, |
209 MMapListEntry* mmap_list, | 210 MMapListEntry* mmap_list, |
210 int mmap_list_length); | 211 int mmap_list_length); |
211 | 212 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 int mmap_list_length_; | 298 int mmap_list_length_; |
298 int num_mmap_allocations_; | 299 int num_mmap_allocations_; |
299 #endif // DEEP_HEAP_PROFILE | 300 #endif // DEEP_HEAP_PROFILE |
300 | 301 |
301 HeapProfileTable* heap_profile_; | 302 HeapProfileTable* heap_profile_; |
302 | 303 |
303 DISALLOW_COPY_AND_ASSIGN(DeepHeapProfile); | 304 DISALLOW_COPY_AND_ASSIGN(DeepHeapProfile); |
304 }; | 305 }; |
305 | 306 |
306 #endif // BASE_DEEP_HEAP_PROFILE_H_ | 307 #endif // BASE_DEEP_HEAP_PROFILE_H_ |
OLD | NEW |