blob: 93606b73aae4655016c3f242ccf98acecdd5ad6d [file] [log] [blame]
# Copyright (C) 2017 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")
import("../../gn/perfetto_cc_proto_descriptor.gni")
import("../../gn/perfetto_host_executable.gni")
import("../../gn/test.gni")
import("../../gn/wasm.gni")
executable("traceconv") {
testonly = true
deps = [
":main",
"../../gn:default_deps",
]
}
source_set("utils") {
deps = [
"../../gn:default_deps",
"../../include/perfetto/protozero",
"../../include/perfetto/trace_processor",
"../../protos/perfetto/trace:zero",
"../../protos/perfetto/trace/interned_data:zero",
"../../protos/perfetto/trace/profiling:zero",
"../../src/profiling:deobfuscator",
"../../src/profiling/symbolizer",
"../../src/profiling/symbolizer:symbolize_database",
]
public_deps = [ "../../include/perfetto/ext/base" ]
if (enable_perfetto_zlib) {
public_deps += [ "../../gn:zlib" ]
}
sources = [
"utils.cc",
"utils.h",
]
}
source_set("pprofbuilder") {
public_deps = [ "../../include/perfetto/profiling:pprof_builder" ]
deps = [
":utils",
"../../gn:default_deps",
"../../include/perfetto/base",
"../../include/perfetto/protozero",
"../../include/perfetto/trace_processor",
"../../protos/perfetto/trace:zero",
"../../protos/perfetto/trace/profiling:zero",
"../../protos/third_party/pprof:zero",
"../../src/profiling/symbolizer",
"../../src/profiling/symbolizer:symbolize_database",
"../../src/trace_processor/containers:containers",
]
sources = [ "pprof_builder.cc" ]
}
# Exposed in bazel builds.
static_library("libpprofbuilder") {
complete_static_lib = true
public_deps = [ ":pprofbuilder" ]
}
source_set("lib") {
deps = [
":gen_cc_trace_descriptor",
":pprofbuilder",
":utils",
"../../gn:default_deps",
"../../include/perfetto/base",
"../../include/perfetto/ext/traced:sys_stats_counters",
"../../include/perfetto/protozero",
"../../protos/perfetto/trace:zero",
"../../src/profiling:deobfuscator",
"../../src/profiling/symbolizer",
"../../src/profiling/symbolizer:symbolize_database",
"../../src/protozero:proto_ring_buffer",
"../../src/trace_processor:lib",
"../../src/trace_processor:storage_minimal",
"../../src/trace_processor/util:descriptors",
"../../src/trace_processor/util:gzip",
"../../src/trace_processor/util:protozero_to_text",
]
sources = [
"deobfuscate_profile.cc",
"deobfuscate_profile.h",
"symbolize_profile.cc",
"symbolize_profile.h",
"trace_to_hprof.cc",
"trace_to_hprof.h",
"trace_to_json.cc",
"trace_to_json.h",
"trace_to_profile.cc",
"trace_to_profile.h",
"trace_to_systrace.cc",
"trace_to_systrace.h",
"trace_to_text.cc",
"trace_to_text.h",
"trace_to_text.h",
]
}
source_set("main") {
deps = [
":lib",
"../../gn:default_deps",
"../../include/perfetto/ext/base:base",
]
sources = [ "main.cc" ]
}
if (enable_perfetto_ui) {
wasm_lib("traceconv_wasm") {
name = "traceconv"
deps = [
":main",
"../../gn:default_deps",
]
}
}
perfetto_cc_proto_descriptor("gen_cc_trace_descriptor") {
descriptor_name = "trace.descriptor"
descriptor_target = "../../protos/perfetto/trace:descriptor"
}
perfetto_unittest_source_set("unittests") {
testonly = true
deps = [
":lib",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../include/perfetto/base",
"../../include/perfetto/ext/base:base",
]
sources = [ "trace_to_text_unittest.cc" ]
}