From d2ea8338fe98b0efdce661f02fc4bbea71678d68 Mon Sep 17 00:00:00 2001 From: Anush Elangovan Date: Tue, 15 Nov 2011 18:06:05 -0800 Subject: [PATCH] Use 64bit dump_syms for generating minidump syms on amd64 This is very inefficent in calling dump_syms sequentially this can be parallelized easily and reduce the time it takes (~6mins) BUG=chromium-os:21914 TEST=./cros_generate_breakpad_symbols --board=x86-alex, amd64-corei7 Change-Id: Ic9d3bbcd2dbccfaeb01e60d757549dcb5c45c03b Reviewed-on: https://gerrit.chromium.org/gerrit/11747 Reviewed-by: Michael Krebs Tested-by: Anush Elangovan --- cros_generate_breakpad_symbols | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/cros_generate_breakpad_symbols b/cros_generate_breakpad_symbols index eb38e7065a..6c2a5895fb 100755 --- a/cros_generate_breakpad_symbols +++ b/cros_generate_breakpad_symbols @@ -41,8 +41,6 @@ DEFINE_string minidump_symbol_root "" \ "Symbol root (defaults to /usr/lib/debug/breakpad for board)" DEFINE_boolean verbose ${FLAGS_FALSE} "Be verbose." -DUMP_SYMS="dump_syms" - CUMULATIVE_SIZE=0 ANY_ERRORS=0 @@ -95,9 +93,6 @@ function dump_file() { local debug_file="$1" local text_file="$2" local debug_directory="$(dirname "${debug_file}")" - # 64b ELF files may be installed on the target in PERL directories - verify_not_64b_elf "${debug_file}" || return 1 - verify_not_64b_elf "${text_file}" || return 1 # Dump symbols as root in order to read all files. if ! sudo "${DUMP_SYMS}" "${text_file}" "${debug_directory}" > "${SYM_FILE}" \ 2> "${ERR_FILE}"; then @@ -187,6 +182,17 @@ function main() { [ -n "$FLAGS_board" ] || die "--board is required." + case "$FLAGS_board" in + amd64-*) + echo "Detected amd64 board.." + DUMP_SYMS="/build/${FLAGS_board}/usr/bin/dump_syms" + ;; + *) + DUMP_SYMS="dump_syms" + esac + + echo "Using dump_sys: $DUMP_SYMS" + SYSROOT="/build/${FLAGS_board}" if [[ -z "${FLAGS_minidump_symbol_root}" ]]; then