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

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: Refactored. Created 8 years, 11 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Release a previously taken snapshot. snapshot must not 175 // Release a previously taken snapshot. snapshot must not
176 // be used after this call. 176 // be used after this call.
177 void ReleaseSnapshot(Snapshot* snapshot); 177 void ReleaseSnapshot(Snapshot* snapshot);
178 178
179 // Return a snapshot of every non-live, non-ignored object in *this. 179 // Return a snapshot of every non-live, non-ignored object in *this.
180 // If "base" is non-NULL, skip any objects present in "base". 180 // If "base" is non-NULL, skip any objects present in "base".
181 // As a side-effect, clears the "live" bit on every live object in *this. 181 // As a side-effect, clears the "live" bit on every live object in *this.
182 // Caller must call ReleaseSnapshot() on result when no longer needed. 182 // Caller must call ReleaseSnapshot() on result when no longer needed.
183 Snapshot* NonLiveSnapshot(Snapshot* base); 183 Snapshot* NonLiveSnapshot(Snapshot* base);
184 184
185 // Refresh the internal mmap information from MemoryRegionMap. Results of 185 // Refresh the internal mmap information from MemoryRegionMap. Results of
jar (doing other things) 2012/01/26 20:19:02 nit: "Refresh ..." --> "Refreshes ..."
Dai Mikurube (NOT FULLTIME) 2012/01/30 12:54:53 Thanks for your comments. Hmm, it's sure that the
186 // FillOrderedProfile and IterateOrderedAllocContexts will contain mmap'ed 186 // FillOrderedProfile and IterateOrderedAllocContexts will contain mmap'ed
jar (doing other things) 2012/01/26 20:19:02 nit: "...will contain ..." --> "Updates ... to con
Dai Mikurube (NOT FULLTIME) 2012/01/30 12:54:53 Ditto, but thanks for a good alternative. I'll co
187 // memory regions as at calling RefreshMMapData. 187 // memory regions as at calling RefreshMMapData.
jar (doing other things) 2012/01/26 20:19:02 nit: typo? "...as at calling ..."
Dai Mikurube (NOT FULLTIME) 2012/01/30 12:54:53 Ditto.
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
jar (doing other things) 2012/01/26 20:19:02 nit: "Clear ..." --> "Clears ..."
Dai Mikurube (NOT FULLTIME) 2012/01/30 12:54:53 Ditto.
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.
jar (doing other things) 2012/01/26 20:19:02 nit suggestion: Change "Results of ... won't conta
Dai Mikurube (NOT FULLTIME) 2012/01/30 12:54:53 Ditto.
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
« no previous file with comments | « third_party/tcmalloc/chromium/src/deep-heap-profile.cc ('k') | third_party/tcmalloc/chromium/src/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698