| # 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", | |
| "../trace_processor/util/deobfuscation:deobfuscator", | |
| "../trace_processor/util/symbolizer", | |
| "../trace_processor/util/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/trace_processor/containers", | |
| "../trace_processor/util/symbolizer", | |
| "../trace_processor/util/symbolizer:symbolize_database", | |
| ] | |
| sources = [ "pprof_builder.cc" ] | |
| } | |
| # Exposed in bazel builds. | |
| static_library("libpprofbuilder") { | |
| complete_static_lib = true | |
| public_deps = [ ":pprofbuilder" ] | |
| } | |
| source_set("lib") { | |
| public_deps = [ ":pprofbuilder" ] | |
| deps = [ | |
| ":gen_cc_android_extension_descriptor", | |
| ":gen_cc_trace_descriptor", | |
| ":utils", | |
| "../../gn:default_deps", | |
| "../../include/perfetto/base", | |
| "../../include/perfetto/ext/traced:sys_stats_counters", | |
| "../../include/perfetto/protozero", | |
| "../../protos/perfetto/trace:zero", | |
| "../protozero:proto_ring_buffer", | |
| "../trace_processor:export_json", | |
| "../trace_processor:lib", | |
| "../trace_processor:storage_minimal", | |
| "../trace_processor/util:decompressor", | |
| "../trace_processor/util:descriptors", | |
| "../trace_processor/util:protozero_to_text", | |
| "../trace_processor/util:tar_writer", | |
| "../trace_processor/util:trace_type", | |
| "../trace_processor/util/deobfuscation:deobfuscator", | |
| "../trace_processor/util/symbolizer", | |
| "../trace_processor/util/symbolizer:symbolize_database", | |
| "../trace_processor/util/trace_enrichment", | |
| ] | |
| sources = [ | |
| "deobfuscate_profile.cc", | |
| "deobfuscate_profile.h", | |
| "symbolize_profile.cc", | |
| "symbolize_profile.h", | |
| "trace_to_bundle.cc", | |
| "trace_to_bundle.h", | |
| "trace_to_firefox.cc", | |
| "trace_to_firefox.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_unpack.cc", | |
| "trace_unpack.h", | |
| ] | |
| } | |
| source_set("main") { | |
| deps = [ | |
| ":traceconv_lib", | |
| "../../gn:default_deps", | |
| ] | |
| sources = [ "main.cc" ] | |
| } | |
| source_set("traceconv_lib") { | |
| deps = [ | |
| ":gen_cc_android_extension_descriptor", | |
| ":gen_cc_trace_descriptor", | |
| ":lib", | |
| "../../gn:default_deps", | |
| "../../include/perfetto/ext/base", | |
| "../base:version", | |
| "../protozero/text_to_proto", | |
| ] | |
| public_deps = [ "../../include/perfetto/ext/traceconv" ] | |
| sources = [ "traceconv.cc" ] | |
| } | |
| if (enable_perfetto_ui) { | |
| wasm_lib("traceconv_wasm") { | |
| name = "traceconv" | |
| # Loaded from main thread; uses MEMFS + WORKERFS to ingest trace files. | |
| enable_web_environment = true | |
| enable_filesystem = true | |
| deps = [ | |
| ":main", | |
| "../../gn:default_deps", | |
| ] | |
| } | |
| } | |
| perfetto_cc_proto_descriptor("gen_cc_trace_descriptor") { | |
| descriptor_name = "trace.descriptor" | |
| descriptor_target = "../../protos/perfetto/trace:descriptor" | |
| } | |
| perfetto_cc_proto_descriptor("gen_cc_android_extension_descriptor") { | |
| descriptor_name = "android_extension.descriptor" | |
| descriptor_target = "../../protos/third_party/android:extension_descriptor" | |
| } | |
| if (enable_perfetto_integration_tests) { | |
| source_set("integrationtests") { | |
| testonly = true | |
| deps = [ | |
| ":lib", | |
| ":traceconv_lib", | |
| ":utils", | |
| "../../gn:default_deps", | |
| "../../gn:gtest_and_gmock", | |
| "../../include/perfetto/base", | |
| "../../include/perfetto/ext/base", | |
| "../../include/perfetto/trace_processor", | |
| "../../protos/perfetto/trace:cpp", | |
| "../../protos/perfetto/trace/profiling:cpp", | |
| "../../protos/third_party/pprof:cpp", | |
| "../../protos/third_party/pprof:zero", | |
| "../../src/base:test_support", | |
| "../../src/trace_processor/util:json_value", | |
| ] | |
| sources = [ | |
| "pprof_reader.cc", | |
| "pprof_reader.h", | |
| "trace_to_json_integrationtest.cc", | |
| "trace_to_pprof_integrationtest.cc", | |
| "trace_to_text_integrationtest.cc", | |
| "traceconv_bundle_integrationtest.cc", | |
| ] | |
| } | |
| } |