# 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_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
    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("protozero_to_text") {
  sources = [
    "importers/proto/track_event.descriptor.h",
    "protozero_to_text.cc",
    "protozero_to_text.h",
  ]
  deps = [
    ":descriptors",
    "../../gn:default_deps",
    "../../protos/perfetto/common:zero",
    "../../protos/perfetto/trace/track_event:zero",
    "../base",
    "../protozero:protozero",
  ]
}

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

source_set("storage_minimal") {
  sources = [
    "args_tracker.cc",
    "args_tracker.h",
    "binder_tracker.cc",
    "binder_tracker.h",
    "chunked_trace_reader.h",
    "clock_tracker.cc",
    "clock_tracker.h",
    "destructible.cc",
    "destructible.h",
    "event_tracker.cc",
    "event_tracker.h",
    "forwarding_trace_parser.cc",
    "forwarding_trace_parser.h",
    "ftrace_utils.h",
    "gzip_trace_parser.cc",
    "gzip_trace_parser.h",
    "heap_profile_tracker.cc",
    "heap_profile_tracker.h",
    "importers/ftrace/ftrace_descriptors.h",
    "importers/ftrace/ftrace_module.cc",
    "importers/ftrace/ftrace_module.h",
    "importers/ftrace/ftrace_parser.h",
    "importers/ftrace/ftrace_tokenizer.h",
    "importers/ftrace/sched_event_tracker.h",
    "importers/fuchsia/fuchsia_provider_view.h",
    "importers/proto/android_probes_module.h",
    "importers/proto/android_probes_parser.h",
    "importers/proto/args_table_utils.cc",
    "importers/proto/args_table_utils.h",
    "importers/proto/chrome_compositor_scheduler_state.descriptor.h",
    "importers/proto/heap_graph_module.h",
    "importers/proto/heap_graph_tracker.h",
    "importers/proto/heap_graph_walker.h",
    "importers/proto/packet_sequence_state.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_tokenizer.cc",
    "importers/proto/proto_trace_tokenizer.h",
    "importers/proto/system_probes_module.h",
    "importers/proto/system_probes_parser.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/systrace/systrace_parser.h",
    "importers/systrace/systrace_trace_parser.h",
    "metadata.h",
    "process_tracker.cc",
    "process_tracker.h",
    "slice_tracker.cc",
    "slice_tracker.h",
    "stack_profile_tracker.cc",
    "stack_profile_tracker.h",
    "stats.h",
    "syscall_tracker.h",
    "timestamped_trace_piece.h",
    "trace_blob_view.h",
    "trace_parser.h",
    "trace_processor_context.cc",
    "trace_processor_context.h",
    "trace_processor_storage.cc",
    "trace_processor_storage_impl.cc",
    "trace_processor_storage_impl.h",
    "trace_sorter.cc",
    "trace_sorter.h",
    "trace_storage.cc",
    "trace_storage.h",
    "track_tracker.cc",
    "track_tracker.h",
    "variadic.h",
    "virtual_destructors.cc",
  ]

  deps = [
    ":common",
    ":descriptors",
    "../../gn:default_deps",
    "../../gn:zlib",
    "../base",
    "../protozero",
    "tables",
  ]
  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/sys_stats:zero",
    "../../protos/perfetto/trace/track_event:zero",
  ]
  if (enable_perfetto_trace_processor_json_import) {
    sources += [
      "importers/json/json_trace_parser.cc",
      "importers/json/json_trace_parser.h",
      "importers/json/json_trace_tokenizer.cc",
      "importers/json/json_trace_tokenizer.h",
      "importers/json/json_trace_utils.cc",
      "importers/json/json_trace_utils.h",
    ]
    deps += [ "../../gn:jsoncpp" ]
  }
  if (enable_perfetto_trace_processor_ftrace) {
    sources += [
      "importers/ftrace/ftrace_descriptors.cc",
      "importers/ftrace/ftrace_module_impl.cc",
      "importers/ftrace/ftrace_parser.cc",
      "importers/ftrace/ftrace_tokenizer.cc",
      "importers/ftrace/sched_event_tracker.cc",
      "importers/systrace/systrace_parser.cc",
      "importers/systrace/systrace_trace_parser.cc",
    ]
  }
  if (enable_perfetto_trace_processor_ftrace ||
      enable_perfetto_trace_processor_fuchsia) {
    sources += [ "ftrace_utils.cc" ]
  }
  if (enable_perfetto_trace_processor_system_probes) {
    sources += [
      "importers/proto/system_probes_module.cc",
      "importers/proto/system_probes_parser.cc",
    ]
    deps += [ "../../include/perfetto/ext/traced:sys_stats_counters" ]
  }
  if (enable_perfetto_trace_processor_android_probes) {
    sources += [
      "importers/proto/android_probes_module.cc",
      "importers/proto/android_probes_parser.cc",
    ]
  }
  if (enable_perfetto_trace_processor_heap_graphs) {
    sources += [
      "importers/proto/heap_graph_module.cc",
      "importers/proto/heap_graph_tracker.cc",
      "importers/proto/heap_graph_walker.cc",
    ]
  }
  if (enable_perfetto_trace_processor_fuchsia) {
    sources += [
      "importers/fuchsia/fuchsia_provider_view.cc",
      "importers/fuchsia/fuchsia_trace_parser.cc",
      "importers/fuchsia/fuchsia_trace_parser.h",
      "importers/fuchsia/fuchsia_trace_tokenizer.cc",
      "importers/fuchsia/fuchsia_trace_tokenizer.h",
      "importers/fuchsia/fuchsia_trace_utils.cc",
      "importers/fuchsia/fuchsia_trace_utils.h",
    ]
  }
  if (enable_perfetto_trace_processor_syscalls) {
    sources += [
      "syscall_tracker.cc",
      "syscalls_aarch32.h",
      "syscalls_aarch64.h",
      "syscalls_armeabi.h",
      "syscalls_x86_64.h",
    ]
  }
}

