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 ccf2729c557f660e3b675def1393449be60564dd..ea614b40d326083d246d1772dbc40fd1807f4323 100644 |
--- a/content/common/discardable_shared_memory_heap.cc |
+++ b/content/common/discardable_shared_memory_heap.cc |
@@ -396,6 +396,18 @@ void DiscardableSharedMemoryHeap::OnMemoryDump( |
base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
static_cast<uint64_t>(allocated_objects_size_in_bytes)); |
+ // Total size of discardable memory segments locked by the clients. |
+ const size_t locked_size = shared_memory->LockedSize(); |
+ obj_dump->AddScalar("client_locked_size", |
reveman
2015/09/29 12:29:10
I think it will be enough to dump the exact locked
ssid
2015/09/29 16:03:55
Sounds good.
|
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
+ locked_size); |
+ |
+ // Size of the discardable segment actually locked by the platform |
+ // independent lock. |
+ obj_dump->AddScalar("actual_locked_size", |
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
+ locked_size ? size : 0u); |
+ |
// Emit an ownership edge towards a global allocator dump node. This allows |
// 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 |