From 412322f2a251ec5a48b7d80dfd4b1628282d9b93 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Wed, 3 Feb 2021 16:51:22 +0000 Subject: [PATCH] Set block-size for XZ mini-debug-info compression. This allows the compression to be done on multiple threads and more importantly, it allows libunwindstack to decompress only the needed blocks, which reduces unwind time and memory. Bug: 110133331 Test: verify lazy decompression in libunwindstack Change-Id: Ia3f597928edcbc85acdf05cb5c83ac7fced39148 --- scripts/strip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/strip.sh b/scripts/strip.sh index 40f018425..5b7a6da7e 100755 --- a/scripts/strip.sh +++ b/scripts/strip.sh @@ -89,7 +89,7 @@ do_strip_keep_mini_debug_info() { "${CROSS_COMPILE}objcopy" --rename-section .debug_frame=saved_debug_frame "${outfile}.debug" "${outfile}.mini_debuginfo" "${CROSS_COMPILE}objcopy" -S --remove-section .gdb_index --remove-section .comment --keep-symbols="${outfile}.keep_symbols" "${outfile}.mini_debuginfo" "${CROSS_COMPILE}objcopy" --rename-section saved_debug_frame=.debug_frame "${outfile}.mini_debuginfo" - "${XZ}" "${outfile}.mini_debuginfo" + "${XZ}" --block-size=64k --threads=0 "${outfile}.mini_debuginfo" "${CLANG_BIN}/llvm-objcopy" --add-section .gnu_debugdata="${outfile}.mini_debuginfo.xz" "${outfile}.tmp" rm -f "${outfile}.dynsyms" "${outfile}.funcsyms" "${outfile}.keep_symbols" "${outfile}.debug" "${outfile}.mini_debuginfo" "${outfile}.mini_debuginfo.xz"