Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Side by Side Diff: third_party/tcmalloc/chromium/src/deep-heap-profile.h

Issue 12575008: Dump stats of memory pages which are hooked, but absent from /proc/<pid>/maps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // 'committed_bytes' in the region from |first_adress| to |last_address| 223 // 'committed_bytes' in the region from |first_adress| to |last_address|
224 // inclusive. 224 // inclusive.
225 uint64 Record( 225 uint64 Record(
226 const MemoryResidenceInfoGetterInterface* memory_residence_info_getter, 226 const MemoryResidenceInfoGetterInterface* memory_residence_info_getter,
227 uint64 first_address, 227 uint64 first_address,
228 uint64 last_address); 228 uint64 last_address);
229 229
230 // Writes stats of the region into |buffer| with |name|. 230 // Writes stats of the region into |buffer| with |name|.
231 void Unparse(const char* name, TextBuffer* buffer); 231 void Unparse(const char* name, TextBuffer* buffer);
232 232
233 size_t virtual_bytes() const { return virtual_bytes_; }
233 size_t committed_bytes() const { return committed_bytes_; } 234 size_t committed_bytes() const { return committed_bytes_; }
234 void AddToVirtualBytes(size_t additional_virtual_bytes) { 235 void AddToVirtualBytes(size_t additional_virtual_bytes) {
235 virtual_bytes_ += additional_virtual_bytes; 236 virtual_bytes_ += additional_virtual_bytes;
236 } 237 }
237 void AddToCommittedBytes(size_t additional_committed_bytes) { 238 void AddToCommittedBytes(size_t additional_committed_bytes) {
238 committed_bytes_ += additional_committed_bytes; 239 committed_bytes_ += additional_committed_bytes;
239 } 240 }
240 void AddAnotherRegionStat(const RegionStats& other) { 241 void AddAnotherRegionStat(const RegionStats& other) {
241 virtual_bytes_ += other.virtual_bytes_; 242 virtual_bytes_ += other.virtual_bytes_;
242 committed_bytes_ += other.committed_bytes_; 243 committed_bytes_ += other.committed_bytes_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 303
303 DeepBucketTable deep_table_; 304 DeepBucketTable deep_table_;
304 #endif // DEEP_HEAP_PROFILE 305 #endif // DEEP_HEAP_PROFILE
305 306
306 HeapProfileTable* heap_profile_; 307 HeapProfileTable* heap_profile_;
307 308
308 DISALLOW_COPY_AND_ASSIGN(DeepHeapProfile); 309 DISALLOW_COPY_AND_ASSIGN(DeepHeapProfile);
309 }; 310 };
310 311
311 #endif // BASE_DEEP_HEAP_PROFILE_H_ 312 #endif // BASE_DEEP_HEAP_PROFILE_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/deep-heap-profile.cc » ('j') | tools/deep_memory_profiler/dmprof.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698