| # Copyright 2017 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 = "cpuperf_provider" |
| |
| sources = [ |
| "app.cc", |
| "app.h", |
| "categories.cc", |
| "categories.h", |
| "category-db.cc", |
| "importer.cc", |
| "importer.h", |
| "main.cc", |
| ] |
| |
| if (current_cpu == "arm64") { |
| sources += [ |
| "arm64-category-db.cc", |
| "arm64-events.h", |
| "arm64-pm-categories.inc", |
| "arm64-timebase-categories.inc", |
| ] |
| } |
| |
| if (current_cpu == "x64") { |
| sources += [ |
| "intel-category-db.cc", |
| "intel-events.h", |
| "intel-pm-categories.inc", |
| "intel-timebase-categories.inc", |
| "skylake-misc-categories.inc", |
| "skylake-pm-categories.inc", |
| ] |
| } |
| |
| deps = [ |
| "//garnet/lib/perfmon", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/trace", |
| "//zircon/public/lib/trace-provider", |
| "//zircon/public/lib/zircon-internal", |
| ] |
| } |
| |
| package("cpuperf_provider") { |
| deps = [ |
| ":bin", |
| ] |
| |
| binary = "cpuperf_provider" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/cpuperf_provider.cmx") |
| dest = "cpuperf_provider.cmx" |
| }, |
| ] |
| } |
| |
| group("report_generators") { |
| deps = [ |
| "//garnet/bin/cpuperf_provider/report-generators/tally", |
| ] |
| } |