source_set("storage_full") {
  sources = [
    "importers/proto/graphics_event_module.cc",
    "importers/proto/graphics_event_module.h",
    "importers/proto/graphics_event_parser.cc",
    "importers/proto/graphics_event_parser.h",
    "importers/proto/vulkan_memory_tracker.cc",
    "importers/proto/vulkan_memory_tracker.h",
    "register_additional_modules.cc",
    "register_additional_modules.h",
  ]
  public_deps = [
    ":storage_minimal",
  ]
  deps = [
    "../../protos/perfetto/common:zero",
    "../../protos/perfetto/trace:zero",
    "../../protos/perfetto/trace/android:zero",
    "../../protos/perfetto/trace/gpu:zero",
    "../../protos/perfetto/trace/interned_data:zero",
    "../protozero",
  ]
  if (enable_perfetto_trace_processor_json) {
    public_deps += [ "../../gn:jsoncpp" ]
  }

  # Include these sources only if they are not already included in
  # storage_minimal.
  # TODO(khokhlov): Remove this 'if' when modules that use this tracker are
  # migrated to storage_full.
  if (!enable_perfetto_trace_processor_syscalls) {
    sources += [
      "syscall_tracker.cc",
      "syscalls_aarch32.h",
      "syscalls_aarch64.h",
      "syscalls_armeabi.h",
      "syscalls_x86_64.h",
    ]
  }
}

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

if (enable_perfetto_trace_processor_sqlite) {
  source_set("lib") {
    sources = [
      "android_logs_table.cc",
      "android_logs_table.h",
      "args_table.cc",
      "args_table.h",
      "cpu_profile_stack_sample_table.cc",
      "cpu_profile_stack_sample_table.h",
      "filtered_row_index.cc",
      "filtered_row_index.h",
      "gfp_flags.cc",
      "gfp_flags.h",
      "heap_profile_allocation_table.cc",
      "heap_profile_allocation_table.h",
      "instants_table.cc",
      "instants_table.h",
      "metadata_table.cc",
      "metadata_table.h",
      "process_table.cc",
      "process_table.h",
      "raw_table.cc",
      "raw_table.h",
      "read_trace.cc",
      "row_iterators.cc",
      "row_iterators.h",
      "sched_slice_table.h",
      "span_join_operator_table.cc",
      "span_join_operator_table.h",
      "sql_stats_table.cc",
      "sql_stats_table.h",
      "stack_profile_frame_table.cc",
      "stack_profile_frame_table.h",
      "stack_profile_mapping_table.cc",
      "stack_profile_mapping_table.h",
      "stats_table.cc",
      "stats_table.h",
      "storage_columns.cc",
      "storage_columns.h",
      "storage_schema.cc",
      "storage_schema.h",
      "storage_table.cc",
      "storage_table.h",
      "thread_table.cc",
      "thread_table.h",
      "trace_processor.cc",
      "trace_processor_impl.cc",
      "trace_processor_impl.h",
      "window_operator_table.cc",
      "window_operator_table.h",
    ]

    deps = [
      ":common",
      ":storage_full",
      "../../gn:default_deps",
      "../../gn:sqlite",
      "../../protos/perfetto/trace/ftrace:zero",
      "../base",
      "db:lib",
      "sqlite",
      "tables",
    ]
    public_deps = [
      "../../include/perfetto/trace_processor",
    ]
    if (enable_perfetto_trace_processor_ftrace) {
      sources += [ "sched_slice_table.cc" ]
    }
    if (enable_perfetto_trace_processor_metrics) {
      deps += [
        "../../protos/perfetto/metrics:zero",
        "../../protos/perfetto/metrics/android:zero",
        "metrics:lib",
      ]
    }
    if (enable_perfetto_trace_processor_json) {
      deps += [ ":export_json" ]
    }
  }
}

