| Index: services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h
|
| diff --git a/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h b/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h
|
| index c3b2761148f0a4f8f164311e084218ad44f9071c..c9c6770b78382ba7a4c0a5424f6f76c7d40b16c9 100644
|
| --- a/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h
|
| +++ b/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h
|
| @@ -47,6 +47,59 @@ struct StructTraits<memory_instrumentation::mojom::RequestArgsDataView,
|
| base::trace_event::MemoryDumpRequestArgs* out);
|
| };
|
|
|
| +template <>
|
| +struct StructTraits<
|
| + memory_instrumentation::mojom::ChromeMemDumpDataView,
|
| + base::trace_event::MemoryDumpCallbackResult::ChromeMemDump> {
|
| + static uint32_t malloc_total_kb(
|
| + const base::trace_event::MemoryDumpCallbackResult::ChromeMemDump& args) {
|
| + return args.malloc_total_kb;
|
| + }
|
| + static uint32_t partition_alloc_total_kb(
|
| + const base::trace_event::MemoryDumpCallbackResult::ChromeMemDump& args) {
|
| + return args.partition_alloc_total_kb;
|
| + }
|
| + static uint32_t blink_gc_total_kb(
|
| + const base::trace_event::MemoryDumpCallbackResult::ChromeMemDump& args) {
|
| + return args.blink_gc_total_kb;
|
| + }
|
| + static uint32_t v8_total_kb(
|
| + const base::trace_event::MemoryDumpCallbackResult::ChromeMemDump& args) {
|
| + return args.v8_total_kb;
|
| + }
|
| + static bool Read(
|
| + memory_instrumentation::mojom::ChromeMemDumpDataView input,
|
| + base::trace_event::MemoryDumpCallbackResult::ChromeMemDump* out);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<memory_instrumentation::mojom::OSMemDumpDataView,
|
| + base::trace_event::MemoryDumpCallbackResult::OSMemDump> {
|
| + static uint32_t resident_set_kb(
|
| + const base::trace_event::MemoryDumpCallbackResult::OSMemDump& args) {
|
| + return args.resident_set_kb;
|
| + }
|
| + static bool Read(memory_instrumentation::mojom::OSMemDumpDataView input,
|
| + base::trace_event::MemoryDumpCallbackResult::OSMemDump* out);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<
|
| + memory_instrumentation::mojom::MemoryDumpCallbackResultDataView,
|
| + base::trace_event::MemoryDumpCallbackResult> {
|
| + static base::trace_event::MemoryDumpCallbackResult::OSMemDump os_dump(
|
| + const base::trace_event::MemoryDumpCallbackResult& args) {
|
| + return args.os_dump;
|
| + }
|
| + static base::trace_event::MemoryDumpCallbackResult::ChromeMemDump chrome_dump(
|
| + const base::trace_event::MemoryDumpCallbackResult& args) {
|
| + return args.chrome_dump;
|
| + }
|
| + static bool Read(
|
| + memory_instrumentation::mojom::MemoryDumpCallbackResultDataView input,
|
| + base::trace_event::MemoryDumpCallbackResult* out);
|
| +};
|
| +
|
| } // namespace mojo
|
|
|
| #endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_STRUCT_TRAITS_H_
|
|
|