diff options
author | maniscalco <maniscalco@chromium.org> | 2014-10-09 15:54:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 22:55:21 +0000 |
commit | 46fa7a44fb117ffb4f60aca184e9860bb4111e29 (patch) | |
tree | c4bc6b84ced9e79d336bc2f93cb8931055784793 /third_party/android_platform | |
parent | ef5eefe35befb1bd202fead20f282f91e645387d (diff) | |
download | chromium_src-46fa7a44fb117ffb4f60aca184e9860bb4111e29.zip chromium_src-46fa7a44fb117ffb4f60aca184e9860bb4111e29.tar.gz chromium_src-46fa7a44fb117ffb4f60aca184e9860bb4111e29.tar.bz2 |
Revert of Make it easier to debug failed symbolization (patchset #4 id:130001 of https://codereview.chromium.org/646683002/)
Reason for revert:
"Android Tests" bot is failing in "run stack tool with logcat dump" step.
http://build.chromium.org/p/chromium.linux/builders/Android%20Tests
Suspecting this patch. Reverting.
@@@BUILD_STEP Run stack tool with logcat dump@@@
> /b/build/slave/Android_Tests/build/src/third_party/android_platform/development/scripts/stack --more-info /b/build/slave/Android_Tests/build/src/out/Release/full_log.txt
/b/build/slave/Android_Tests/build/src/third_party/android_platform/development/scripts/../../../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-addr2line: /b/build/slave/Android_Tests/build/src/third_party/android_platform/development/scripts/../../../../out/Release/icudtl.dat: File format not recognized
See bug https://code.google.com/p/chromium/issues/detail?id=422090
Original issue's description:
> Make it easier to debug failed symbolization
>
> This just adds a --verbose argument and some debug logging sprinkled in
> useful places.
>
> Adds '.' as a candidate directory for libraries (gn puts shared
> libraries at the root build directory).
>
> Committed: https://crrev.com/17ffc51dfc9bd6dfe0d38ce8f6f8313544ea25af
> Cr-Commit-Position: refs/heads/master@{#298952}
TBR=rmcilroy@chromium.org,cjhopman@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/642843003
Cr-Commit-Position: refs/heads/master@{#299002}
Diffstat (limited to 'third_party/android_platform')
4 files changed, 4 insertions, 27 deletions
diff --git a/third_party/android_platform/README.chromium b/third_party/android_platform/README.chromium index a611964..54d4177 100644 --- a/third_party/android_platform/README.chromium +++ b/third_party/android_platform/README.chromium @@ -15,14 +15,8 @@ glue layer against. Local Modifications: Only picked the few scripts needed by chrome. - -The scripts have been modified to better suit Chromium development. Changes -include, but are not limited to, the following: -Added memoization of addr2line and objdump. -Added option to change the amount of symbolization done. Updated output directories to use environment variable. When calling addr2line, check the symbol is a file (and not a directory). Added support for parsing LOG(FATAL) and DCHECK errors and their stack traces, as emitted by src/base/debug/stack_trace_android.cc Added support for finding symbols when library is loaded directly from the APK. -Added debug logging and --verbose parameter. diff --git a/third_party/android_platform/development/scripts/stack b/third_party/android_platform/development/scripts/stack index 5a7d2f4..e55f688 100755 --- a/third_party/android_platform/development/scripts/stack +++ b/third_party/android_platform/development/scripts/stack @@ -18,7 +18,6 @@ import getopt import glob -import logging import os import sys @@ -58,9 +57,6 @@ def PrintUsage(): print " --arch=arm|arm64|x86_64|x86|mips" print " the target architecture" print - print " --verbose" - print " enable extra logging, particularly for debugging failed symbolization" - print print " FILE should contain a stack trace in it somewhere" print " the tool will find that and re-print it with" print " source files and line numbers. If you don't" @@ -112,16 +108,15 @@ def UnzipSymbols(symbolfile, symdir=None): return (symdir, symdir) -def main(argv): +def main(): try: - options, arguments = getopt.getopt(argv, "", + options, arguments = getopt.getopt(sys.argv[1:], "", ["more-info", "less-info", "chrome-symbols-dir=", "symbols-dir=", "symbols-zip=", "arch=", - "verbose", "help"]) except getopt.GetoptError, unused_error: PrintUsage() @@ -143,8 +138,6 @@ def main(argv): more_info = True elif option == "--less-info": more_info = False - elif option == "--verbose": - logging.basicConfig(level=logging.DEBUG) if len(arguments) > 1: PrintUsage() @@ -174,6 +167,6 @@ def main(argv): os.system(cmd) if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) + main() # vi: ts=2 sw=2 diff --git a/third_party/android_platform/development/scripts/stack_core.py b/third_party/android_platform/development/scripts/stack_core.py index adb254b..a11fbb4 100755 --- a/third_party/android_platform/development/scripts/stack_core.py +++ b/third_party/android_platform/development/scripts/stack_core.py @@ -16,7 +16,6 @@ """stack symbolizes native crash dumps.""" -import logging import re import symbol @@ -193,7 +192,6 @@ def ConvertTrace(lines, more_info): if match: frame, code_addr, area, symbol_present, symbol_name = match.group( 'frame', 'address', 'lib', 'symbol_present', 'symbol_name') - logging.debug('Found trace line: %s' % line.strip()) if frame <= last_frame and (trace_lines or value_lines): PrintOutput(trace_lines, value_lines, more_info) @@ -205,11 +203,9 @@ def ConvertTrace(lines, more_info): if area == UNKNOWN or area == HEAP or area == STACK: trace_lines.append((code_addr, "", area)) else: - logging.debug('Identified lib: %s' % area) # If a calls b which further calls c and c is inlined to b, we want to # display "a -> b -> c" in the stack trace instead of just "a -> c" info = symbol.SymbolInformation(area, code_addr, more_info) - logging.debug('symbol information: %s' % info) nest_count = len(info) - 1 for (source_symbol, source_location, object_symbol_with_offset) in info: if not source_symbol: diff --git a/third_party/android_platform/development/scripts/symbol.py b/third_party/android_platform/development/scripts/symbol.py index 0011de6..44d0238 100755 --- a/third_party/android_platform/development/scripts/symbol.py +++ b/third_party/android_platform/development/scripts/symbol.py @@ -21,7 +21,6 @@ The information can include symbol names, offsets, and source locations. import glob import itertools -import logging import os import re import subprocess @@ -209,7 +208,6 @@ def GetCandidates(dirs, filepart, candidate_fun): candidates = PathListJoin([out_dir], buildtype_list) + [CHROME_SYMBOLS_DIR] candidates = PathListJoin(candidates, dirs) candidates = PathListJoin(candidates, [filepart]) - logging.debug('GetCandidates: prefiltered candidates = %s' % candidates) candidates = list( itertools.chain.from_iterable(map(candidate_fun, candidates))) candidates = sorted(candidates, key=os.path.getmtime, reverse=True) @@ -284,7 +282,7 @@ def GetCandidateLibraries(library_name): A list of matching library filenames for library_name. """ return GetCandidates( - ['lib', 'lib.target', '.'], library_name, + ['lib', 'lib.target'], library_name, lambda filename: filter(os.path.exists, [filename])) def TranslateLibPath(lib): @@ -308,15 +306,11 @@ def TranslateLibPath(lib): if mapping: library_name = mapping - logging.debug('TranslateLibPath: lib=%s library_name=%s' % (lib, library_name)) - candidate_libraries = GetCandidateLibraries(library_name) - logging.debug('TranslateLibPath: candidate_libraries=%s' % candidate_libraries) if not candidate_libraries: return lib library_path = os.path.relpath(candidate_libraries[0], SYMBOLS_DIR) - logging.debug('TranslateLibPath: library_path=%s' % library_path) return '/' + library_path def SymbolInformation(lib, addr, get_detailed_info): |