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") 16import("../../../gn/test.gni") 17 18source_set("unwind_support") { 19 public_deps = [ "../../../gn:libunwindstack" ] 20 deps = [ 21 "../../../gn:default_deps", 22 "../../../src/base", 23 ] 24 sources = [ 25 "unwind_support.cc", 26 "unwind_support.h", 27 ] 28} 29 30source_set("callstack_trie") { 31 public_deps = [ ":unwind_support" ] 32 deps = [ 33 ":interner", 34 "../../../gn:default_deps", 35 "../../../src/base", 36 ] 37 sources = [ 38 "callstack_trie.cc", 39 "callstack_trie.h", 40 ] 41} 42 43source_set("interner") { 44 deps = [ 45 "../../../gn:default_deps", 46 "../../../src/base", 47 ] 48 sources = [ "interner.h" ] 49} 50 51source_set("interning_output") { 52 deps = [ 53 ":callstack_trie", 54 ":interner", 55 "../../../gn:default_deps", 56 "../../../include/perfetto/ext/tracing/core", 57 "../../../protos/perfetto/trace:zero", 58 "../../../protos/perfetto/trace/interned_data:zero", 59 "../../../protos/perfetto/trace/profiling:zero", 60 ] 61 sources = [ 62 "interning_output.cc", 63 "interning_output.h", 64 ] 65} 66 67source_set("proc_utils") { 68 deps = [ 69 "../../../gn:default_deps", 70 "../../../include/perfetto/profiling:normalize", 71 "../../base", 72 ] 73 sources = [ 74 "proc_utils.cc", 75 "proc_utils.h", 76 ] 77} 78 79perfetto_unittest_source_set("unittests") { 80 testonly = true 81 deps = [ 82 ":interner", 83 ":proc_utils", 84 "../../../gn:default_deps", 85 "../../../gn:gtest_and_gmock", 86 "../../../include/perfetto/profiling:normalize", 87 "../../base", 88 "../../base:test_support", 89 ] 90 sources = [ 91 "interner_unittest.cc", 92 "proc_utils_unittest.cc", 93 ] 94} 95