# Copyright (C) 2018 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/perfetto_cc_proto_descriptor.gni")
import("../../gn/perfetto_host_executable.gni")
import("../../gn/test.gni")
import("../../gn/wasm.gni")

# Prevent that this file is accidentally included in embedder builds.
assert(enable_perfetto_trace_processor)

# The library which eases processing of Perfetto traces by exposing reading
# friendly APIs.
if (enable_perfetto_trace_processor_sqlite) {
  static_library("trace_processor") {
    complete_static_lib = true
    public_deps = [ ":lib" ]
  }
}

if (enable_perfetto_ui) {
  wasm_lib("trace_processor_wasm") {
    name = "trace_processor"
    deps = [
      ":lib",
      "../../gn:default_deps",
      "../base",
      "rpc:wasm_bridge",
    ]
  }
}

source_set("metatrace") {
  sources = [
    "tp_metatrace.cc",
    "tp_metatrace.h",
  ]
  deps = [
    "../../gn:default_deps",
    "../../include/perfetto/ext/base",
    "../../include/perfetto/trace_processor",
    "../../protos/perfetto/trace_processor:zero",
  ]
}

# In Bazel builds the ":demangle" target (below) should be a static_library so
# it gets mapped to an actual target (rather than being squashed as a filegroup)
# and can be replaced in Google internal builds via perfetto_cfg.bzl.
# Unfortunately, however, static_library targets seem to break Wasm builds on
# Mac. For this reason we just make it a source_set for all other build types.
if (is_perfetto_build_generator) {
  _demangle_target_type = "static_library"
} else {
  _demangle_target_type = "source_set"
}

target(_demangle_target_type, "demangle") {
  sources = [ "demangle.cc" ]
  deps = [
    "../../gn:default_deps",
    "../../include/perfetto/base",
    "../../include/perfetto/ext/base",
  ]
  public_deps = [ "../../include/perfetto/ext/trace_processor:demangle" ]
  if (enable_perfetto_llvm_demangle) {
    deps += [ "../../gn:llvm_demangle" ]
  }
}

source_set("storage_minimal") {
  sources = [
    "forwarding_trace_parser.cc",
    "forwarding_trace_parser.h",
    "trace_blob.cc",
    "trace_processor_context.cc",
    "trace_processor_storage.cc",
    "trace_processor_storage_impl.cc",
    "trace_processor_storage_impl.h",
    "virtual_destructors.cc",
  ]
  deps = [
    "../../gn:default_deps",
    "../base",
    "../protozero",
    "containers",
    "importers/common",
    "importers/common:parser_types",
    "importers/ftrace:minimal",
    "importers/fuchsia:fuchsia_record",
    "importers/memory_tracker:graph_processor",
    "importers/proto:gen_cc_chrome_track_event_descriptor",
    "importers/proto:gen_cc_track_event_descriptor",
    "importers/proto:minimal",
    "importers/systrace:systrace_line",
    "sorter",
    "storage",
    "tables",
    "types",
    "util:descriptors",
    "util:gzip",
    "util:proto_to_args_parser",
    "util:stack_traces_util",
    "views",
  ]
  public_deps = [ "../../include/perfetto/trace_processor:storage" ]
}

source_set("export_json") {
  sources = [
    "export_json.cc",
    "export_json.h",
  ]
  deps = [
    ":storage_minimal",
    "../../gn:default_deps",
    "../base",
    "importers/json:minimal",
    "storage",
    "types",
  ]
  public_deps = [ "../../include/perfetto/ext/trace_processor:export_json" ]
}

