# 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 = [
    ":common_types",
    ":regs_parsing",
    ":unwinding",
    "../../../include/perfetto/tracing/core",
    "../../../src/tracing/core:service",  # for metatrace
  ]
  deps = [
    ":proc_descriptors",
    "../../../gn:default_deps",
    "../../../include/perfetto/profiling:normalize",
    "../../../protos/perfetto/config:cpp",
    "../../../protos/perfetto/config/profiling:zero",
    "../../../protos/perfetto/trace:zero",
    "../../../protos/perfetto/trace/profiling:zero",
    "../../../src/base",
    "../../../src/base:unix_socket",
    "../../../src/tracing/ipc/producer",
    "../common:callstack_trie",
    "../common:interner",
    "../common:interning_output",
    "../common:proc_utils",
  ]
  sources = [
    "event_config.cc",
    "event_config.h",
    "event_reader.cc",
    "event_reader.h",
    "perf_producer.cc",
    "perf_producer.h",
  ]
}

source_set("common_types") {
  public_deps = [ "../../../gn:libunwindstack" ]
  deps = [
    "../../../gn:default_deps",
    "../common:unwind_support",
  ]
  sources = [ "common_types.h" ]
}

source_set("unwinding") {
  public_deps = [
    "../../../gn:libunwindstack",
    "../../../src/tracing/core:service",  # for metatrace
  ]
  deps = [
    ":common_types",
    "../../../gn:default_deps",
    "../../../include/perfetto/ext/tracing/core",
    "../../../src/base",
    "../../../src/kallsyms",
    "../common:unwind_support",
  ]
  sources = [
    "unwind_queue.h",
    "unwinding.cc",
    "unwinding.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",
    ":unwinding",
    "../../../gn:default_deps",
    "../../../gn:gtest_and_gmock",
    "../../../protos/perfetto/config:cpp",
    "../../../protos/perfetto/config/profiling:cpp",
    "../../../protos/perfetto/trace:zero",
    "../../../src/protozero",
    "../../base",
  ]
  sources = [
    "event_config_unittest.cc",
    "unwind_queue_unittest.cc",
  ]
}
