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

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 9 years 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // Refresh the mmap hash table and the allocated object map from 184 // Refresh the mmap hash table and the allocated object map from
185 // MemoryRegionMap. 185 // MemoryRegionMap.
186 void RefreshMMapData(); 186 void RefreshMMapData();
187 187
188 // Clear the mmap hash table and remove the allocated object map. 188 // Clear the mmap hash table and remove the allocated object map.
189 // It doesn't remove the mmap hash table, but does clear sizes in buckets 189 // It doesn't remove the mmap hash table, but does clear sizes in buckets
190 // into zero. 190 // into zero.
191 void ClearMMapData(); 191 void ClearMMapData();
192 192
193 private: 193 private:
194 friend class DeepHeapProfile;
194 195
195 // data types ---------------------------- 196 // data types ----------------------------
196 197
197 // Hash table bucket to hold (de)allocation stats 198 // Hash table bucket to hold (de)allocation stats
198 // for a given allocation call stack trace. 199 // for a given allocation call stack trace.
199 struct Bucket : public Stats { 200 struct Bucket : public Stats {
200 uintptr_t hash; // Hash value of the stack trace 201 uintptr_t hash; // Hash value of the stack trace
201 int depth; // Depth of stack trace 202 int depth; // Depth of stack trace
202 const void** stack; // Stack trace 203 const void** stack; // Stack trace
203 Bucket* next; // Next entry in hash-table 204 Bucket* next; // Next entry in hash-table
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // Helpers for sorting and generating leak reports 402 // Helpers for sorting and generating leak reports
402 struct Entry; 403 struct Entry;
403 struct ReportState; 404 struct ReportState;
404 static void ReportCallback(const void* ptr, AllocValue* v, ReportState*); 405 static void ReportCallback(const void* ptr, AllocValue* v, ReportState*);
405 static void ReportObject(const void* ptr, AllocValue* v, char*); 406 static void ReportObject(const void* ptr, AllocValue* v, char*);
406 407
407 DISALLOW_COPY_AND_ASSIGN(Snapshot); 408 DISALLOW_COPY_AND_ASSIGN(Snapshot);
408 }; 409 };
409 410
410 #endif // BASE_HEAP_PROFILE_TABLE_H_ 411 #endif // BASE_HEAP_PROFILE_TABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698