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

Side by Side Diff: base/trace_event/winheap_dump_provider_win.cc

Issue 1334673004: Memory-infra: Change "objects_count" to "object_count" in category name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@locked_discarded_20150910
Patch Set: Rebased Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/winheap_dump_provider_win.h" 5 #include "base/trace_event/winheap_dump_provider_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/debug/profiler.h" 9 #include "base/debug/profiler.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 17 matching lines...) Expand all
28 MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump(DUMP_ROOT_NAME); 28 MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump(DUMP_ROOT_NAME);
29 outer_dump->AddScalar(MemoryAllocatorDump::kNameSize, 29 outer_dump->AddScalar(MemoryAllocatorDump::kNameSize,
30 MemoryAllocatorDump::kUnitsBytes, 30 MemoryAllocatorDump::kUnitsBytes,
31 heap_info.committed_size); 31 heap_info.committed_size);
32 32
33 MemoryAllocatorDump* inner_dump = 33 MemoryAllocatorDump* inner_dump =
34 pmd->CreateAllocatorDump(WinHeapDumpProvider::kAllocatedObjects); 34 pmd->CreateAllocatorDump(WinHeapDumpProvider::kAllocatedObjects);
35 inner_dump->AddScalar(MemoryAllocatorDump::kNameSize, 35 inner_dump->AddScalar(MemoryAllocatorDump::kNameSize,
36 MemoryAllocatorDump::kUnitsBytes, 36 MemoryAllocatorDump::kUnitsBytes,
37 heap_info.allocated_size); 37 heap_info.allocated_size);
38 inner_dump->AddScalar(MemoryAllocatorDump::kNameObjectsCount, 38 inner_dump->AddScalar(MemoryAllocatorDump::kNameObjectCount,
39 MemoryAllocatorDump::kUnitsObjects, 39 MemoryAllocatorDump::kUnitsObjects,
40 heap_info.block_count); 40 heap_info.block_count);
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 WinHeapDumpProvider* WinHeapDumpProvider::GetInstance() { 45 WinHeapDumpProvider* WinHeapDumpProvider::GetInstance() {
46 return Singleton<WinHeapDumpProvider, 46 return Singleton<WinHeapDumpProvider,
47 LeakySingletonTraits<WinHeapDumpProvider>>::get(); 47 LeakySingletonTraits<WinHeapDumpProvider>>::get();
48 } 48 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } else if ((heap_entry.wFlags & PROCESS_HEAP_REGION) != 0) { 120 } else if ((heap_entry.wFlags & PROCESS_HEAP_REGION) != 0) {
121 heap_info->committed_size += heap_entry.Region.dwCommittedSize; 121 heap_info->committed_size += heap_entry.Region.dwCommittedSize;
122 } 122 }
123 } 123 }
124 CHECK(::HeapUnlock(heap_info->heap_id) == TRUE); 124 CHECK(::HeapUnlock(heap_info->heap_id) == TRUE);
125 return true; 125 return true;
126 } 126 }
127 127
128 } // namespace trace_event 128 } // namespace trace_event
129 } // namespace base 129 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_memory_overhead.cc ('k') | content/common/discardable_shared_memory_heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698