if (enable_perfetto_trace_processor_sqlite) {
  source_set("lib") {
    sources = [
      "iterator_impl.cc",
      "iterator_impl.h",
      "read_trace.cc",
      "read_trace_internal.cc",
      "read_trace_internal.h",
      "trace_processor.cc",
      "trace_processor_impl.cc",
      "trace_processor_impl.h",
    ]

    deps = [
      ":metatrace",
      ":storage_minimal",
      "../../gn:default_deps",
      "../../protos/perfetto/common:zero",
      "../../protos/perfetto/trace:zero",
      "../../protos/perfetto/trace/perfetto:zero",
      "../base",
      "../protozero",
      "db",
      "dynamic",
      "importers/android_bugreport",
      "importers/common",
      "importers/ftrace:full",
      "importers/fuchsia:full",
      "importers/gzip:full",
      "importers/json:full",
      "importers/json:minimal",
      "importers/ninja",
      "importers/proto:full",
      "importers/proto:minimal",
      "importers/systrace:full",
      "metrics",
      "prelude/functions",
      "prelude/operators",
      "sqlite",
      "stdlib:gen_amalgamated_stdlib",
      "storage",
      "tables",
      "types",
      "util",
      "util:gzip",
      "util:protozero_to_text",
      "util:stdlib",
      "views",
    ]
    public_deps = [
      "../../gn:sqlite",  # iterator_impl.h includes sqlite3.h.
      "../../include/perfetto/trace_processor",
    ]
  }

  executable("trace_processor_shell") {
    deps = [
      ":lib",
      "../../gn:default_deps",
      "../../gn:protobuf_full",
      "../../protos/perfetto/trace_processor:zero",
      "../../src/profiling:deobfuscator",
      "../../src/profiling/symbolizer",
      "../../src/profiling/symbolizer:symbolize_database",
      "../base",
      "../base:version",
      "metrics",
      "util",
      "util:stdlib",
    ]
    if (enable_perfetto_trace_processor_linenoise) {
      deps += [ "../../gn:linenoise" ]
    }
    if (enable_perfetto_trace_processor_httpd) {
      deps += [ "rpc:httpd" ]
    }
    sources = [
      "trace_processor_shell.cc",
      "util/proto_to_json.cc",
      "util/proto_to_json.h",
    ]
    if (perfetto_build_standalone && !is_perfetto_build_generator) {
      data_deps = [
        # The diff testing framework depends on these descriptors.
        "../../protos/perfetto/metrics:descriptor",
        "../../protos/perfetto/trace:descriptor",
        "../../protos/perfetto/trace:test_extensions_descriptor",
      ]
    }
  }
}  # if (enable_perfetto_trace_processor_sqlite)

perfetto_unittest_source_set("top_level_unittests") {
  testonly = true

  sources = [
    "forwarding_trace_parser_unittest.cc",
    "ref_counted_unittest.cc",
  ]
  deps = [
    ":storage_minimal",
    "../../gn:default_deps",
    "../../gn:gtest_and_gmock",
    "../../include/perfetto/trace_processor",
  ]

  if (enable_perfetto_trace_processor_json && !is_win) {
    # export_json_unittest.cc uses base::TempFile, which is not supported on
    # windows.
    sources += [ "export_json_unittest.cc" ]
    deps += [
      ":export_json",
      "../../gn:jsoncpp",
      "containers",
      "importers/common",
      "importers/proto:minimal",
      "storage",
      "types",
    ]
  }
}

perfetto_unittest_source_set("unittests") {
  testonly = true

  # Do not add sources to this target: use top_level_unittests
  # instead. This us really just a grouping
  deps = [
    ":top_level_unittests",
    "containers:unittests",
    "db:unittests",
    "importers/android_bugreport:unittests",
    "importers/common:unittests",
    "importers/ftrace:unittests",
    "importers/fuchsia:unittests",
    "importers/memory_tracker:unittests",
    "importers/proto:unittests",
    "importers/syscalls:unittests",
    "importers/systrace:unittests",
    "rpc:unittests",
    "sorter:unittests",
    "tables:unittests",
    "types:unittests",
    "util:unittests",
    "views:unittests",
  ]
  if (enable_perfetto_trace_processor_json) {
    deps += [ "importers/json:unittests" ]
  }
  if (enable_perfetto_trace_processor_sqlite) {
    deps += [
      "dynamic:unittests",
      "prelude/functions:unittests",
      "prelude/operators:unittests",
      "sqlite:unittests",
    ]
  }
}

perfetto_cc_proto_descriptor("gen_cc_test_messages_descriptor") {
  descriptor_name = "test_messages.descriptor"
  descriptor_target = "../protozero:test_messages_descriptor"
}

source_set("integrationtests") {
  testonly = true
  sources = []
  deps = []
  if (enable_perfetto_trace_processor_sqlite) {
    sources += [
      "read_trace_integrationtest.cc",
      "trace_database_integrationtest.cc",
    ]
    deps += [
      ":lib",
      "../../gn:default_deps",
      "../../gn:gtest_and_gmock",
      "../../protos/perfetto/common:zero",
      "../../protos/perfetto/trace:zero",
      "../../protos/perfetto/trace_processor:zero",
      "../base",
      "../base:test_support",
      "sqlite",
    ]
  }
}

if (enable_perfetto_trace_processor_json) {
  source_set("storage_minimal_smoke_tests") {
    testonly = true
    sources = [ "storage_minimal_smoke_test.cc" ]
    deps = [
      ":export_json",
      ":storage_minimal",
      "../../gn:default_deps",
      "../../gn:gtest_and_gmock",
      "../../gn:gtest_main",
      "../../gn:jsoncpp",
      "../base:test_support",
    ]
  }
}

perfetto_fuzzer_test("trace_processor_fuzzer") {
  testonly = true
  sources = [ "trace_parsing_fuzzer.cc" ]
  deps = [
    ":storage_minimal",
    "../../gn:default_deps",
    "../base",
  ]
}
