1# Copyright (C) 2020 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15import("../../../gn/perfetto.gni") 16 17# Track event args parsing logic here is tentatitively planned to eventually 18# move to src/util and will be used to implement writing typed args in console 19# interceptor. 20# Do not add new dependencies to trace_processor code outside of this directory. 21# 22# TODO(altimin): Move it to src/util and use it in console interceptor. 23 24source_set("util") { 25 sources = [ "status_macros.h" ] 26 deps = [ 27 "../../../gn:default_deps", 28 "../../../include/perfetto/trace_processor:basic_types", 29 ] 30} 31 32source_set("gzip") { 33 sources = [ 34 "gzip_utils.cc", 35 "gzip_utils.h", 36 ] 37 deps = [ 38 "../../../gn:default_deps", 39 "../../../include/perfetto/base", 40 ] 41 42 # gzip_utils optionally depends on zlib. 43 if (enable_perfetto_zlib) { 44 deps += [ "../../../gn:zlib" ] 45 } 46} 47 48source_set("protozero_to_text") { 49 sources = [ 50 "protozero_to_text.cc", 51 "protozero_to_text.h", 52 ] 53 deps = [ 54 ":descriptors", 55 "../../../gn:default_deps", 56 "../../../protos/perfetto/common:zero", 57 "../../../protos/perfetto/trace/track_event:zero", 58 "../../base", 59 "../../protozero", 60 "../importers:gen_cc_track_event_descriptor", 61 ] 62} 63 64source_set("interned_message_view") { 65 sources = [ "interned_message_view.h" ] 66 public_deps = [ "../../../include/perfetto/trace_processor" ] 67 deps = [ 68 "../../../gn:default_deps", 69 "../../base", 70 ] 71} 72 73source_set("descriptors") { 74 sources = [ 75 "descriptors.cc", 76 "descriptors.h", 77 ] 78 deps = [ 79 ":util", 80 "../../../gn:default_deps", 81 "../../../protos/perfetto/common:zero", 82 "../../../protos/perfetto/trace_processor:zero", 83 "../../base", 84 "../../protozero", 85 "../importers:gen_cc_track_event_descriptor", 86 ] 87} 88 89source_set("proto_to_args_parser") { 90 sources = [ 91 "debug_annotation_parser.cc", 92 "debug_annotation_parser.h", 93 "proto_to_args_parser.cc", 94 "proto_to_args_parser.h", 95 ] 96 deps = [ 97 "../../../gn:default_deps", 98 "../../../protos/perfetto/common:zero", 99 "../../../protos/perfetto/trace/interned_data:zero", 100 "../../../protos/perfetto/trace/track_event:zero", 101 "../../../protos/perfetto/trace_processor:zero", 102 "../../protozero", 103 "../importers:gen_cc_track_event_descriptor", 104 ] 105 106 public_deps = [ 107 ":descriptors", 108 ":interned_message_view", 109 ":util", 110 "../../base", 111 ] 112} 113 114source_set("unittests") { 115 sources = [ 116 "debug_annotation_parser_unittest.cc", 117 "proto_to_args_parser_unittest.cc", 118 "protozero_to_text_unittests.cc", 119 ] 120 if (enable_perfetto_zlib) { 121 sources += [ "gzip_utils_unittest.cc" ] 122 } 123 testonly = true 124 deps = [ 125 ":descriptors", 126 ":gzip", 127 ":proto_to_args_parser", 128 ":protozero_to_text", 129 "..:gen_cc_test_messages_descriptor", 130 "../../../gn:default_deps", 131 "../../../gn:gtest_and_gmock", 132 "../../../protos/perfetto/common:zero", 133 "../../../protos/perfetto/trace:non_minimal_zero", 134 "../../../protos/perfetto/trace/track_event:zero", 135 "../../protozero", 136 "../../protozero:testing_messages_zero", 137 "../importers:gen_cc_track_event_descriptor", 138 ] 139} 140