# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//testing/test.gni") import("//build/config/compiler/compiler.gni") config("wrap_find_exidx") { ldflags = [ "-Wl,-wrap,dl_unwind_find_exidx" ] } component("tracing") { sources = [ "child/child_trace_message_filter.cc", "child/child_trace_message_filter.h", "common/graphics_memory_dump_provider_android.cc", "common/graphics_memory_dump_provider_android.h", "common/tracing_messages.cc", "common/tracing_messages.h", "tracing_export.h", ] defines = [ "TRACING_IMPLEMENTATION" ] deps = [ "//base", "//ipc", ] if (is_android && can_unwind_with_cfi_table && is_official_build) { sources += [ "common/native_stack_sampler_android.cc", "common/native_stack_sampler_android.h", "common/stack_unwinder_android.cc", "common/stack_unwinder_android.h", ] deps += [ "//buildtools/third_party/libunwind" ] include_dirs = [ "//buildtools/third_party/libunwind/trunk/include" ] # stack_unwinder_android.cc overrides the dl_unwind_find_exidx function. all_dependent_configs = [ ":wrap_find_exidx" ] } } component("startup_tracing") { sources = [ "common/trace_startup.cc", "common/trace_startup.h", "common/trace_startup_config.cc", "common/trace_startup_config.h", "common/trace_to_console.cc", "common/trace_to_console.h", "common/tracing_switches.cc", "common/tracing_switches.h", "tracing_export.h", ] defines = [ "TRACING_IMPLEMENTATION" ] deps = [ "//base", ] } source_set("unit_tests") { testonly = true sources = [ "child/child_trace_message_filter_unittest.cc", "common/graphics_memory_dump_provider_android_unittest.cc", ] deps = [ ":tracing", "//base/test:test_support", "//ipc", "//testing/gmock:gmock", "//testing/gtest", ] if (!is_android) { sources += [ "common/trace_startup_config_unittest.cc" ] deps += [ ":startup_tracing" ] } if (is_android && can_unwind_with_cfi_table && is_official_build) { sources += [ "common/stack_unwinder_android_unittest.cc" ] } } test("tracing_perftests") { sources = [ "test/perf_test_helpers.cc", "test/perf_test_helpers.h", "test/trace_event_perftest.cc", ] deps = [ "//base:base", "//base/test:test_support", "//base/test:test_support_perf", "//testing/gtest", "//testing/perf", ] data_deps = [ # Needed for isolate script to execute. "//testing:run_perf_test", ] if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] } }