| # 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 = [ |
| ":producer", |
| "../../../gn:default_deps", |
| "../../../src/base", |
| "../../../src/tracing:ipc", |
| ] |
| sources = [ |
| "traced_perf.cc", |
| "traced_perf.h", |
| ] |
| } |
| |
| source_set("producer") { |
| deps = [ |
| "../../../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", |
| ] |
| public_deps = [ |
| "../../../include/perfetto/tracing/core", |
| ] |
| sources = [ |
| "event_config.h", |
| "event_reader.cc", |
| "event_reader.h", |
| "perf_producer.cc", |
| "perf_producer.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", |
| ] |
| } |