| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // Adds memory_monitor to core |
| { |
| children: [ |
| { |
| name: "memory_monitor", |
| url: "fuchsia-pkg://fuchsia.com/memory_monitor#meta/memory_monitor.cm", |
| |
| // TODO(fxbug.dev/78680): need to start eagerly to collect memory |
| // stats. Find a better solution than "eager". |
| startup: "eager", |
| environment: "#full-resolver-env", |
| }, |
| ], |
| use: [ |
| { |
| protocol: [ |
| "fuchsia.memory.Debugger", |
| "fuchsia.memory.Monitor", |
| "fuchsia.memorypressure.Provider", |
| ], |
| from: "#memory_monitor", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: [ "fuchsia.feedback.CrashReporter" ], |
| from: "self", |
| to: "#memory_monitor", |
| dependency: "weak_for_migration", |
| }, |
| { |
| protocol: "fuchsia.cobalt.LoggerFactory", |
| from: "#cobalt", |
| to: "#memory_monitor", |
| }, |
| { |
| protocol: "fuchsia.tracing.provider.Registry", |
| from: "#trace_manager", |
| to: "#memory_monitor", |
| source_availability: "unknown", |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.RootJobForInspect", |
| "fuchsia.kernel.Stats", |
| "fuchsia.logger.LogSink", |
| "fuchsia.scheduler.ProfileProvider", |
| ], |
| from: "parent", |
| to: "#memory_monitor", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#memory_monitor", |
| subdir: "memory_monitor", |
| }, |
| { |
| directory: "dev", |
| from: "parent", |
| as: "dev-aml-ram", |
| to: "#memory_monitor", |
| subdir: "class/aml-ram", |
| }, |
| { |
| storage: "cache", |
| from: "self", |
| to: "#memory_monitor", |
| }, |
| { |
| protocol: "fuchsia.memorypressure.Provider", |
| from: "#memory_monitor", |
| to: "#vulkan_loader", |
| }, |
| { |
| protocol: [ |
| "fuchsia.memory.Monitor", |
| "fuchsia.memorypressure.Provider", |
| ], |
| from: "#memory_monitor", |
| to: "#session-manager", |
| }, |
| ], |
| } |