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.h

Issue 2545173002: [tracing] Remove MemoryAllocatorDump::process_memory_dump (Closed)
Patch Set: Fix include. Created 4 years 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
« no previous file with comments | « no previous file | components/sync/syncable/directory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_
6 #define BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ 6 #define BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void AddScalar(const char* name, const char* units, uint64_t value); 62 void AddScalar(const char* name, const char* units, uint64_t value);
63 void AddScalarF(const char* name, const char* units, double value); 63 void AddScalarF(const char* name, const char* units, double value);
64 void AddString(const char* name, const char* units, const std::string& value); 64 void AddString(const char* name, const char* units, const std::string& value);
65 65
66 // Absolute name, unique within the scope of an entire ProcessMemoryDump. 66 // Absolute name, unique within the scope of an entire ProcessMemoryDump.
67 const std::string& absolute_name() const { return absolute_name_; } 67 const std::string& absolute_name() const { return absolute_name_; }
68 68
69 // Called at trace generation time to populate the TracedValue. 69 // Called at trace generation time to populate the TracedValue.
70 void AsValueInto(TracedValue* value) const; 70 void AsValueInto(TracedValue* value) const;
71 71
72 // Get the ProcessMemoryDump instance that owns this.
73 ProcessMemoryDump* process_memory_dump() const {
74 return process_memory_dump_;
75 }
76
77 // Use enum Flags to set values. 72 // Use enum Flags to set values.
78 void set_flags(int flags) { flags_ |= flags; } 73 void set_flags(int flags) { flags_ |= flags; }
79 void clear_flags(int flags) { flags_ &= ~flags; } 74 void clear_flags(int flags) { flags_ &= ~flags; }
80 int flags() { return flags_; } 75 int flags() { return flags_; }
81 76
82 // |guid| is an optional global dump identifier, unique across all processes 77 // |guid| is an optional global dump identifier, unique across all processes
83 // within the scope of a global dump. It is only required when using the 78 // within the scope of a global dump. It is only required when using the
84 // graph APIs (see TODO_method_name) to express retention / suballocation or 79 // graph APIs (see TODO_method_name) to express retention / suballocation or
85 // cross process sharing. See crbug.com/492102 for design docs. 80 // cross process sharing. See crbug.com/492102 for design docs.
86 // Subsequent MemoryAllocatorDump(s) with the same |absolute_name| are 81 // Subsequent MemoryAllocatorDump(s) with the same |absolute_name| are
(...skipping 13 matching lines...) Expand all
100 // temporary strings on each AddScalar() call. 95 // temporary strings on each AddScalar() call.
101 std::string string_conversion_buffer_; 96 std::string string_conversion_buffer_;
102 97
103 DISALLOW_COPY_AND_ASSIGN(MemoryAllocatorDump); 98 DISALLOW_COPY_AND_ASSIGN(MemoryAllocatorDump);
104 }; 99 };
105 100
106 } // namespace trace_event 101 } // namespace trace_event
107 } // namespace base 102 } // namespace base
108 103
109 #endif // BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_ 104 #endif // BASE_TRACE_EVENT_MEMORY_ALLOCATOR_DUMP_H_
OLDNEW
« no previous file with comments | « no previous file | components/sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698