mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
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 <mkrebs@chromium.org> Tested-by: Anush Elangovan <anush@chromium.org>
This commit is contained in:
parent
a2c2375c18
commit
d2ea8338fe
@ -41,8 +41,6 @@ DEFINE_string minidump_symbol_root "" \
|
|||||||
"Symbol root (defaults to /usr/lib/debug/breakpad for board)"
|
"Symbol root (defaults to /usr/lib/debug/breakpad for board)"
|
||||||
DEFINE_boolean verbose ${FLAGS_FALSE} "Be verbose."
|
DEFINE_boolean verbose ${FLAGS_FALSE} "Be verbose."
|
||||||
|
|
||||||
DUMP_SYMS="dump_syms"
|
|
||||||
|
|
||||||
CUMULATIVE_SIZE=0
|
CUMULATIVE_SIZE=0
|
||||||
ANY_ERRORS=0
|
ANY_ERRORS=0
|
||||||
|
|
||||||
@ -95,9 +93,6 @@ function dump_file() {
|
|||||||
local debug_file="$1"
|
local debug_file="$1"
|
||||||
local text_file="$2"
|
local text_file="$2"
|
||||||
local debug_directory="$(dirname "${debug_file}")"
|
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.
|
# Dump symbols as root in order to read all files.
|
||||||
if ! sudo "${DUMP_SYMS}" "${text_file}" "${debug_directory}" > "${SYM_FILE}" \
|
if ! sudo "${DUMP_SYMS}" "${text_file}" "${debug_directory}" > "${SYM_FILE}" \
|
||||||
2> "${ERR_FILE}"; then
|
2> "${ERR_FILE}"; then
|
||||||
@ -187,6 +182,17 @@ function main() {
|
|||||||
|
|
||||||
[ -n "$FLAGS_board" ] || die "--board is required."
|
[ -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}"
|
SYSROOT="/build/${FLAGS_board}"
|
||||||
|
|
||||||
if [[ -z "${FLAGS_minidump_symbol_root}" ]]; then
|
if [[ -z "${FLAGS_minidump_symbol_root}" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user