• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023 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/test.gni")
16
17source_set("record") {
18  sources = [
19    "perf_counter.cc",
20    "perf_counter.h",
21    "perf_event.h",
22    "perf_event_attr.cc",
23    "perf_event_attr.h",
24    "perf_session.cc",
25    "perf_session.h",
26    "reader.h",
27    "record.h",
28  ]
29  deps = [
30    "../../../../gn:default_deps",
31    "../../../../include/perfetto/ext/base:base",
32    "../../../../include/perfetto/trace_processor:trace_processor",
33    "../../../../protos/perfetto/trace/profiling:zero",
34    "../../storage",
35    "../../tables:tables_python",
36    "../../types",
37    "../../util:build_id",
38    "../common:parser_types",
39  ]
40}
41
42source_set("tracker") {
43  sources = [
44    "dso_tracker.cc",
45    "dso_tracker.h",
46  ]
47  deps = [
48    "../../../../gn:default_deps",
49    "../../../../include/perfetto/ext/base:base",
50    "../../../../protos/third_party/simpleperf:zero",
51    "../..//storage:storage",
52    "../..//tables:tables",
53    "../..//types:types",
54    "../common:common",
55  ]
56}
57
58source_set("perf") {
59  sources = [
60    "attrs_section_reader.cc",
61    "attrs_section_reader.h",
62    "features.cc",
63    "features.h",
64    "mmap_record.cc",
65    "mmap_record.h",
66    "perf_data_tokenizer.cc",
67    "perf_data_tokenizer.h",
68    "perf_file.h",
69    "record_parser.cc",
70    "record_parser.h",
71    "sample.cc",
72    "sample.h",
73  ]
74  public_deps = [ ":record" ]
75  deps = [
76    ":tracker",
77    "../../../../gn:default_deps",
78    "../../../../protos/perfetto/trace:zero",
79    "../../../../protos/perfetto/trace/profiling:zero",
80    "../../../../protos/third_party/simpleperf:zero",
81    "../../sorter",
82    "../../storage",
83    "../../tables:tables_python",
84    "../../types",
85    "../../util:build_id",
86    "../../util:file_buffer",
87    "../../util:util",
88    "../common:common",
89    "../proto:minimal",
90  ]
91}
92
93perfetto_unittest_source_set("unittests") {
94  testonly = true
95  sources = [
96    "perf_session_unittest.cc",
97    "reader_unittest.cc",
98  ]
99  deps = [
100    ":perf",
101    "../../../../gn:default_deps",
102    "../../../../gn:gtest_and_gmock",
103    "../../../../protos/perfetto/trace/profiling:zero",
104    "../../../base",
105    "../../storage",
106    "../../types",
107    "../common",
108  ]
109}
110