# 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" ]
}
