summaryrefslogtreecommitdiffstats
path: root/base/trace_event/BUILD.gn
blob: ed8761fc7790d1747fbaf8bc52650e57d2af3cd7 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Copyright 2015 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.

source_set("trace_event") {
  sources = [
    "memory_allocator_attributes.h",
    "memory_allocator_dump.cc",
    "memory_allocator_dump.h",
    "memory_dump_manager.cc",
    "memory_dump_manager.h",
    "memory_dump_provider.cc",
    "memory_dump_provider.h",
    "memory_dump_request_args.h",
    "process_memory_dump.cc",
    "process_memory_dump.h",
    "process_memory_maps.cc",
    "process_memory_maps.h",
    "process_memory_maps_dump_provider.cc",
    "process_memory_maps_dump_provider.h",
    "process_memory_totals.cc",
    "process_memory_totals.h",
    "process_memory_totals_dump_provider.cc",
    "process_memory_totals_dump_provider.h",
    "trace_event.h",
    "trace_event_android.cc",
    "trace_event_argument.cc",
    "trace_event_argument.h",
    "trace_event_etw_export_win.cc",
    "trace_event_etw_export_win.h",
    "trace_event_impl.cc",
    "trace_event_impl.h",
    "trace_event_impl_constants.cc",
    "trace_event_memory.cc",
    "trace_event_memory.h",
    "trace_event_synthetic_delay.cc",
    "trace_event_synthetic_delay.h",
    "trace_event_system_stats_monitor.cc",
    "trace_event_system_stats_monitor.h",
    "trace_event_win.cc",
    "trace_event_win.h",
  ]

  if (is_nacl) {
    sources -= [
      "process_memory_totals_dump_provider.cc",
      "trace_event_system_stats_monitor.cc",
    ]
  }

  if (is_linux || is_android) {
    sources += [
      "malloc_dump_provider.cc",
      "malloc_dump_provider.h",
    ]
  }

  configs += [ "//base:base_implementation" ]

  deps = [
    "//base/debug",
    "//base/json",
    "//base/memory",
    "//base/process",
    "//base/third_party/dynamic_annotations",
  ]

  if (is_win) {
    deps += [ "//base/trace_event/etw_manifest:chrome_events_win" ]
  }

  allow_circular_includes_from = [
    "//base/debug",
    "//base/memory",
    "//base/process",
  ]

  visibility = [ "//base/*" ]
}

source_set("trace_event_unittests") {
  testonly = true
  sources = [
    "memory_allocator_dump_unittest.cc",
    "memory_dump_manager_unittest.cc",
    "process_memory_maps_dump_provider_unittest.cc",
    "process_memory_totals_dump_provider_unittest.cc",
    "trace_event_argument_unittest.cc",
    "trace_event_memory_unittest.cc",
    "trace_event_synthetic_delay_unittest.cc",
    "trace_event_system_stats_monitor_unittest.cc",
    "trace_event_unittest.cc",
    "trace_event_win_unittest.cc",
  ]

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