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

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

Issue 8632007: A deeper heap profile dumper in third_party/tcmalloc/chromium. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: ready for review. Created 8 years, 10 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // FillOrderedProfile and IterateOrderedAllocContexts will contain mmap'ed 186 // FillOrderedProfile and IterateOrderedAllocContexts will contain mmap'ed
187 // memory regions as at calling RefreshMMapData. 187 // memory regions as at calling RefreshMMapData.
188 void RefreshMMapData(); 188 void RefreshMMapData();
189 189
190 // Clear the internal mmap information. Results of FillOrderedProfile and 190 // Clear the internal mmap information. Results of FillOrderedProfile and
191 // IterateOrderedAllocContexts won't contain mmap'ed memory regions after 191 // IterateOrderedAllocContexts won't contain mmap'ed memory regions after
192 // calling ClearMMapData. 192 // calling ClearMMapData.
193 void ClearMMapData(); 193 void ClearMMapData();
194 194
195 private: 195 private:
196 friend class DeepHeapProfile;
196 197
197 // data types ---------------------------- 198 // data types ----------------------------
198 199
199 // Hash table bucket to hold (de)allocation stats 200 // Hash table bucket to hold (de)allocation stats
200 // for a given allocation call stack trace. 201 // for a given allocation call stack trace.
201 struct Bucket : public Stats { 202 struct Bucket : public Stats {
202 uintptr_t hash; // Hash value of the stack trace 203 uintptr_t hash; // Hash value of the stack trace
203 int depth; // Depth of stack trace 204 int depth; // Depth of stack trace
204 const void** stack; // Stack trace 205 const void** stack; // Stack trace
205 Bucket* next; // Next entry in hash-table 206 Bucket* next; // Next entry in hash-table
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Helpers for sorting and generating leak reports 409 // Helpers for sorting and generating leak reports
409 struct Entry; 410 struct Entry;
410 struct ReportState; 411 struct ReportState;
411 static void ReportCallback(const void* ptr, AllocValue* v, ReportState*); 412 static void ReportCallback(const void* ptr, AllocValue* v, ReportState*);
412 static void ReportObject(const void* ptr, AllocValue* v, char*); 413 static void ReportObject(const void* ptr, AllocValue* v, char*);
413 414
414 DISALLOW_COPY_AND_ASSIGN(Snapshot); 415 DISALLOW_COPY_AND_ASSIGN(Snapshot);
415 }; 416 };
416 417
417 #endif // BASE_HEAP_PROFILE_TABLE_H_ 418 #endif // BASE_HEAP_PROFILE_TABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698