| # Copyright (C) 2018 The Android Open Source Project |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("../gn/perfetto.gni") |
| |
| # Prevent that this file is accidentally included in embedder builds. |
| assert(enable_perfetto_tools) |
| |
| # Lists all tools. The root "all" target depends on this. |
| group("tools") { |
| testonly = true |
| deps = [ |
| ":idle_alloc", |
| ":protoc_helper", |
| "ftrace_proto_gen", |
| "proto_to_cpp", |
| "protoprofile", |
| "trace_to_text", |
| "trace_to_text:trace_to_text_lite", |
| ] |
| if (is_linux || is_android) { |
| deps += [ |
| "busy_threads", |
| "cpu_utilization", |
| "dump_ftrace_stats", |
| "skippy", |
| ] |
| } |
| } |
| |
| if (is_linux && enable_perfetto_heapprofd) { |
| executable("profiling_sample_distribution") { |
| sources = [ |
| "profiling_sample_distribution.cc", |
| ] |
| deps = [ |
| "../gn:default_deps", |
| "../src/base", |
| "../src/profiling/memory:client", |
| ] |
| } |
| } |
| |
| copy("protoc_helper") { |
| testonly = true |
| deps = [ |
| "../gn:protoc($host_toolchain)", |
| ] |
| sources = [ |
| "protoc_helper.py", |
| ] |
| outputs = [ |
| "${root_out_dir}/protoc_helper", |
| ] |
| } |
| |
| executable("idle_alloc") { |
| deps = [ |
| "../gn:default_deps", |
| ] |
| sources = [ |
| "idle_alloc.cc", |
| ] |
| } |