blob: 73e173b5b9253db476d886d71074be8da2cacbce [file]
# Copyright 2023 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")
source_set("lib") {
sources = [
"component.cc",
"component_watcher.cc",
"fxt_writer.cc",
"job_watcher.cc",
"kernel_sampler.cc",
"memory.h",
"process_watcher.cc",
"sampler.cc",
"stack_sampler.cc",
"targets.cc",
"taskfinder.cc",
"test_component.cc",
"unowned_component.cc",
]
public_deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_cpp",
"//sdk/fidl/fuchsia.cpu.profiler:fuchsia.cpu.profiler_cpp",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_cpp",
"//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/component/outgoing/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/elf-search",
"//src/lib/fsl",
"//src/lib/fxl",
"//src/lib/unwinder",
"//src/lib/zxdump",
"//src/performance/lib/fxt",
"//zircon/system/ulib/task-utils",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-reader",
"//zircon/system/ulib/zircon-internal",
]
}
executable("bin") {
testonly = true
output_name = "cpu_profiler"
sources = [
"main.cc",
"profiler_controller_impl.cc",
]
deps = [
":lib",
"//sdk/fidl/fuchsia.cpu.profiler:fuchsia.cpu.profiler_cpp",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/outgoing/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/fsl",
"//zircon/system/ulib/trace-provider",
]
}
fuchsia_component("cpu_profiler_component") {
testonly = true
component_name = "cpu_profiler"
manifest = "meta/cpu_profiler.cml"
deps = [ ":bin" ]
}
fuchsia_package("cpu_profiler") {
testonly = true
deps = [ ":cpu_profiler_component" ]
subpackages = [ "//src/performance/profiler_session_manager" ]
}
group("tests") {
testonly = true
deps = [ "tests" ]
}
group("e2e_tests") {
testonly = true
deps = [ "tests:e2e_tests" ]
}