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

Side by Side Diff: base/trace_event/memory_allocator_dump.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/memory_allocator_dump.h" 5 #include "base/trace_event/memory_allocator_dump.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/trace_event/memory_dump_manager.h" 9 #include "base/trace_event/memory_dump_manager.h"
10 #include "base/trace_event/memory_dump_provider.h" 10 #include "base/trace_event/memory_dump_provider.h"
11 #include "base/trace_event/process_memory_dump.h" 11 #include "base/trace_event/process_memory_dump.h"
12 #include "base/trace_event/trace_event_argument.h" 12 #include "base/trace_event/trace_event_argument.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 14
15 namespace base { 15 namespace base {
16 namespace trace_event { 16 namespace trace_event {
17 17
18 const char MemoryAllocatorDump::kNameSize[] = "size"; 18 const char MemoryAllocatorDump::kNameSize[] = "size";
19 const char MemoryAllocatorDump::kNameObjectsCount[] = "objects_count"; 19 const char MemoryAllocatorDump::kNameObjectCount[] = "object_count";
20 const char MemoryAllocatorDump::kTypeScalar[] = "scalar"; 20 const char MemoryAllocatorDump::kTypeScalar[] = "scalar";
21 const char MemoryAllocatorDump::kTypeString[] = "string"; 21 const char MemoryAllocatorDump::kTypeString[] = "string";
22 const char MemoryAllocatorDump::kUnitsBytes[] = "bytes"; 22 const char MemoryAllocatorDump::kUnitsBytes[] = "bytes";
23 const char MemoryAllocatorDump::kUnitsObjects[] = "objects"; 23 const char MemoryAllocatorDump::kUnitsObjects[] = "objects";
24 24
25 MemoryAllocatorDump::MemoryAllocatorDump(const std::string& absolute_name, 25 MemoryAllocatorDump::MemoryAllocatorDump(const std::string& absolute_name,
26 ProcessMemoryDump* process_memory_dump, 26 ProcessMemoryDump* process_memory_dump,
27 const MemoryAllocatorDumpGuid& guid) 27 const MemoryAllocatorDumpGuid& guid)
28 : absolute_name_(absolute_name), 28 : absolute_name_(absolute_name),
29 process_memory_dump_(process_memory_dump), 29 process_memory_dump_(process_memory_dump),
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 void MemoryAllocatorDump::AsValueInto(TracedValue* value) const { 93 void MemoryAllocatorDump::AsValueInto(TracedValue* value) const {
94 value->BeginDictionaryWithCopiedName(absolute_name_); 94 value->BeginDictionaryWithCopiedName(absolute_name_);
95 value->SetString("guid", guid_.ToString()); 95 value->SetString("guid", guid_.ToString());
96 value->SetValue("attrs", *attributes_); 96 value->SetValue("attrs", *attributes_);
97 value->EndDictionary(); // "allocator_name/heap_subheap": { ... } 97 value->EndDictionary(); // "allocator_name/heap_subheap": { ... }
98 } 98 }
99 99
100 } // namespace trace_event 100 } // namespace trace_event
101 } // namespace base 101 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/memory_allocator_dump.h ('k') | base/trace_event/memory_allocator_dump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698