blob: 8c39316bcf4bd6a48dbf648e5eb792943988f176 [file] [log] [blame]
build_config_dir_ = "include/perfetto/base/build_configs/bazel"
# Deliberately NOT a perfetto_cc_library, to avoid cyclic deps.
# This is pulled as a default dep by all targets.
perfetto_build_config_cc_library(
name = "build_config_hdr",
hdrs = [build_config_dir_ + "/perfetto_build_flags.h"],
includes = [build_config_dir_],
)
perfetto_cc_library(
name = "cc_amalgamated_sql_metrics",
hdrs = ["src/trace_processor/metrics/sql/amalgamated_sql_metrics.h"],
)
perfetto_py_binary(
name = "gen_amalgamated_sql_metrics_py",
srcs = [
"tools/gen_amalgamated_sql_metrics.py",
],
main = "tools/gen_amalgamated_sql_metrics.py",
python_version = "PY3",
)
perfetto_py_binary(
name = "gen_cc_proto_descriptor_py",
srcs = [
"tools/gen_cc_proto_descriptor.py",
],
main = "tools/gen_cc_proto_descriptor.py",
python_version = "PY3",
)
perfetto_java_proto_library(
name = "protos_perfetto_metrics_java",
deps = [
":protos_perfetto_metrics_protos",
],
)
perfetto_java_proto_library(
name = "protos_perfetto_metrics_android_java",
deps = [
":protos_perfetto_metrics_android_protos",
],
)
perfetto_java_proto_library(
name = "protos_perfetto_trace_merged_trace_java",
deps = [
":protos_perfetto_trace_merged_trace_protos",
],
)
perfetto_java_proto_library(
name = "protos_perfetto_config_merged_config_java",
deps = [
":protos_perfetto_config_merged_config_protos",
],
)
perfetto_java_lite_proto_library(
name = "protos_perfetto_config_merged_config_java_lite",
deps = [
":protos_perfetto_config_merged_config_protos",
],
)
perfetto_gensignature_internal_only(
name = "trace_processor_sig",
srcs = [
":trace_processor_shell",
":trace_to_text",
],
tags = [
"__TRACE_PROCESSOR_SIG_TAG1",
"__TRACE_PROCESSOR_SIG_TAG2",
],
)
# This is overridden in google internal builds via
# PERFETTO_CONFIG.deps.version_header (see perfetto_cfg.bzl).
perfetto_cc_library(
name = "cc_perfetto_version_header",
hdrs = ["perfetto_version.gen.h"],
)
perfetto_py_binary(
name = "gen_version_header_py",
srcs = ["tools/write_version_header.py"],
data = ["CHANGELOG"],
main = "tools/write_version_header.py",
python_version = "PY3",
)
perfetto_py_binary(
name = "trace_processor_py_example",
srcs = ["src/trace_processor/python/example.py"],
deps = [":trace_processor_py"] + PERFETTO_CONFIG.deps.pandas_py,
main = "src/trace_processor/python/example.py",
python_version = "PY3",
)
perfetto_py_library(
name = "trace_processor_py",
srcs = glob(["src/trace_processor/python/perfetto/trace_processor/*.py"]),
data = [
"src/trace_processor/python/perfetto/trace_processor/trace_processor.descriptor",
"src/trace_processor/python/perfetto/trace_processor/metrics.descriptor",
":trace_processor_shell",
] + PERFETTO_CONFIG.deps.tp_init_py,
deps = PERFETTO_CONFIG.deps.gfile_py +
PERFETTO_CONFIG.deps.protobuf_py +
PERFETTO_CONFIG.deps.protobuf_descriptor_pb2_py +
PERFETTO_CONFIG.deps.pyglib_py,
imports = [
"src/trace_processor/python",
],
visibility = PERFETTO_CONFIG.public_visibility,
)
perfetto_py_library(
name = "experimental_slice_breakdown_lib",
srcs = glob(["tools/slice_breakdown/perfetto/slice_breakdown/*.py"]),
deps = [
":trace_processor_py",
],
imports = [
"tools/slice_breakdown",
],
)
perfetto_py_binary(
name = "experimental_slice_breakdown_bin",
srcs = ["tools/slice_breakdown/main.py"],
main = "tools/slice_breakdown/main.py",
deps = [
":experimental_slice_breakdown_lib",
":trace_processor_py",
] + PERFETTO_CONFIG.deps.pandas_py,
python_version = "PY3",
legacy_create_init = 0,
)
perfetto_py_library(
name = "batch_trace_processor",
srcs = glob([
"tools/batch_trace_processor/perfetto/batch_trace_processor/*.py"
]),
deps = [
":trace_processor_py",
] + PERFETTO_CONFIG.deps.pandas_py,
imports = [
"tools/batch_trace_processor",
],
)
perfetto_py_binary(
name = "batch_trace_processor_shell",
srcs = ["tools/batch_trace_processor/main.py"],
main = "tools/batch_trace_processor/main.py",
deps = [
":trace_processor_py",
":batch_trace_processor",
] + PERFETTO_CONFIG.deps.pandas_py,
python_version = "PY3",
legacy_create_init = 0,
)