1# Copyright (C) 2022 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 18assert(enable_perfetto_trace_processor_sqlite) 19 20source_set("functions") { 21 sources = [ 22 "base64.cc", 23 "base64.h", 24 "clock_functions.h", 25 "create_function.cc", 26 "create_function.h", 27 "create_view_function.cc", 28 "create_view_function.h", 29 "dfs.cc", 30 "dfs.h", 31 "dominator_tree.cc", 32 "dominator_tree.h", 33 "import.cc", 34 "import.h", 35 "layout_functions.cc", 36 "layout_functions.h", 37 "math.cc", 38 "math.h", 39 "pprof_functions.cc", 40 "pprof_functions.h", 41 "sqlite3_str_split.cc", 42 "sqlite3_str_split.h", 43 "stack_functions.cc", 44 "stack_functions.h", 45 "structural_tree_partition.cc", 46 "structural_tree_partition.h", 47 "to_ftrace.cc", 48 "to_ftrace.h", 49 "utils.h", 50 "window_functions.h", 51 ] 52 deps = [ 53 ":tables", 54 "../../..:demangle", 55 "../../..:export_json", 56 "../../..:metatrace", 57 "../../../../../gn:default_deps", 58 "../../../../../gn:sqlite", 59 "../../../../../include/perfetto/protozero:protozero", 60 "../../../../../protos/perfetto/common:zero", 61 "../../../../../protos/perfetto/trace:zero", 62 "../../../../../protos/perfetto/trace/ftrace:zero", 63 "../../../../../protos/perfetto/trace_processor:zero", 64 "../../../../base", 65 "../../../containers", 66 "../../../db", 67 "../../../db/column", 68 "../../../importers/common", 69 "../../../importers/ftrace:ftrace_descriptors", 70 "../../../perfetto_sql/intrinsics/table_functions", 71 "../../../sqlite", 72 "../../../storage", 73 "../../../types", 74 "../../../util", 75 "../../../util:profile_builder", 76 "../../../util:regex", 77 "../../../util:sql_argument", 78 "../../../util:stdlib", 79 "../../engine", 80 ] 81 public_deps = [ ":interface" ] 82} 83 84source_set("interface") { 85 sources = [ 86 "sql_function.cc", 87 "sql_function.h", 88 ] 89 deps = [ 90 "../../../../../gn:default_deps", 91 "../../../../../gn:sqlite", 92 "../../../../../include/perfetto/trace_processor:basic_types", 93 "../../../../base", 94 ] 95} 96 97perfetto_tp_tables("tables") { 98 sources = [ "tables.py" ] 99} 100 101perfetto_unittest_source_set("unittests") { 102 testonly = true 103 sources = [ "sqlite3_str_split_unittest.cc" ] 104 deps = [ 105 ":functions", 106 "../../../../../gn:default_deps", 107 "../../../../../gn:gtest_and_gmock", 108 "../../../../../gn:sqlite", 109 "../../../../base", 110 "../../../sqlite", 111 ] 112} 113