| # Copyright 2016 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. |
| |
| import("//build/components.gni") |
| import("//src/sys/core/build/core_shard.gni") |
| |
| source_set("lib") { |
| sources = [ |
| "app.cc", |
| "app.h", |
| "config.cc", |
| "config.h", |
| "trace_manager.cc", |
| "trace_manager.h", |
| "trace_provider_bundle.cc", |
| "trace_provider_bundle.h", |
| "trace_session.cc", |
| "trace_session.h", |
| "tracee.cc", |
| "tracee.h", |
| "util.cc", |
| "util.h", |
| ] |
| |
| deps = [ |
| "//src/lib/fsl", |
| "//third_party/rapidjson", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/trace-provider", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.tracing.controller", |
| "//sdk/fidl/fuchsia.tracing.provider", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/fit", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/trace-reader", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "trace_manager" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| resource("tracing.config") { |
| sources = [ "tracing.config" ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_component("component_cfv1") { |
| component_name = "trace_manager" |
| manifest = "meta/trace_manager.cmx" |
| deps = [ |
| ":bin", |
| ":tracing.config", |
| ] |
| } |
| |
| fuchsia_component("component_cfv2") { |
| component_name = "trace_manager" |
| manifest = "meta/trace_manager.cml" |
| deps = [ |
| ":bin", |
| ":tracing.config", |
| ] |
| } |
| |
| # TODO(fxbug.dev/83213) Retain v1 component while out of tree tests need it. |
| fuchsia_package("trace_manager") { |
| deps = [ |
| ":component_cfv1", |
| ":component_cfv2", |
| ] |
| } |
| |
| core_shard("trace_manager_core_shard") { |
| shard_file = "meta/trace_manager.core_shard.cml" |
| } |