# 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("ftrace_descriptors") {
  sources = [
    "importers/ftrace/ftrace_descriptors.cc",
    "importers/ftrace/ftrace_descriptors.h",
  ]
  deps = [
    "../../gn:default_deps",
    "../../include/perfetto/ext/base:base",
    "../protozero",
  ]
}

source_set("storage_minimal") {
  sources = [
    "forwarding_trace_parser.cc",
    "forwarding_trace_parser.h",
    "importers/default_modules.cc",
    "importers/default_modules.h",
    "importers/ftrace/ftrace_module.cc",
    "importers/ftrace/ftrace_module.h",
    "importers/fuchsia/fuchsia_trace_utils.h",
    "importers/json/json_utils.cc",
    "importers/json/json_utils.h",
    "importers/ninja/ninja_log_parser.cc",
    "importers/ninja/ninja_log_parser.h",
    "importers/proto/android_camera_event_module.cc",
    "importers/proto/android_camera_event_module.h",
    "importers/proto/async_track_set_tracker.cc",
    "importers/proto/async_track_set_tracker.h",
    "importers/proto/chrome_string_lookup.cc",
    "importers/proto/chrome_string_lookup.h",
    "importers/proto/chrome_system_probes_module.cc",
    "importers/proto/chrome_system_probes_module.h",
    "importers/proto/chrome_system_probes_parser.cc",
    "importers/proto/chrome_system_probes_parser.h",
    "importers/proto/memory_tracker_snapshot_module.cc",
    "importers/proto/memory_tracker_snapshot_module.h",
    "importers/proto/memory_tracker_snapshot_parser.cc",
    "importers/proto/memory_tracker_snapshot_parser.h",
    "importers/proto/metadata_module.cc",
    "importers/proto/metadata_module.h",
    "importers/proto/metadata_tracker.cc",
    "importers/proto/metadata_tracker.h",
    "importers/proto/perf_sample_tracker.cc",
    "importers/proto/perf_sample_tracker.h",
    "importers/proto/profile_module.cc",
    "importers/proto/profile_module.h",
    "importers/proto/profile_packet_utils.cc",
    "importers/proto/profile_packet_utils.h",
    "importers/proto/proto_importer_module.cc",
    "importers/proto/proto_importer_module.h",
    "importers/proto/proto_incremental_state.h",
    "importers/proto/proto_trace_parser.cc",
    "importers/proto/proto_trace_parser.h",
    "importers/proto/proto_trace_reader.cc",
    "importers/proto/proto_trace_reader.h",
    "importers/proto/proto_trace_tokenizer.cc",
    "importers/proto/proto_trace_tokenizer.h",

    # XXX: is this the correct place
    "importers/proto/statsd_module.cc",
    "importers/proto/statsd_module.h",
    "importers/proto/track_event_module.cc",
    "importers/proto/track_event_module.h",
    "importers/proto/track_event_parser.cc",
    "importers/proto/track_event_parser.h",
    "importers/proto/track_event_tokenizer.cc",
    "importers/proto/track_event_tokenizer.h",
    "importers/proto/track_event_tracker.cc",
    "importers/proto/track_event_tracker.h",
    "importers/proto/translation_table_module.cc",
    "importers/proto/translation_table_module.h",
    "importers/syscalls/syscall_tracker.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:gen_cc_chrome_track_event_descriptor",
    "importers:gen_cc_statsd_atoms_descriptor",
    "importers:gen_cc_track_event_descriptor",
    "importers/common",
    "importers/common:parser_types",
    "importers/fuchsia:fuchsia_record",
    "importers/memory_tracker:graph_processor",
    "importers/proto:storage_minimal",
    "importers/systrace:systrace_line",
    "sorter",
    "storage",
    "tables",
    "types",
    "util",
    "util:descriptors",
    "util:gzip",
    "util:proto_to_args_parser",
    "util:stack_traces_util",
    "views",
  ]
  public_deps = [
    "../../include/perfetto/trace_processor:storage",
    "../../protos/perfetto/common:zero",
    "../../protos/perfetto/config:zero",
    "../../protos/perfetto/trace:zero",
    "../../protos/perfetto/trace/android:zero",
    "../../protos/perfetto/trace/chrome:zero",
    "../../protos/perfetto/trace/ftrace:zero",
    "../../protos/perfetto/trace/interned_data:zero",
    "../../protos/perfetto/trace/perfetto:zero",
    "../../protos/perfetto/trace/power:zero",
    "../../protos/perfetto/trace/profiling:zero",
    "../../protos/perfetto/trace/ps:zero",
    "../../protos/perfetto/trace/statsd:zero",
    "../../protos/perfetto/trace/sys_stats:zero",
    "../../protos/perfetto/trace/system_info:zero",
    "../../protos/perfetto/trace/track_event:zero",
    "../../protos/perfetto/trace/translation:zero",
    "../../src/kernel_utils:syscall_table",
  ]

  # json_utils optionally depends on jsoncpp.
  if (enable_perfetto_trace_processor_json) {
    deps += [ "../../gn:jsoncpp" ]
  }
}

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

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",
      "../../gn:default_deps",
      "../../protos/perfetto/trace/ftrace:zero",
      "../base",
      "../protozero",
      "analysis",
      "db",
      "dynamic",
      "importers:importers_full",
      "importers/android_bugreport",
      "importers/common",
      "metrics",
      "sqlite",
      "sqlite/functions",
      "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",
    ]
    if (enable_perfetto_trace_processor_json) {
      deps += [ "../../gn:jsoncpp" ]
    }
  }

  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("unittests") {
  testonly = true
  sources = [
    "forwarding_trace_parser_unittest.cc",
    "importers/ftrace/binder_tracker_unittest.cc",
    "importers/ftrace/sched_event_tracker_unittest.cc",
    "importers/ftrace/thread_state_tracker_unittest.cc",
    "importers/fuchsia/fuchsia_parser_unittest.cc",
    "importers/fuchsia/fuchsia_trace_utils_unittest.cc",
    "importers/memory_tracker/graph_processor_unittest.cc",
    "importers/memory_tracker/graph_unittest.cc",
    "importers/memory_tracker/raw_process_memory_node_unittest.cc",
    "importers/proto/async_track_set_tracker_unittest.cc",
    "importers/proto/perf_sample_tracker_unittest.cc",
    "importers/proto/proto_trace_parser_unittest.cc",
    "importers/syscalls/syscall_tracker_unittest.cc",
    "importers/systrace/systrace_parser_unittest.cc",
    "ref_counted_unittest.cc",
  ]
  deps = [
    ":gen_cc_test_messages_descriptor",
    "../../gn:default_deps",
    "../../gn:gtest_and_gmock",
    "../../protos/perfetto/common:cpp",
    "../../protos/perfetto/common:zero",
    "../../protos/perfetto/trace:cpp",
    "../../protos/perfetto/trace:minimal_zero",
    "../../protos/perfetto/trace:zero",
    "../../protos/perfetto/trace/android:zero",
    "../../protos/perfetto/trace/chrome:zero",
    "../../protos/perfetto/trace/ftrace:zero",
    "../../protos/perfetto/trace/gpu:zero",
    "../../protos/perfetto/trace/interned_data:zero",
    "../../protos/perfetto/trace/profiling:cpp",
    "../../protos/perfetto/trace/ps:zero",
    "../../protos/perfetto/trace/sys_stats:zero",
    "../../protos/perfetto/trace/track_event:zero",
    "../base",
    "../protozero",
    "../protozero:testing_messages_zero",
    "containers",
    "containers:unittests",
    "db:unittests",
    "dynamic",
    "importers:importers_full",
    "importers/android_bugreport:unittests",
    "importers/common",
    "importers/common:parser_types",
    "importers/common:unittests",
    "importers/memory_tracker:graph_processor",
    "importers/proto:storage_minimal",
    "importers/proto:unittests",
    "rpc:unittests",
    "sorter",
    "sorter:unittests",
    "sqlite/functions:unittests",
    "storage",
    "tables:unittests",
    "types",
    "types:unittests",
    "util:descriptors",
    "util:unittests",
    "views",
    "views:unittests",
  ]

  if (enable_perfetto_trace_processor_sqlite) {
    deps += [
      ":lib",
      "../../gn:sqlite",
      "dynamic:unittests",
      "sqlite:unittests",
    ]
  }

  if (enable_perfetto_trace_processor_json) {
    sources += [
      "importers/json/json_trace_tokenizer_unittest.cc",
      "importers/json/json_utils_unittest.cc",
    ]
    deps += [ "../../gn:jsoncpp" ]

    if (!is_win) {
      # export_json_unittest.cc uses base::TempFile, which is not supported on
      # windows.
      sources += [ "export_json_unittest.cc" ]
      deps += [
        ":export_json",
        "../../include/perfetto/ext/trace_processor:export_json",
      ]
    }
  }
}

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) {
      deps += [ "../../gn:jsoncpp" ]
    }
  }
}

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 = [
    "../../gn:default_deps",
    "../base",
    "importers:importers_full",
  ]
}
