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

Side by Side Diff: base/trace_event/process_memory_dump.h

Issue 2775423003: Add ownership edges between HostSharedBitmap and shared memory
Patch Set: Fix comments Created 3 years, 8 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
« no previous file with comments | « base/memory/shared_memory_tracker.cc ('k') | base/trace_event/process_memory_dump.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_PROCESS_MEMORY_DUMP_H_ 5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ 6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 47
48 // Maps allocator dumps absolute names (allocator_name/heap/subheap) to 48 // Maps allocator dumps absolute names (allocator_name/heap/subheap) to
49 // MemoryAllocatorDump instances. 49 // MemoryAllocatorDump instances.
50 using AllocatorDumpsMap = 50 using AllocatorDumpsMap =
51 std::unordered_map<std::string, std::unique_ptr<MemoryAllocatorDump>>; 51 std::unordered_map<std::string, std::unique_ptr<MemoryAllocatorDump>>;
52 52
53 using HeapDumpsMap = 53 using HeapDumpsMap =
54 std::unordered_map<std::string, std::unique_ptr<TracedValue>>; 54 std::unordered_map<std::string, std::unique_ptr<TracedValue>>;
55 55
56 static const int kDefaultImportance = 0;
57
56 #if defined(COUNT_RESIDENT_BYTES_SUPPORTED) 58 #if defined(COUNT_RESIDENT_BYTES_SUPPORTED)
57 // Returns the number of bytes in a kernel memory page. Some platforms may 59 // Returns the number of bytes in a kernel memory page. Some platforms may
58 // have a different value for kernel page sizes from user page sizes. It is 60 // have a different value for kernel page sizes from user page sizes. It is
59 // important to use kernel memory page sizes for resident bytes calculation. 61 // important to use kernel memory page sizes for resident bytes calculation.
60 // In most cases, the two are the same. 62 // In most cases, the two are the same.
61 static size_t GetSystemPageSize(); 63 static size_t GetSystemPageSize();
62 64
63 // Returns the total bytes resident for a virtual address range, with given 65 // Returns the total bytes resident for a virtual address range, with given
64 // |start_address| and |mapped_size|. |mapped_size| is specified in bytes. The 66 // |start_address| and |mapped_size|. |mapped_size| is specified in bytes. The
65 // value returned is valid only if the given range is currently mmapped by the 67 // value returned is valid only if the given range is currently mmapped by the
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // background mode are disabled for testing. 215 // background mode are disabled for testing.
214 static bool is_black_hole_non_fatal_for_testing_; 216 static bool is_black_hole_non_fatal_for_testing_;
215 217
216 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump); 218 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump);
217 }; 219 };
218 220
219 } // namespace trace_event 221 } // namespace trace_event
220 } // namespace base 222 } // namespace base
221 223
222 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_ 224 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
OLDNEW
« no previous file with comments | « base/memory/shared_memory_tracker.cc ('k') | base/trace_event/process_memory_dump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698