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

Unified Diff: third_party/tcmalloc/chromium/src/heap-profiler.cc

Issue 10541026: Add support for dump allocations created in a certain time window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tcmalloc/chromium/src/heap-profile-table.cc ('k') | tools/tcmalloc/print-live-objects.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/heap-profiler.cc
diff --git a/third_party/tcmalloc/chromium/src/heap-profiler.cc b/third_party/tcmalloc/chromium/src/heap-profiler.cc
index 73f31f743f6146a6108b75c2ef0b2f8a821e4e4e..1c5fcf088e297739303d400da5f3d198bff7087b 100644
--- a/third_party/tcmalloc/chromium/src/heap-profiler.cc
+++ b/third_party/tcmalloc/chromium/src/heap-profiler.cc
@@ -601,6 +601,30 @@ extern "C" void HeapProfilerDump(const char* reason) {
}
}
+extern "C" void HeapProfilerMarkBaseline() {
+ SpinLockHolder l(&heap_lock);
+
+ if (!is_on) return;
+
+ heap_profile->MarkCurrentAllocations(HeapProfileTable::MARK_ONE);
+}
+
+extern "C" void HeapProfilerMarkInteresting() {
+ SpinLockHolder l(&heap_lock);
+
+ if (!is_on) return;
+
+ heap_profile->MarkUnmarkedAllocations(HeapProfileTable::MARK_TWO);
+}
+
+extern "C" void HeapProfilerDumpAliveObjects(const char* filename) {
+ SpinLockHolder l(&heap_lock);
+
+ if (!is_on) return;
+
+ heap_profile->DumpMarkedObjects(HeapProfileTable::MARK_TWO, filename);
+}
+
//----------------------------------------------------------------------
// Initialization/finalization code
//----------------------------------------------------------------------
« no previous file with comments | « third_party/tcmalloc/chromium/src/heap-profile-table.cc ('k') | tools/tcmalloc/print-live-objects.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698