| # Copyright (C) 2020 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/perfetto.gni") |
| |
| # Track event args parsing logic here is tentatitively planned to eventually |
| # move to src/util and will be used to implement writing typed args in console |
| # interceptor. |
| # Do not add new dependencies to trace_processor code outside of this directory. |
| # |
| # TODO(altimin): Move it to src/util and use it in console interceptor. |
| |
| source_set("util") { |
| sources = [ "status_macros.h" ] |
| deps = [ |
| "../../../gn:default_deps", |
| "../../../include/perfetto/trace_processor:basic_types", |
| ] |
| } |
| |
| source_set("gzip") { |
| sources = [ |
| "gzip_utils.cc", |
| "gzip_utils.h", |
| ] |
| deps = [ |
| "../../../gn:default_deps", |
| "../../../include/perfetto/base", |
| ] |
| |
| # gzip_utils optionally depends on zlib. |
| if (enable_perfetto_zlib) { |
| deps += [ "../../../gn:zlib" ] |
| } |
| } |
| |
| source_set("stack_traces_util") { |
| sources = [ |
| "stack_traces_util.cc", |
| "stack_traces_util.h", |
| ] |
| deps = [ |
| "../../../gn:default_deps", |
| "../../../include/perfetto/ext/base:base", |
| ] |
| } |
| |
| source_set("protozero_to_text") { |
| sources = [ |
| "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", |
| "../importers:gen_cc_track_event_descriptor", |
| ] |
| } |
| |
| source_set("interned_message_view") { |
| sources = [ "interned_message_view.h" ] |
| public_deps = [ "../../../include/perfetto/trace_processor" ] |
| deps = [ |
| "../../../gn:default_deps", |
| "../../base", |
| ] |
| } |
| |
| source_set("descriptors") { |
| sources = [ |
| "descriptors.cc", |
| "descriptors.h", |
| ] |
| deps = [ |
| ":util", |
| "../../../gn:default_deps", |
| "../../../protos/perfetto/common:zero", |
| "../../../protos/perfetto/trace_processor:zero", |
| "../../base", |
| "../../protozero", |
| "../importers:gen_cc_track_event_descriptor", |
| ] |
| } |
| |
| source_set("proto_to_args_parser") { |
| sources = [ |
| "debug_annotation_parser.cc", |
| "debug_annotation_parser.h", |
| "proto_to_args_parser.cc", |
| "proto_to_args_parser.h", |
| ] |
| deps = [ |
| "../../../gn:default_deps", |
| "../../../protos/perfetto/common:zero", |
| "../../../protos/perfetto/trace/interned_data:zero", |
| "../../../protos/perfetto/trace/track_event:zero", |
| "../../../protos/perfetto/trace_processor:zero", |
| "../../protozero", |
| "../importers:gen_cc_track_event_descriptor", |
| ] |
| |
| public_deps = [ |
| ":descriptors", |
| ":interned_message_view", |
| ":util", |
| "../../base", |
| ] |
| } |
| |
| source_set("zip_reader") { |
| sources = [ |
| "streaming_line_reader.cc", |
| "streaming_line_reader.h", |
| "zip_reader.cc", |
| "zip_reader.h", |
| ] |
| deps = [ |
| ":gzip", |
| "../../../gn:default_deps", |
| "../../base", |
| ] |
| if (enable_perfetto_zlib) { |
| deps += [ "../../../gn:zlib" ] |
| } |
| } |
| |
| source_set("proto_profiler") { |
| sources = [ |
| "proto_profiler.cc", |
| "proto_profiler.h", |
| ] |
| deps = [ |
| "../../../gn:default_deps", |
| "../../../gn:protobuf_lite", |
| "../../../protos/perfetto/common:zero", |
| "../../../protos/third_party/pprof:zero", |
| "../../base", |
| "../../protozero", |
| ] |
| } |
| |
| source_set("unittests") { |
| sources = [ |
| "debug_annotation_parser_unittest.cc", |
| "proto_to_args_parser_unittest.cc", |
| "protozero_to_text_unittests.cc", |
| "streaming_line_reader_unittest.cc", |
| "zip_reader_unittest.cc", |
| ] |
| testonly = true |
| deps = [ |
| ":descriptors", |
| ":gzip", |
| ":proto_to_args_parser", |
| ":protozero_to_text", |
| ":zip_reader", |
| "..:gen_cc_test_messages_descriptor", |
| "../../../gn:default_deps", |
| "../../../gn:gtest_and_gmock", |
| "../../../protos/perfetto/common:zero", |
| "../../../protos/perfetto/trace:non_minimal_zero", |
| "../../../protos/perfetto/trace/track_event:zero", |
| "../../protozero", |
| "../../protozero:testing_messages_zero", |
| "../importers:gen_cc_track_event_descriptor", |
| ] |
| if (enable_perfetto_zlib) { |
| sources += [ "gzip_utils_unittest.cc" ] |
| deps += [ "../../../gn:zlib" ] |
| } |
| |
| # There's a dependency on protobuf_lite in perfetto_unittests in Chromium, |
| # and it breaks Windows builds when combined with the protobuf_full |
| # depenedency coming from this test. See b/241234937 for more details. |
| # This should be fixable, but it doesn't seem to be trivial. So let's disable |
| # it in Chromium for now. |
| if (!build_with_chromium) { |
| sources += [ "proto_profiler_unittest.cc" ] |
| deps += [ |
| ":proto_profiler", |
| "../../../gn:protobuf_full", |
| ] |
| } |
| } |