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

Side by Side Diff: services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h

Issue 2831073003: Reland of [Memory UMA] Return the extra_processes_dump map as part of the ResponseCallback (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_ 5 #ifndef SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_
6 #define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_ 6 #define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_
7 7
8 #include "base/process/process_handle.h"
8 #include "base/trace_event/memory_dump_request_args.h" 9 #include "base/trace_event/memory_dump_request_args.h"
10 #include "mojo/common/common_custom_types_struct_traits.h"
9 #include "services/resource_coordinator/public/interfaces/memory/memory_instrume ntation.mojom.h" 11 #include "services/resource_coordinator/public/interfaces/memory/memory_instrume ntation.mojom.h"
10 12
11 namespace mojo { 13 namespace mojo {
12 14
13 template <> 15 template <>
14 struct EnumTraits<memory_instrumentation::mojom::DumpType, 16 struct EnumTraits<memory_instrumentation::mojom::DumpType,
15 base::trace_event::MemoryDumpType> { 17 base::trace_event::MemoryDumpType> {
16 static memory_instrumentation::mojom::DumpType ToMojom( 18 static memory_instrumentation::mojom::DumpType ToMojom(
17 base::trace_event::MemoryDumpType type); 19 base::trace_event::MemoryDumpType type);
18 static bool FromMojom(memory_instrumentation::mojom::DumpType input, 20 static bool FromMojom(memory_instrumentation::mojom::DumpType input,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView, 90 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView,
89 base::trace_event::MemoryDumpCallbackResult> { 91 base::trace_event::MemoryDumpCallbackResult> {
90 static base::trace_event::MemoryDumpCallbackResult::OSMemDump os_dump( 92 static base::trace_event::MemoryDumpCallbackResult::OSMemDump os_dump(
91 const base::trace_event::MemoryDumpCallbackResult& args) { 93 const base::trace_event::MemoryDumpCallbackResult& args) {
92 return args.os_dump; 94 return args.os_dump;
93 } 95 }
94 static base::trace_event::MemoryDumpCallbackResult::ChromeMemDump chrome_dump( 96 static base::trace_event::MemoryDumpCallbackResult::ChromeMemDump chrome_dump(
95 const base::trace_event::MemoryDumpCallbackResult& args) { 97 const base::trace_event::MemoryDumpCallbackResult& args) {
96 return args.chrome_dump; 98 return args.chrome_dump;
97 } 99 }
100 static const std::map<base::ProcessId,
101 base::trace_event::MemoryDumpCallbackResult::OSMemDump>&
102 extra_processes_dump(
103 const base::trace_event::MemoryDumpCallbackResult& args) {
104 return args.extra_processes_dump;
105 }
98 static bool Read( 106 static bool Read(
99 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView input, 107 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView input,
100 base::trace_event::MemoryDumpCallbackResult* out); 108 base::trace_event::MemoryDumpCallbackResult* out);
101 }; 109 };
102 110
103 } // namespace mojo 111 } // namespace mojo
104 112
105 #endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATIO N_STRUCT_TRAITS_H_ 113 #endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATIO N_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « mojo/common/typemaps.gni ('k') | services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698