blob: d567efcb7d5f0f3997bd3130ab7f72a641545d43 [file]
# Copyright (C) 2026 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")
source_set("shell") {
sources = [
"agent_mode.cc",
"agent_mode.h",
"bundle_subcommand.cc",
"bundle_subcommand.h",
"common_flags.cc",
"common_flags.h",
"convert_helpers.cc",
"convert_helpers.h",
"convert_subcommand.cc",
"convert_subcommand.h",
"csv_result_formatter.cc",
"csv_result_formatter.h",
"export_subcommand.cc",
"export_subcommand.h",
"interactive.cc",
"interactive.h",
"interactive_subcommand.cc",
"interactive_subcommand.h",
"markdown_result_formatter.cc",
"markdown_result_formatter.h",
"metatrace.cc",
"metatrace.h",
"metrics.cc",
"metrics.h",
"metrics_subcommand.cc",
"metrics_subcommand.h",
"query.cc",
"query.h",
"query_subcommand.cc",
"query_subcommand.h",
"result_formatter.cc",
"result_formatter.h",
"server_subcommand.cc",
"server_subcommand.h",
"shell_utils.cc",
"shell_utils.h",
"sql_packages.cc",
"sql_packages.h",
"summarize_subcommand.cc",
"summarize_subcommand.h",
"table_result_formatter.cc",
"table_result_formatter.h",
"util_subcommand.cc",
"util_subcommand.h",
]
deps = [
":subcommands",
"../../../gn:default_deps",
"../../../gn:protobuf_full",
"../../../gn:sqlite",
"../../../include/perfetto/ext/trace_processor:trace_processor_shell",
"../../../protos/perfetto/trace_processor:zero",
"../../base",
"../../base:version",
"../../protozero/text_to_proto",
"../../traceconv:gen_cc_android_extension_descriptor",
"../../traceconv:gen_cc_trace_descriptor",
"../../traceconv:lib",
"../../traceconv:utils",
"../metrics",
"../rpc",
"../rpc:lifecycle",
"../rpc:session_util",
"../rpc:stdiod",
"../trace_summary",
"../trace_summary:gen_cc_trace_summary_descriptor",
"../util:json_value",
"../util:simple_json_serializer",
"../util:stdlib",
"../util:tar_writer",
"../util/deobfuscation:deobfuscator",
"../util/symbolizer",
"../util/symbolizer:symbolize_database",
]
if (enable_perfetto_trace_processor_linenoise) {
deps += [ "../../../gn:linenoise" ]
}
if (enable_perfetto_trace_processor_httpd) {
deps += [ "../rpc:httpd" ]
}
if (enable_perfetto_ipc) {
deps += [
"../rpc:client",
"../rpc:unixd",
]
}
public_deps = [ "../../../include/perfetto/trace_processor" ]
}
source_set("subcommands") {
sources = [
"subcommand.cc",
"subcommand.h",
"traceconv_compat.cc",
"traceconv_compat.h",
]
deps = [
"../../../gn:default_deps",
"../../base",
]
}
source_set("unittests") {
testonly = true
sources = [
"agent_mode_unittest.cc",
"convert_helpers_unittest.cc",
"csv_result_formatter_unittest.cc",
"find_subcommand_unittest.cc",
"markdown_result_formatter_unittest.cc",
"shell_utils_unittest.cc",
"subcommand_flags_unittest.cc",
"table_result_formatter_unittest.cc",
]
deps = [
":shell",
":subcommands",
"..:local_file_system",
"../../../gn:default_deps",
"../../../gn:gtest_and_gmock",
"../../../gn:protobuf_full",
"../../../gn:sqlite",
"../../../include/perfetto/ext/trace_processor:trace_processor_shell",
"../../../include/perfetto/trace_processor:io",
"../../base",
]
}
if (enable_perfetto_integration_tests) {
source_set("integrationtests") {
testonly = true
sources = [ "bundle_integrationtest.cc" ]
deps = [
"..:trace_processor_shell_lib",
"../../../gn:default_deps",
"../../../gn:gtest_and_gmock",
"../../../include/perfetto/ext/base",
"../../../include/perfetto/ext/trace_processor:trace_processor_shell",
"../../../include/perfetto/trace_processor",
"../../../protos/perfetto/trace:cpp",
"../../../protos/perfetto/trace/ftrace:cpp",
"../../../protos/perfetto/trace/interned_data:cpp",
"../../../protos/perfetto/trace/profiling:cpp",
"../../../test:test_helper",
"../../base:test_support",
]
}
}