summaryrefslogtreecommitdiffstats
path: root/components/tracing/BUILD.gn
blob: 927aeb67894b1e398c5a2f96a463126df2fd9a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 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.

component("tracing") {
  sources = [
    "child_memory_dump_manager_delegate_impl.cc",
    "child_memory_dump_manager_delegate_impl.h",
    "child_trace_message_filter.cc",
    "child_trace_message_filter.h",
    "graphics_memory_dump_provider_android.cc",
    "graphics_memory_dump_provider_android.h",
    "process_metrics_memory_dump_provider.cc",
    "process_metrics_memory_dump_provider.h",
    "tracing_export.h",
    "tracing_messages.cc",
    "tracing_messages.h",
  ]

  defines = [ "TRACING_IMPLEMENTATION" ]

  deps = [
    "//base",
    "//ipc",
  ]

  if (is_nacl) {
    sources -= [ "process_metrics_memory_dump_provider.cc" ]
  }
}

component("startup_tracing") {
  sources = [
    "trace_config_file.cc",
    "trace_config_file.h",
    "trace_to_console.cc",
    "trace_to_console.h",
    "tracing_export.h",
    "tracing_switches.cc",
    "tracing_switches.h",
  ]

  defines = [ "TRACING_IMPLEMENTATION" ]

  deps = [
    "//base",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "graphics_memory_dump_provider_android_unittest.cc",
    "process_metrics_memory_dump_provider_unittest.cc",
  ]

  deps = [
    ":tracing",
    "//base/test:test_support",
    "//testing/gtest",
  ]

  if (!is_android) {
    sources += [ "trace_config_file_unittest.cc" ]
    deps += [ ":startup_tracing" ]
  }
}