blob: 25cb5b9fff4fdf91262793a6c08ae326c63e7936 [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 = [
"bundle_subcommand.cc",
"bundle_subcommand.h",
"common_flags.cc",
"common_flags.h",
"convert_helpers.cc",
"convert_helpers.h",
"convert_subcommand.cc",
"convert_subcommand.h",
"export_subcommand.cc",
"export_subcommand.h",
"interactive.cc",
"interactive.h",
"interactive_subcommand.cc",
"interactive_subcommand.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",
"server_subcommand.cc",
"server_subcommand.h",
"shell_utils.cc",
"shell_utils.h",
"sql_packages.cc",
"sql_packages.h",
"summarize_subcommand.cc",
"summarize_subcommand.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:text_to_proto",
"../../traceconv:gen_cc_android_extension_descriptor",
"../../traceconv:gen_cc_trace_descriptor",
"../../traceconv:lib",
"../metrics",
"../rpc",
"../rpc:lifecycle",
"../rpc:session_util",
"../rpc:stdiod",
"../trace_summary",
"../trace_summary:gen_cc_trace_summary_descriptor",
"../util:json_value",
"../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: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 = [
"convert_helpers_unittest.cc",
"find_subcommand_unittest.cc",
"shell_utils_unittest.cc",
"subcommand_flags_unittest.cc",
]
deps = [
":shell",
":subcommands",
"../../../gn:default_deps",
"../../../gn:gtest_and_gmock",
"../../../gn:protobuf_full",
"../../../gn:sqlite",
"../../base",
]
}