• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("protozero_to_text") {
33  sources = [
34    "protozero_to_text.cc",
35    "protozero_to_text.h",
36  ]
37  deps = [
38    ":descriptors",
39    "../../../gn:default_deps",
40    "../../../protos/perfetto/common:zero",
41    "../../../protos/perfetto/trace/track_event:zero",
42    "../../base",
43    "../../protozero",
44    "../importers:gen_cc_track_event_descriptor",
45  ]
46}
47
48source_set("descriptors") {
49  sources = [
50    "descriptors.cc",
51    "descriptors.h",
52  ]
53  deps = [
54    ":util",
55    "../../../gn:default_deps",
56    "../../../protos/perfetto/common:zero",
57    "../../../protos/perfetto/trace_processor:zero",
58    "../../protozero",
59    "../importers:gen_cc_track_event_descriptor",
60  ]
61  public_deps = [ "../../base" ]
62}
63
64source_set("proto_to_args_parser") {
65  sources = [
66    "proto_to_args_parser.cc",
67    "proto_to_args_parser.h",
68  ]
69  deps = [
70    "../../../gn:default_deps",
71    "../../../protos/perfetto/common:zero",
72    "../../../protos/perfetto/trace/interned_data:zero",
73    "../../../protos/perfetto/trace_processor:zero",
74    "../../protozero",
75    "../importers:gen_cc_track_event_descriptor",
76  ]
77
78  public_deps = [
79    ":descriptors",
80    ":util",
81    "../../base",
82
83    # TODO(altimin): Move InternedMessageView and TraceBlobView here and remove
84    # this dependency.
85    "../importers/common",
86  ]
87}
88
89source_set("unittests") {
90  sources = [
91    "proto_to_args_parser_unittest.cc",
92    "protozero_to_text_unittests.cc",
93  ]
94  testonly = true
95  deps = [
96    ":descriptors",
97    ":proto_to_args_parser",
98    ":protozero_to_text",
99    "..:gen_cc_test_messages_descriptor",
100    "../../../gn:default_deps",
101    "../../../gn:gtest_and_gmock",
102    "../../../protos/perfetto/common:zero",
103    "../../../protos/perfetto/trace/track_event:zero",
104    "../../protozero",
105    "../../protozero:testing_messages_zero",
106    "../importers:gen_cc_track_event_descriptor",
107
108    # TODO(altimin): Move InternedMessageView and TraceBlobView here and remove
109    # this dependency.
110    "..:storage_minimal",
111  ]
112}
113