| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//third_party/protobuf/proto_library.gni") | 5 import("//third_party/protobuf/proto_library.gni") |
| 6 | 6 |
| 7 component("tracing") { | 7 component("tracing") { |
| 8 sources = [ | 8 sources = [ |
| 9 "child/child_memory_dump_manager_delegate_impl.cc", | 9 "child/child_memory_dump_manager_delegate_impl.cc", |
| 10 "child/child_memory_dump_manager_delegate_impl.h", | 10 "child/child_memory_dump_manager_delegate_impl.h", |
| 11 "child/child_trace_message_filter.cc", | 11 "child/child_trace_message_filter.cc", |
| 12 "child/child_trace_message_filter.h", | 12 "child/child_trace_message_filter.h", |
| 13 "common/graphics_memory_dump_provider_android.cc", | 13 "common/graphics_memory_dump_provider_android.cc", |
| 14 "common/graphics_memory_dump_provider_android.h", | 14 "common/graphics_memory_dump_provider_android.h", |
| 15 "common/process_metrics_memory_dump_provider.cc", | 15 "common/process_metrics_memory_dump_provider.cc", |
| 16 "common/process_metrics_memory_dump_provider.h", | 16 "common/process_metrics_memory_dump_provider.h", |
| 17 "common/tracing_messages.cc", | 17 "common/tracing_messages.cc", |
| 18 "common/tracing_messages.h", | 18 "common/tracing_messages.h", |
| 19 "core/proto_utils.h", | 19 "core/proto_utils.h", |
| 20 "core/proto_zero_message.cc", | 20 "core/proto_zero_message.cc", |
| 21 "core/proto_zero_message.h", | 21 "core/proto_zero_message.h", |
| 22 "core/proto_zero_message_handle.cc", | 22 "core/proto_zero_message_handle.cc", |
| 23 "core/proto_zero_message_handle.h", | 23 "core/proto_zero_message_handle.h", |
| 24 "core/scattered_stream_writer.cc", | 24 "core/scattered_stream_writer.cc", |
| 25 "core/scattered_stream_writer.h", | 25 "core/scattered_stream_writer.h", |
| 26 "core/trace_buffer_writer.cc", |
| 27 "core/trace_buffer_writer.h", |
| 26 "core/trace_ring_buffer.cc", | 28 "core/trace_ring_buffer.cc", |
| 27 "core/trace_ring_buffer.h", | 29 "core/trace_ring_buffer.h", |
| 28 "tracing_export.h", | 30 "tracing_export.h", |
| 29 ] | 31 ] |
| 30 | 32 |
| 31 defines = [ "TRACING_IMPLEMENTATION" ] | 33 defines = [ "TRACING_IMPLEMENTATION" ] |
| 32 | 34 |
| 33 deps = [ | 35 deps = [ |
| 36 ":tracing_protos", |
| 34 "//base", | 37 "//base", |
| 35 "//ipc", | 38 "//ipc", |
| 36 ] | 39 ] |
| 37 | 40 |
| 38 if (is_nacl) { | 41 if (is_nacl) { |
| 39 sources -= [ "common/process_metrics_memory_dump_provider.cc" ] | 42 sources -= [ "common/process_metrics_memory_dump_provider.cc" ] |
| 40 } | 43 } |
| 41 } | 44 } |
| 42 | 45 |
| 43 component("startup_tracing") { | 46 component("startup_tracing") { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 source_set("unit_tests") { | 96 source_set("unit_tests") { |
| 94 testonly = true | 97 testonly = true |
| 95 | 98 |
| 96 sources = [ | 99 sources = [ |
| 97 "child/child_trace_message_filter_unittest.cc", | 100 "child/child_trace_message_filter_unittest.cc", |
| 98 "common/graphics_memory_dump_provider_android_unittest.cc", | 101 "common/graphics_memory_dump_provider_android_unittest.cc", |
| 99 "common/process_metrics_memory_dump_provider_unittest.cc", | 102 "common/process_metrics_memory_dump_provider_unittest.cc", |
| 100 "core/proto_utils_unittest.cc", | 103 "core/proto_utils_unittest.cc", |
| 101 "core/proto_zero_message_unittest.cc", | 104 "core/proto_zero_message_unittest.cc", |
| 102 "core/scattered_stream_writer_unittest.cc", | 105 "core/scattered_stream_writer_unittest.cc", |
| 106 "core/trace_buffer_writer_unittest.cc", |
| 103 "core/trace_ring_buffer_unittest.cc", | 107 "core/trace_ring_buffer_unittest.cc", |
| 104 "test/fake_scattered_buffer.cc", | 108 "test/fake_scattered_buffer.cc", |
| 105 "test/proto_zero_generation_unittest.cc", | 109 "test/proto_zero_generation_unittest.cc", |
| 106 ] | 110 ] |
| 107 | 111 |
| 108 deps = [ | 112 deps = [ |
| 113 ":golden_protos_for_tests", |
| 109 ":proto_zero_testing_messages", | 114 ":proto_zero_testing_messages", |
| 110 ":tracing", | 115 ":tracing", |
| 111 "//base/test:test_support", | 116 "//base/test:test_support", |
| 112 "//ipc", | 117 "//ipc", |
| 113 "//testing/gmock:gmock", | 118 "//testing/gmock:gmock", |
| 114 "//testing/gtest", | 119 "//testing/gtest", |
| 115 ] | 120 ] |
| 116 | 121 |
| 117 if (!is_android) { | 122 if (!is_android) { |
| 118 sources += [ "browser/trace_config_file_unittest.cc" ] | 123 sources += [ "browser/trace_config_file_unittest.cc" ] |
| 119 deps += [ ":startup_tracing" ] | 124 deps += [ ":startup_tracing" ] |
| 120 } | 125 } |
| 121 } | 126 } |
| 127 |
| 128 proto_library("golden_protos_for_tests") { |
| 129 visibility = [ ":unit_tests" ] |
| 130 proto_out_dir = "components/tracing/test/golden_protos" |
| 131 sources = [ |
| 132 "proto/events_chunk.proto", |
| 133 ] |
| 134 } |
| 135 |
| 136 proto_library("tracing_protos") { |
| 137 visibility = [ "//components/tracing/*" ] |
| 138 |
| 139 sources = [ |
| 140 "proto/event.proto", |
| 141 "proto/event_args_for_testing.proto", |
| 142 "proto/events_chunk.proto", |
| 143 ] |
| 144 |
| 145 generator_plugin_label = "tools/proto_zero_plugin:proto_zero_plugin" |
| 146 generator_plugin_suffix = ".pbzero" |
| 147 generate_cc = false |
| 148 generate_python = false |
| 149 |
| 150 # TODO(kraynov) Move away this complex path evaluation and dependency |
| 151 # injection to proto_library.gni. All lines below should be removed. |
| 152 # The problem is that root_out_dir and root_build_dir may differ in case of |
| 153 # cross compilation. Also .exe will be appended on Windows. |
| 154 |
| 155 plugin_host_label = generator_plugin_label + "($host_toolchain)" |
| 156 generator_plugin = |
| 157 rebase_path(get_label_info(plugin_host_label, "root_out_dir") + "/" + |
| 158 get_label_info(plugin_host_label, "name"), |
| 159 root_build_dir) |
| 160 if (is_win) { |
| 161 generator_plugin += ".exe" |
| 162 } |
| 163 |
| 164 deps = [ |
| 165 plugin_host_label, |
| 166 ] |
| 167 } |
| OLD | NEW |