| # 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/package.gni") |
| |
| executable("bin") { |
| output_name = "trace" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ ":trace_app" ] |
| |
| # TODO(46850): Fix the leaks and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |
| |
| source_set("trace_app") { |
| sources = [ |
| "app.cc", |
| "app.h", |
| "cmd_utils.cc", |
| "cmd_utils.h", |
| "command.cc", |
| "command.h", |
| "commands/list_categories.cc", |
| "commands/list_categories.h", |
| "commands/record.cc", |
| "commands/record.h", |
| "commands/time.cc", |
| "commands/time.h", |
| "results_export.cc", |
| "results_export.h", |
| "results_output.cc", |
| "results_output.h", |
| "tracer.cc", |
| "tracer.h", |
| "utils.cc", |
| "utils.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/lib/measure", |
| "//garnet/lib/trace_converters:chromium", |
| "//sdk/fidl/fuchsia.tracing.controller", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//third_party/zlib:zfstream", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/fit", |
| "//zircon/system/ulib/trace-reader", |
| ] |
| |
| deps = [ |
| ":spec", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| source_set("spec") { |
| sources = [ |
| "spec.cc", |
| "spec.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/lib/measure", |
| "//src/lib/fxl", |
| "//zircon/public/lib/zx", |
| ] |
| |
| deps = [ |
| "//src/lib/json_parser", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| source_set("unittests") { |
| testonly = true |
| |
| sources = [ "spec_unittest.cc" ] |
| |
| deps = [ |
| ":spec", |
| ":trace_app", |
| "//src/lib/fxl", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| package("trace") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "trace" |
| shell = true |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/trace.cmx") |
| dest = "trace.cmx" |
| }, |
| ] |
| |
| # If your build includes the target trace tool, your $host_tools_dir |
| # contains the utilities to work with traces copied from the target. |
| data_deps = [ "//garnet/bin/traceutil" ] |
| } |