1# Copyright (C) 2019 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_tp_tables.gni") 16import("../../../gn/test.gni") 17 18perfetto_tp_tables("tables_python") { 19 sources = [ 20 "android_tables.py", 21 "counter_tables.py", 22 "etm_tables.py", 23 "flow_tables.py", 24 "jit_tables.py", 25 "memory_tables.py", 26 "metadata_tables.py", 27 "perf_tables.py", 28 "profiler_tables.py", 29 "sched_tables.py", 30 "slice_tables.py", 31 "trace_proto_tables.py", 32 "track_tables.py", 33 "v8_tables.py", 34 "winscope_tables.py", 35 ] 36 generate_docs = true 37} 38 39source_set("tables") { 40 sources = [ 41 "macros_internal.cc", 42 "macros_internal.h", 43 "table_destructors.cc", 44 ] 45 deps = [ 46 "../../../gn:default_deps", 47 "../../../include/perfetto/ext/base", 48 "../../../include/perfetto/trace_processor", 49 "../containers", 50 "../db:minimal", 51 "../db/column", 52 ] 53 public_deps = [ ":tables_python" ] 54} 55 56perfetto_tp_tables("py_tables_unittest") { 57 sources = [ "py_tables_unittest.py" ] 58} 59 60source_set("unittests") { 61 testonly = true 62 sources = [ "py_tables_unittest.cc" ] 63 deps = [ 64 ":py_tables_unittest", 65 ":tables", 66 "../../../gn:default_deps", 67 "../../../gn:gtest_and_gmock", 68 "../containers", 69 "../db", 70 "../db/column", 71 ] 72} 73 74if (enable_perfetto_benchmarks) { 75 source_set("benchmarks") { 76 testonly = true 77 deps = [ 78 ":py_tables_benchmark", 79 "../../../gn:benchmark", 80 "../../../gn:default_deps", 81 "../../../include/perfetto/trace_processor", 82 "../containers", 83 "../db", 84 "../db/column", 85 ] 86 sources = [ "py_tables_benchmark.cc" ] 87 } 88 perfetto_tp_tables("py_tables_benchmark") { 89 sources = [ "py_tables_benchmark.py" ] 90 } 91} 92