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

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

Issue 9963095: Reserve a dedicated arena for every construction of mmap_address_map. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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) 2006, Google Inc. 1 // Copyright (c) 2006, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // Return a snapshot of every non-live, non-ignored object in *this. 184 // Return a snapshot of every non-live, non-ignored object in *this.
185 // If "base" is non-NULL, skip any objects present in "base". 185 // If "base" is non-NULL, skip any objects present in "base".
186 // As a side-effect, clears the "live" bit on every live object in *this. 186 // As a side-effect, clears the "live" bit on every live object in *this.
187 // Caller must call ReleaseSnapshot() on result when no longer needed. 187 // Caller must call ReleaseSnapshot() on result when no longer needed.
188 Snapshot* NonLiveSnapshot(Snapshot* base); 188 Snapshot* NonLiveSnapshot(Snapshot* base);
189 189
190 // Refresh the internal mmap information from MemoryRegionMap. Results of 190 // Refresh the internal mmap information from MemoryRegionMap. Results of
191 // FillOrderedProfile and IterateOrderedAllocContexts will contain mmap'ed 191 // FillOrderedProfile and IterateOrderedAllocContexts will contain mmap'ed
192 // memory regions as at calling RefreshMMapData. 192 // memory regions as at calling RefreshMMapData.
193 void RefreshMMapData(); 193 void RefreshMMapData(Allocator mmap_alloc, DeAllocator mmap_dealloc);
194 194
195 // Clear the internal mmap information. Results of FillOrderedProfile and 195 // Clear the internal mmap information. Results of FillOrderedProfile and
196 // IterateOrderedAllocContexts won't contain mmap'ed memory regions after 196 // IterateOrderedAllocContexts won't contain mmap'ed memory regions after
197 // calling ClearMMapData. 197 // calling ClearMMapData.
198 void ClearMMapData(); 198 void ClearMMapData(DeAllocator mmap_dealloc);
199 199
200 private: 200 private:
201 friend class DeepHeapProfile; 201 friend class DeepHeapProfile;
202 202
203 // data types ---------------------------- 203 // data types ----------------------------
204 204
205 // Hash table bucket to hold (de)allocation stats 205 // Hash table bucket to hold (de)allocation stats
206 // for a given allocation call stack trace. 206 // for a given allocation call stack trace.
207 struct Bucket : public Stats { 207 struct Bucket : public Stats {
208 uintptr_t hash; // Hash value of the stack trace 208 uintptr_t hash; // Hash value of the stack trace
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // Helpers for sorting and generating leak reports 414 // Helpers for sorting and generating leak reports
415 struct Entry; 415 struct Entry;
416 struct ReportState; 416 struct ReportState;
417 static void ReportCallback(const void* ptr, AllocValue* v, ReportState*); 417 static void ReportCallback(const void* ptr, AllocValue* v, ReportState*);
418 static void ReportObject(const void* ptr, AllocValue* v, char*); 418 static void ReportObject(const void* ptr, AllocValue* v, char*);
419 419
420 DISALLOW_COPY_AND_ASSIGN(Snapshot); 420 DISALLOW_COPY_AND_ASSIGN(Snapshot);
421 }; 421 };
422 422
423 #endif // BASE_HEAP_PROFILE_TABLE_H_ 423 #endif // BASE_HEAP_PROFILE_TABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698