From 2658252cc515feda076f01b81f921a467ae187eb Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 24 Aug 2023 11:02:40 -0400 Subject: [PATCH] Add decoded data into python tracing builds (#28842) --- scripts/build_python.sh | 5 ++++- third_party/perfetto/BUILD.gn | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/build_python.sh b/scripts/build_python.sh index 2bb29a5b3c4efc..e0fa8303f72403 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -156,7 +156,10 @@ source "$CHIP_ROOT/scripts/activate.sh" [[ -n "$chip_case_retry_delta" ]] && chip_case_retry_arg="chip_case_retry_delta=$chip_case_retry_delta" || chip_case_retry_arg="" [[ -n "$pregen_dir" ]] && pregen_dir_arg="chip_code_pre_generated_directory=\"$pregen_dir\"" || pregen_dir_arg="" -gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="matter_enable_tracing_support=true chip_detail_logging=$chip_detail_logging enable_pylib=$enable_pybindings enable_rtti=$enable_pybindings chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg" +# Make all possible human redable tracing available. +tracing_options="matter_log_json_payload_hex=true matter_log_json_payload_decode_full=true matter_enable_tracing_support=true" + +gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging enable_pylib=$enable_pybindings enable_rtti=$enable_pybindings chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg" function ninja_target() { # Print the ninja target required to build a gn label. diff --git a/third_party/perfetto/BUILD.gn b/third_party/perfetto/BUILD.gn index 37b0c330864296..19b3488bbe26af 100644 --- a/third_party/perfetto/BUILD.gn +++ b/third_party/perfetto/BUILD.gn @@ -15,6 +15,8 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("${build_root}/config/compiler/compiler.gni") + config("sdk_config") { include_dirs = [ "repo/sdk" ] @@ -23,6 +25,12 @@ config("sdk_config") { config("sdk_private_config") { cflags = [ "-Wno-shadow" ] + + if (!is_clang) { + # Based on comments from perfetto/repo/gn/standalone/BUILD.gn: + # Use return std::move(...) for compatibility with old GCC compilers. + cflags += [ "-Wno-redundant-move" ] + } } source_set("sdk") {