# TODO(lalitm): we need to find a better home for the classes here.
source_set("common") {
  sources = [
    "null_term_string_view.h",
    "string_pool.cc",
    "string_pool.h",
  ]

  deps = [
    "../../gn:default_deps",
    "../base",
    "../protozero",
  ]
}

if (enable_perfetto_trace_processor_metrics) {  # shell requires metrics.
  perfetto_host_executable("trace_processor_shell") {
    deps = [
      ":lib",
      "../../gn:default_deps",
      "../../gn:protoc_lib",
      "../base",
      "metrics:lib",
    ]
    if (enable_perfetto_version_gen) {
      deps += [ "../../gn/standalone:gen_git_revision" ]
    }
    if (enable_perfetto_trace_processor_linenoise) {
      deps += [ "../../gn:linenoise" ]
    }
    if (enable_perfetto_trace_processor_httpd) {
      deps += [ "rpc:httpd" ]
    }
    sources = [
      "proto_to_json.cc",
      "proto_to_json.h",
      "trace_processor_shell.cc",
    ]
  }
}

perfetto_unittest_source_set("unittests") {
  testonly = true
  sources = [
    "clock_tracker_unittest.cc",
    "event_tracker_unittest.cc",
    "forwarding_trace_parser_unittest.cc",
    "heap_profile_tracker_unittest.cc",
    "importers/proto/args_table_utils_unittest.cc",
    "importers/proto/proto_trace_parser_unittest.cc",
    "importers/systrace/systrace_parser_unittest.cc",
    "null_term_string_view_unittest.cc",
    "process_tracker_unittest.cc",
    "protozero_to_text_unittests.cc",
    "slice_tracker_unittest.cc",
    "string_pool_unittest.cc",
    "trace_sorter_unittest.cc",
  ]
  deps = [
    ":common",
    ":descriptors",
    ":protozero_to_text",
    ":storage_full",
    "../../gn:default_deps",
    "../../gn:gtest_and_gmock",
    "../../protos/perfetto/common:zero",
    "../../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:zero",
    "../../protos/perfetto/trace/ps:zero",
    "../../protos/perfetto/trace/sys_stats:zero",
    "../../protos/perfetto/trace/track_event:zero",
    "../base",
    "../protozero",
    "../protozero:testing_messages_zero",
    "containers:unittests",
    "db:unittests",
    "tables:unittests",
  ]
  if (enable_perfetto_trace_processor_sqlite) {
    sources += [
      "args_table_unittest.cc",
      "filtered_row_index_unittest.cc",
      "metadata_table_unittest.cc",
      "process_table_unittest.cc",
      "span_join_operator_table_unittest.cc",
    ]
    deps += [
      ":lib",
      "../../gn:sqlite",
      "sqlite",
      "sqlite:unittests",
    ]
  }
  if (enable_perfetto_trace_processor_json) {
    if (enable_perfetto_trace_processor_json_import) {
      sources += [
        "importers/json/json_trace_tokenizer_unittest.cc",
        "importers/json/json_trace_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",
        "../../gn:jsoncpp",
        "../../include/perfetto/ext/trace_processor:export_json",
      ]
    }
  }
  if (enable_perfetto_trace_processor_ftrace) {
    sources += [
      "ftrace_utils_unittest.cc",
      "sched_slice_table_unittest.cc",
      "thread_table_unittest.cc",
    ]
  }
  if (enable_perfetto_trace_processor_heap_graphs) {
    sources += [ "importers/proto/heap_graph_walker_unittest.cc" ]
  }
  if (enable_perfetto_trace_processor_fuchsia) {
    sources += [ "importers/fuchsia/fuchsia_trace_utils_unittest.cc" ]
  }
  if (enable_perfetto_trace_processor_syscalls) {
    sources += [ "syscall_tracker_unittest.cc" ]
  }
}

source_set("integrationtests") {
  testonly = true
  sources = []
  deps = []
  if (enable_perfetto_trace_processor_sqlite) {
    sources += [ "trace_database_integrationtest.cc" ]
    deps += [
      ":lib",
      ":storage_full",
      "../../gn:default_deps",
      "../../gn:gtest_and_gmock",
      "../base",
      "../base:test_support",
      "sqlite",
    ]

    if (enable_perfetto_trace_processor_json_import) {
      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 = [
    ":storage_full",
    "../../gn:default_deps",
    "../base",
  ]
}
