| # Copyright (C) 2019 The Android Open Source Project |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("../../../gn/fuzzer.gni") |
| import("../../../gn/perfetto.gni") |
| import("../../../gn/test.gni") |
| |
| assert(enable_perfetto_traced_perf) |
| |
| executable("traced_perf") { |
| deps = [ |
| ":traced_perf_main", |
| "../../../gn:default_deps", |
| ] |
| sources = [ "main.cc" ] |
| } |
| |
| source_set("traced_perf_main") { |
| deps = [ |
| ":proc_descriptors", |
| ":producer", |
| "../../../gn:default_deps", |
| "../../../src/base", |
| "../../../src/tracing/ipc/producer", |
| ] |
| sources = [ |
| "traced_perf.cc", |
| "traced_perf.h", |
| ] |
| } |
| |
| source_set("producer") { |
| public_deps = [ |
| ":regs_parsing", |
| "../../../include/perfetto/tracing/core", |
| ] |
| deps = [ |
| ":proc_descriptors", |
| "../../../gn:default_deps", |
| "../../../protos/perfetto/config:cpp", |
| "../../../protos/perfetto/config/profiling:zero", |
| "../../../protos/perfetto/trace:zero", |
| "../../../src/base", |
| "../../../src/base:unix_socket", |
| "../../../src/tracing/ipc/producer", |
| ] |
| sources = [ |
| "event_config.h", |
| "event_reader.cc", |
| "event_reader.h", |
| "perf_producer.cc", |
| "perf_producer.h", |
| ] |
| } |
| |
| source_set("regs_parsing") { |
| public_deps = [ "../../../gn:libunwindstack" ] |
| deps = [ |
| "../../../gn:bionic_kernel_uapi_headers", |
| "../../../gn:default_deps", |
| "../../../src/base", |
| ] |
| sources = [ |
| "regs_parsing.cc", |
| "regs_parsing.h", |
| ] |
| } |
| |
| source_set("proc_descriptors") { |
| deps = [ |
| "../../../gn:default_deps", |
| "../../../src/base", |
| ] |
| sources = [ |
| "proc_descriptors.cc", |
| "proc_descriptors.h", |
| ] |
| } |
| |
| source_set("producer_unittests") { |
| testonly = true |
| deps = [ |
| ":producer", |
| "../../../gn:default_deps", |
| "../../../gn:gtest_and_gmock", |
| "../../../protos/perfetto/config:cpp", |
| "../../../protos/perfetto/config:zero", |
| "../../../protos/perfetto/config/profiling:zero", |
| "../../../protos/perfetto/trace:zero", |
| "../../../src/protozero", |
| "../../base", |
| ] |
| sources = [ "event_config_unittest.cc" ] |
| } |