| 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 817b667e355f735f5facc8a1888729da5fa399d6..55d916b9137ea944032107fe18838f8643b7ee2e 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
|
| @@ -8,13 +8,15 @@
|
| #include "base/process/process_handle.h"
|
| #include "base/trace_event/memory_dump_request_args.h"
|
| #include "mojo/common/common_custom_types_struct_traits.h"
|
| +#include "services/resource_coordinator/public/cpp/memory/memory_export.h"
|
| #include "services/resource_coordinator/public/interfaces/memory/memory_instrumentation.mojom.h"
|
|
|
| namespace mojo {
|
|
|
| template <>
|
| -struct EnumTraits<memory_instrumentation::mojom::DumpType,
|
| - base::trace_event::MemoryDumpType> {
|
| +struct SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_EXPORT
|
| + EnumTraits<memory_instrumentation::mojom::DumpType,
|
| + base::trace_event::MemoryDumpType> {
|
| static memory_instrumentation::mojom::DumpType ToMojom(
|
| base::trace_event::MemoryDumpType type);
|
| static bool FromMojom(memory_instrumentation::mojom::DumpType input,
|
| @@ -22,8 +24,9 @@ struct EnumTraits<memory_instrumentation::mojom::DumpType,
|
| };
|
|
|
| template <>
|
| -struct EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| - base::trace_event::MemoryDumpLevelOfDetail> {
|
| +struct SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_EXPORT
|
| + EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| + base::trace_event::MemoryDumpLevelOfDetail> {
|
| static memory_instrumentation::mojom::LevelOfDetail ToMojom(
|
| base::trace_event::MemoryDumpLevelOfDetail level_of_detail);
|
| static bool FromMojom(memory_instrumentation::mojom::LevelOfDetail input,
|
| @@ -31,8 +34,9 @@ struct EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| };
|
|
|
| template <>
|
| -struct StructTraits<memory_instrumentation::mojom::RequestArgsDataView,
|
| - base::trace_event::MemoryDumpRequestArgs> {
|
| +struct SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_EXPORT
|
| + StructTraits<memory_instrumentation::mojom::RequestArgsDataView,
|
| + base::trace_event::MemoryDumpRequestArgs> {
|
| static uint64_t dump_guid(
|
| const base::trace_event::MemoryDumpRequestArgs& args) {
|
| return args.dump_guid;
|
| @@ -50,9 +54,9 @@ struct StructTraits<memory_instrumentation::mojom::RequestArgsDataView,
|
| };
|
|
|
| template <>
|
| -struct StructTraits<
|
| - memory_instrumentation::mojom::ChromeMemDumpDataView,
|
| - base::trace_event::MemoryDumpCallbackResult::ChromeMemDump> {
|
| +struct SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_EXPORT
|
| + 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;
|
| @@ -75,8 +79,9 @@ struct StructTraits<
|
| };
|
|
|
| template <>
|
| -struct StructTraits<memory_instrumentation::mojom::OSMemDumpDataView,
|
| - base::trace_event::MemoryDumpCallbackResult::OSMemDump> {
|
| +struct SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_EXPORT
|
| + 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;
|
| @@ -86,7 +91,7 @@ struct StructTraits<memory_instrumentation::mojom::OSMemDumpDataView,
|
| };
|
|
|
| template <>
|
| -struct StructTraits<
|
| +struct SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_EXPORT StructTraits<
|
| memory_instrumentation::mojom::MemoryDumpCallbackResultDataView,
|
| base::trace_event::MemoryDumpCallbackResult> {
|
| static base::trace_event::MemoryDumpCallbackResult::OSMemDump os_dump(
|
|
|