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

Unified Diff: content/common/discardable_shared_memory_heap.cc

Issue 1583483002: [tracing] Add method to create "weak" global dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/common/discardable_shared_memory_heap.cc
diff --git a/content/common/discardable_shared_memory_heap.cc b/content/common/discardable_shared_memory_heap.cc
index 263f83b24ade3e4b2e910681d8446baa7546e4fc..85433b4cb83685fd1f8d9700001d107102e3eeae 100644
--- a/content/common/discardable_shared_memory_heap.cc
+++ b/content/common/discardable_shared_memory_heap.cc
@@ -418,12 +418,14 @@ void DiscardableSharedMemoryHeap::OnMemoryDump(
// to avoid double-counting segments when both browser and child process emit
// them. In the special case of single-process-mode, this will be the only
// dumper active and the single ownership edge will become a no-op in the UI.
+ // The global dump is created as weak dump so that the segment is removed if
petrcermak 2016/01/18 11:23:47 nit: s/weak dump/a weak dump/
ssid 2016/01/18 16:28:36 Done.
+ // the browser does not dump it (segment was purged).
const uint64_t tracing_process_id =
base::trace_event::MemoryDumpManager::GetInstance()
->GetTracingProcessId();
base::trace_event::MemoryAllocatorDumpGuid shared_segment_guid =
GetSegmentGUIDForTracing(tracing_process_id, segment_id);
- pmd->CreateSharedGlobalAllocatorDump(shared_segment_guid);
+ pmd->CreateWeakSharedGlobalAllocatorDump(shared_segment_guid);
// The size is added to the global dump so that it gets propagated to both the
// dumps associated.

Powered by Google App Engine
This is Rietveld 408576698