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

Side by Side Diff: base/trace_event/trace_event_memory_overhead.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/trace_event_memory_overhead.h" 5 #include "base/trace_event/trace_event_memory_overhead.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bits.h" 9 #include "base/bits.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void TraceEventMemoryOverhead::DumpInto(const char* base_name, 140 void TraceEventMemoryOverhead::DumpInto(const char* base_name,
141 ProcessMemoryDump* pmd) const { 141 ProcessMemoryDump* pmd) const {
142 for (const auto& it : allocated_objects_) { 142 for (const auto& it : allocated_objects_) {
143 std::string dump_name = StringPrintf("%s/%s", base_name, it.first); 143 std::string dump_name = StringPrintf("%s/%s", base_name, it.first);
144 MemoryAllocatorDump* mad = pmd->CreateAllocatorDump(dump_name); 144 MemoryAllocatorDump* mad = pmd->CreateAllocatorDump(dump_name);
145 mad->AddScalar(MemoryAllocatorDump::kNameSize, 145 mad->AddScalar(MemoryAllocatorDump::kNameSize,
146 MemoryAllocatorDump::kUnitsBytes, 146 MemoryAllocatorDump::kUnitsBytes,
147 it.second.allocated_size_in_bytes); 147 it.second.allocated_size_in_bytes);
148 mad->AddScalar("resident_size", MemoryAllocatorDump::kUnitsBytes, 148 mad->AddScalar("resident_size", MemoryAllocatorDump::kUnitsBytes,
149 it.second.resident_size_in_bytes); 149 it.second.resident_size_in_bytes);
150 mad->AddScalar(MemoryAllocatorDump::kNameObjectsCount, 150 mad->AddScalar(MemoryAllocatorDump::kNameObjectCount,
151 MemoryAllocatorDump::kUnitsObjects, it.second.count); 151 MemoryAllocatorDump::kUnitsObjects, it.second.count);
152 } 152 }
153 } 153 }
154 154
155 } // namespace trace_event 155 } // namespace trace_event
156 } // namespace base 156 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/memory_allocator_dump_unittest.cc ('k') | base/trace_event/winheap_dump_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698