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

Side by Side Diff: content/common/host_discardable_shared_memory_manager.h

Issue 1262333005: [tracing] Introduce MemoryDumpArgs to enable light and heavy dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_ 5 #ifndef CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_
6 #define CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_ 6 #define CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 23 matching lines...) Expand all
34 ~HostDiscardableSharedMemoryManager() override; 34 ~HostDiscardableSharedMemoryManager() override;
35 35
36 // Returns a singleton instance. 36 // Returns a singleton instance.
37 static HostDiscardableSharedMemoryManager* current(); 37 static HostDiscardableSharedMemoryManager* current();
38 38
39 // Overridden from base::DiscardableMemoryAllocator: 39 // Overridden from base::DiscardableMemoryAllocator:
40 scoped_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemory( 40 scoped_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemory(
41 size_t size) override; 41 size_t size) override;
42 42
43 // Overridden from base::trace_event::MemoryDumpProvider: 43 // Overridden from base::trace_event::MemoryDumpProvider:
44 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; 44 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
45 base::trace_event::ProcessMemoryDump* pmd) override;
45 46
46 // This allocates a discardable memory segment for |process_handle|. 47 // This allocates a discardable memory segment for |process_handle|.
47 // A valid shared memory handle is returned on success. 48 // A valid shared memory handle is returned on success.
48 void AllocateLockedDiscardableSharedMemoryForChild( 49 void AllocateLockedDiscardableSharedMemoryForChild(
49 base::ProcessHandle process_handle, 50 base::ProcessHandle process_handle,
50 int child_process_id, 51 int child_process_id,
51 size_t size, 52 size_t size,
52 DiscardableSharedMemoryId id, 53 DiscardableSharedMemoryId id,
53 base::SharedMemoryHandle* shared_memory_handle); 54 base::SharedMemoryHandle* shared_memory_handle);
54 55
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; 129 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_;
129 bool enforce_memory_policy_pending_; 130 bool enforce_memory_policy_pending_;
130 base::WeakPtrFactory<HostDiscardableSharedMemoryManager> weak_ptr_factory_; 131 base::WeakPtrFactory<HostDiscardableSharedMemoryManager> weak_ptr_factory_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(HostDiscardableSharedMemoryManager); 133 DISALLOW_COPY_AND_ASSIGN(HostDiscardableSharedMemoryManager);
133 }; 134 };
134 135
135 } // namespace content 136 } // namespace content
136 137
137 #endif // CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_ 138 #endif // CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/host_discardable_shared_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698