New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 732629 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 15 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug
Hotlist-MemoryInfra



Sign in to add a comment

Improve performance for symbolize_trace on macOS.

Project Member Reported by erikc...@chromium.org, Jun 13 2017

Issue description

Right now, symbolize_trace uses 'atos' with command line arguments. This is limited by maximum length for a command, which means we need to call 'atos' multiple times. It turns out that 'atos' is slow because it needs to load symbols from the dSYM, not b/c translating addresses to symbols is slow. Staring some more at the man page, we should be able to improve this by using a single instance of atos. Specifically, there are three ways to provide arguments:

     1.   A list of addresses at the end of the argument list.
     2.   Using the -f <address-input-file> argument to specify the path of an input file containing whitespace-separated numeric addresses.
     3.   If no addresses were directly specified, atos enters an interactive mode, reading addresses from stdin.

(2) seems like the easiest way to get all addresses symbolicated, and as long as the performance of that is fine, we might as well use it. 
 
FWIW for linux/android we use addr2line in pipe mode, which sounds like very similar of your 3. See build/android/pylib/symbols/elf_symbolizer.py, which creates a shard of N addr2line instances and shards symbols to them.
Having said that, do whatever you feel is more convenient. Just wanted to point out that we might have some python thingy that you could reuse if atos interactive mode is fairly similar to addr2line.

P.S. IIRC there is a copy of elf_symbolizer in catapult as well.
Cc: -dskiba@chromium.org spqc...@chromium.org
Owner: dskiba@chromium.org
This is basically done.

https://codereview.chromium.org/2944683002/
Status: Fixed (was: Assigned)

Sign in to add a comment