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

Issue 774267 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocked on:
issue 784527



Sign in to add a comment

Speed up android test crash symbolization

Project Member Reported by jbudorick@chromium.org, Oct 12 2017

Issue description

Symbolization is slow at times. e.g., https://chromium-swarm.appspot.com/task?id=392aab5b17152610, where it took ~ seven minutes of task time. We should speed it up.

To do so, we should look at:
 - how much time stack spends in setup and teardown, and whether symbolization processes can be long-lived
 - how many times we call stack, and whether it can be reduced
 
That makes some sense -- there's a large number of tests, a big native library, and the mechanism for running browser tests separates them into their own processes, so a single crash won't bring down an entire device shard.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf2854434f008597901cbf1c25e18f50b603b84a

commit cf2854434f008597901cbf1c25e18f50b603b84a
Author: Zhiling Huang <hzl@chromium.org>
Date: Sat Nov 11 06:02:43 2017

Multithread the process of objdump to speed up symbolization.

When we have the more-info flag, objdump becomes the bottleneck of
symbolization as calls to objdump takes a long time.

In this cl, I am multithreading the objdump calls, to speed up
symbolization when we have the more-info flag set as true.

Bug:  774267 
Change-Id: I1f192e00481107555183bb9300cccc48e6d1db20
Reviewed-on: https://chromium-review.googlesource.com/759322
Commit-Queue: Zhiling Huang <hzl@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515830}
[modify] https://crrev.com/cf2854434f008597901cbf1c25e18f50b603b84a/third_party/android_platform/development/scripts/symbol.py

Comment 4 by kbr@chromium.org, Nov 13 2017

Blockedon: 784527
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8396f147b9259ae94cf8de9ee2b143fad2cb981f

commit 8396f147b9259ae94cf8de9ee2b143fad2cb981f
Author: Zhiling Huang <hzl@chromium.org>
Date: Tue Nov 14 00:26:04 2017

Revert "Multithread the process of objdump to speed up symbolization."

This reverts commit cf2854434f008597901cbf1c25e18f50b603b84a.

Reason for revert: gerrit  issue 784527 . The stack script hangs.

Original change's description:
> Multithread the process of objdump to speed up symbolization.
> 
> When we have the more-info flag, objdump becomes the bottleneck of
> symbolization as calls to objdump takes a long time.
> 
> In this cl, I am multithreading the objdump calls, to speed up
> symbolization when we have the more-info flag set as true.
> 
> Bug:  774267 
> Change-Id: I1f192e00481107555183bb9300cccc48e6d1db20
> Reviewed-on: https://chromium-review.googlesource.com/759322
> Commit-Queue: Zhiling Huang <hzl@chromium.org>
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: agrieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#515830}

TBR=agrieve@chromium.org,hzl@chromium.org,jbudorick@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  774267 
Change-Id: If181108109f1b6e97f439ff8aed976b1396dc6ce
Reviewed-on: https://chromium-review.googlesource.com/767189
Reviewed-by: Zhiling Huang <hzl@chromium.org>
Commit-Queue: Zhiling Huang <hzl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516114}
[modify] https://crrev.com/8396f147b9259ae94cf8de9ee2b143fad2cb981f/third_party/android_platform/development/scripts/symbol.py

Cc: bpastene@chromium.org
fyi, I'm seeing more timed out tests with symbolization taking over 5-10 minutes:
https://chromium-swarm.appspot.com/task?id=39dacca13c22cd10
https://chromium-swarm.appspot.com/task?id=39da3178834aef10
A few more with symbolization of 10+ minutes:
https://chromium-swarm.appspot.com/task?id=3a22b22e5d662010
https://chromium-swarm.appspot.com/task?id=3a22c9021271cc10
https://chromium-swarm.appspot.com/task?id=3a22d556a307a910

That last one was up to 18 minutes :O

If we can't speed it up, can we do it asynchronously so it doesn't block the rest of the tests?

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78

commit b6e038a7a7b07f680eba6d6ec1c32319ae89cd78
Author: Zhiling Huang <hzl@chromium.org>
Date: Tue Dec 05 20:45:46 2017

Use llvm symbolizer for stack script.

llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
etc.

In this cl, I 1)created a wrapper instance to interact with
llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
and then 3)added llvm symbolizer into isolated inputs.

Bug:  774267 
Change-Id: I971fb808b97f3a569eb9615f99efa41e3a56f3cb
Reviewed-on: https://chromium-review.googlesource.com/789376
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Zhiling Huang <hzl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521820}
[modify] https://crrev.com/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78/third_party/android_platform/README.chromium
[modify] https://crrev.com/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78/third_party/android_platform/development/scripts/stack
[modify] https://crrev.com/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78/third_party/android_platform/development/scripts/stack_core.py
[modify] https://crrev.com/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78/third_party/android_platform/development/scripts/symbol.py
[add] https://crrev.com/b6e038a7a7b07f680eba6d6ec1c32319ae89cd78/tools/python/llvm_symbolizer.py

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b391ee57fc58d4beae41346195ed4e1d0fca853

commit 5b391ee57fc58d4beae41346195ed4e1d0fca853
Author: Derek Cheng <imcheng@chromium.org>
Date: Tue Dec 05 23:40:26 2017

Revert "Use llvm symbolizer for stack script."

This reverts commit b6e038a7a7b07f680eba6d6ec1c32319ae89cd78.

Reason for revert: Broke stack_tool_with_logcat_dump on WebKit Android (Nexus4): https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Android%20%28Nexus4%29/builds/72002

Original change's description:
> Use llvm symbolizer for stack script.
> 
> llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
> etc.
> 
> In this cl, I 1)created a wrapper instance to interact with
> llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
> and then 3)added llvm symbolizer into isolated inputs.
> 
> Bug:  774267 
> Change-Id: I971fb808b97f3a569eb9615f99efa41e3a56f3cb
> Reviewed-on: https://chromium-review.googlesource.com/789376
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Zhiling Huang <hzl@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#521820}

TBR=dpranke@chromium.org,agrieve@chromium.org,hzl@chromium.org,bpastene@chromium.org,jbudorick@chromium.org

Change-Id: Ieebbcb9527dafd25a0fc74d2826a31162495c86e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  774267 
Reviewed-on: https://chromium-review.googlesource.com/809941
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521898}
[modify] https://crrev.com/5b391ee57fc58d4beae41346195ed4e1d0fca853/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/5b391ee57fc58d4beae41346195ed4e1d0fca853/third_party/android_platform/README.chromium
[modify] https://crrev.com/5b391ee57fc58d4beae41346195ed4e1d0fca853/third_party/android_platform/development/scripts/stack
[modify] https://crrev.com/5b391ee57fc58d4beae41346195ed4e1d0fca853/third_party/android_platform/development/scripts/stack_core.py
[modify] https://crrev.com/5b391ee57fc58d4beae41346195ed4e1d0fca853/third_party/android_platform/development/scripts/symbol.py
[delete] https://crrev.com/51357dc19efbf30328ca05655fbf69886f6e9113/tools/python/llvm_symbolizer.py

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d36323805e451c1d5bea1b1a293bcb2bdfa3b745

commit d36323805e451c1d5bea1b1a293bcb2bdfa3b745
Author: Ojan Vafai <ojan@chromium.org>
Date: Tue Dec 05 23:57:07 2017

Revert "Use llvm symbolizer for stack script."

This reverts commit b6e038a7a7b07f680eba6d6ec1c32319ae89cd78.

Reason for revert: Broke stack_tool_with_logcat_dump

Traceback (most recent call last):
  File "/b/c/b/WebKit_Android__Nexus4_/src/third_party/android_platform/development/scripts/stack", line 247, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/b/c/b/WebKit_Android__Nexus4_/src/third_party/android_platform/development/scripts/stack", line 238, in main
    arch_defined, symbolizer)
  File "/b/c/b/WebKit_Android__Nexus4_/src/third_party/android_platform/development/scripts/stack_core.py", line 192, in ConvertTrace
    ResolveCrashSymbol(list(useful_log), more_info, llvm_symbolizer)
  File "/b/c/b/WebKit_Android__Nexus4_/src/third_party/android_platform/development/scripts/stack_core.py", line 331, in ResolveCrashSymbol
    if pid != -1 and pid in java_stderr_by_pid:
NameError: global name 'java_stderr_by_pid' is not defined

https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Android%20%28Nexus4%29/builds/72002

Original change's description:
> Use llvm symbolizer for stack script.
> 
> llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
> etc.
> 
> In this cl, I 1)created a wrapper instance to interact with
> llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
> and then 3)added llvm symbolizer into isolated inputs.
> 
> Bug:  774267 
> Change-Id: I971fb808b97f3a569eb9615f99efa41e3a56f3cb
> Reviewed-on: https://chromium-review.googlesource.com/789376
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Zhiling Huang <hzl@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#521820}

TBR=dpranke@chromium.org,agrieve@chromium.org,hzl@chromium.org,bpastene@chromium.org,jbudorick@chromium.org

Change-Id: I166549a6fbfcd04529096cbe65aa5befb767b4ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  774267 
Reviewed-on: https://chromium-review.googlesource.com/810010
Reviewed-by: Ojan Vafai <ojan@chromium.org>
Commit-Queue: Ojan Vafai <ojan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521905}

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b2754af2ed37b2bf30efac6234fcecbdd941c4bb

commit b2754af2ed37b2bf30efac6234fcecbdd941c4bb
Author: Zhiling Huang <hzl@chromium.org>
Date: Thu Dec 07 20:03:09 2017

[Reland] Use llvm symbolizer for stack script.

llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
etc.

In this cl, I 1)created a wrapper instance to interact with
llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
and then 3)added llvm symbolizer into isolated inputs.

Bug:  774267 
Change-Id: I43d305b4c0c94be614ee4cad35b40f04b3d3ae20
Reviewed-on: https://chromium-review.googlesource.com/810007
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Zhiling Huang <hzl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522520}
[modify] https://crrev.com/b2754af2ed37b2bf30efac6234fcecbdd941c4bb/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/b2754af2ed37b2bf30efac6234fcecbdd941c4bb/third_party/android_platform/README.chromium
[modify] https://crrev.com/b2754af2ed37b2bf30efac6234fcecbdd941c4bb/third_party/android_platform/development/scripts/stack
[modify] https://crrev.com/b2754af2ed37b2bf30efac6234fcecbdd941c4bb/third_party/android_platform/development/scripts/stack_core.py
[modify] https://crrev.com/b2754af2ed37b2bf30efac6234fcecbdd941c4bb/third_party/android_platform/development/scripts/symbol.py
[add] https://crrev.com/b2754af2ed37b2bf30efac6234fcecbdd941c4bb/tools/python/llvm_symbolizer.py

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e6e84820c83c331f13add5fc62b8ee439bd10f0

commit 6e6e84820c83c331f13add5fc62b8ee439bd10f0
Author: Peter Collingbourne <pcc@chromium.org>
Date: Fri Dec 08 04:21:11 2017

Revert "[Reland] Use llvm symbolizer for stack script."

This reverts commit b2754af2ed37b2bf30efac6234fcecbdd941c4bb.

Reason for revert: Caused the step stack_tool_with_logcat_dump to start failing on cronet bots.

Original change's description:
> [Reland] Use llvm symbolizer for stack script.
> 
> llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
> etc.
> 
> In this cl, I 1)created a wrapper instance to interact with
> llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
> and then 3)added llvm symbolizer into isolated inputs.
> 
> Bug:  774267 
> Change-Id: I43d305b4c0c94be614ee4cad35b40f04b3d3ae20
> Reviewed-on: https://chromium-review.googlesource.com/810007
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Zhiling Huang <hzl@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#522520}

TBR=dpranke@chromium.org,agrieve@chromium.org,hzl@chromium.org,jbudorick@chromium.org

Change-Id: If4e9f5618f62a5ed2a4d3152af6b18dbc748b1f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  774267 
Reviewed-on: https://chromium-review.googlesource.com/816257
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522711}
[modify] https://crrev.com/6e6e84820c83c331f13add5fc62b8ee439bd10f0/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/6e6e84820c83c331f13add5fc62b8ee439bd10f0/third_party/android_platform/README.chromium
[modify] https://crrev.com/6e6e84820c83c331f13add5fc62b8ee439bd10f0/third_party/android_platform/development/scripts/stack
[modify] https://crrev.com/6e6e84820c83c331f13add5fc62b8ee439bd10f0/third_party/android_platform/development/scripts/stack_core.py
[modify] https://crrev.com/6e6e84820c83c331f13add5fc62b8ee439bd10f0/third_party/android_platform/development/scripts/symbol.py
[delete] https://crrev.com/6ae8ff5c5577436d3a59d4cb691d19a2c2620c33/tools/python/llvm_symbolizer.py

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f974b78a9d1c3382f5ad3176671cb2203d7a273

commit 1f974b78a9d1c3382f5ad3176671cb2203d7a273
Author: Juan Antonio Navarro Pérez <perezju@chromium.org>
Date: Fri Dec 08 11:13:28 2017

Revert "[Reland] Use llvm symbolizer for stack script."

This reverts commit b2754af2ed37b2bf30efac6234fcecbdd941c4bb.

Reason for revert: Broke canary build.

Original change's description:
> [Reland] Use llvm symbolizer for stack script.
> 
> llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
> etc.
> 
> In this cl, I 1)created a wrapper instance to interact with
> llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
> and then 3)added llvm symbolizer into isolated inputs.
> 
> Bug:  774267 
> Change-Id: I43d305b4c0c94be614ee4cad35b40f04b3d3ae20
> Reviewed-on: https://chromium-review.googlesource.com/810007
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Zhiling Huang <hzl@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#522520}

TBR=dpranke@chromium.org,agrieve@chromium.org,hzl@chromium.org,jbudorick@chromium.org

Change-Id: Icbeb54d5f7ad5ca403f03c0c1b1dd4f6c642d8ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  774267 , 793257
Reviewed-on: https://chromium-review.googlesource.com/816975
Reviewed-by: Juan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522758}

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 8 2017

Labels: merge-merged-3288
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9f2a61dd416f096ba2b93fa333ca206409e9a58

commit a9f2a61dd416f096ba2b93fa333ca206409e9a58
Author: Juan Antonio Navarro Perez <perezju@google.com>
Date: Fri Dec 08 13:49:44 2017

Revert "[Reland] Use llvm symbolizer for stack script."

This reverts commit b2754af2ed37b2bf30efac6234fcecbdd941c4bb.

Reason for revert: Broke canary build.

Original change's description:
> [Reland] Use llvm symbolizer for stack script.
>
> llvm symbolizer is a more efficient symbolizer than addr2line,
objdump,
> etc.
>
> In this cl, I 1)created a wrapper instance to interact with
> llvm symbolizer, 2)made the stack script to use llvm symbolizer
instance,
> and then 3)added llvm symbolizer into isolated inputs.
>
> Bug:  774267 
> Change-Id: I43d305b4c0c94be614ee4cad35b40f04b3d3ae20
> Reviewed-on: https://chromium-review.googlesource.com/810007
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Zhiling Huang <hzl@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#522520}

TBR=dpranke@chromium.org,agrieve@chromium.org,hzl@chromium.org,jbudorick@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 793257
Change-Id: I96d5c81a5a944a95a4e74a46e0fd656e019214a7
Reviewed-on: https://chromium-review.googlesource.com/817123
Reviewed-by: Juan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/branch-heads/3288@{#3}
Cr-Branched-From: 25b7dd1729eebe969f4bfd358babec31b96589ca-refs/heads/master@{#522666}
[modify] https://crrev.com/a9f2a61dd416f096ba2b93fa333ca206409e9a58/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/a9f2a61dd416f096ba2b93fa333ca206409e9a58/third_party/android_platform/README.chromium
[modify] https://crrev.com/a9f2a61dd416f096ba2b93fa333ca206409e9a58/third_party/android_platform/development/scripts/stack
[modify] https://crrev.com/a9f2a61dd416f096ba2b93fa333ca206409e9a58/third_party/android_platform/development/scripts/stack_core.py
[modify] https://crrev.com/a9f2a61dd416f096ba2b93fa333ca206409e9a58/third_party/android_platform/development/scripts/symbol.py
[delete] https://crrev.com/57a6ff11eaeb3905796792ad5a59a6582e852af0/tools/python/llvm_symbolizer.py

Comment 15 by hzl@chromium.org, Dec 23 2017

Cc: osh...@chromium.org
 Issue 615457  has been merged into this issue.
Project Member

Comment 16 by bugdroid1@chromium.org, Dec 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526

commit ed89eb8fd900951e7f7a604f460d1b1c2ea3c526
Author: Zhiling Huang <hzl@chromium.org>
Date: Thu Dec 28 17:59:29 2017

[Reland] Use llvm symbolizer for stack script.

llvm symbolizer is a more efficient symbolizer than addr2line, objdump,
etc.

In this cl, I 1)created a wrapper instance to interact with
llvm symbolizer, 2)made the stack script to use llvm symbolizer instance,
and then 3)added llvm symbolizer into isolated inputs.

The reland is to fix:
1UnboundLocalError: local variable 'code_addr' referenced before assignment
2AttributeError: 'module' object has no attribute 'ToolPath'

TBR=dpranke@chromium.org,agrieve@chromium.org

Bug:  774267 
Change-Id: Iee626065e4cfe9403f9b13dfec2dfd99e749510c
Reviewed-on: https://chromium-review.googlesource.com/834754
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Zhiling Huang <hzl@chromium.org>
Commit-Queue: Zhiling Huang <hzl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526304}
[modify] https://crrev.com/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526/third_party/android_platform/README.chromium
[modify] https://crrev.com/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526/third_party/android_platform/development/scripts/stack
[modify] https://crrev.com/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526/third_party/android_platform/development/scripts/stack_core.py
[modify] https://crrev.com/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526/third_party/android_platform/development/scripts/symbol.py
[add] https://crrev.com/ed89eb8fd900951e7f7a604f460d1b1c2ea3c526/tools/python/llvm_symbolizer.py

Project Member

Comment 17 by bugdroid1@chromium.org, Dec 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe506dcc4c90b4a3819f040fbce7c2ae37573766

commit fe506dcc4c90b4a3819f040fbce7c2ae37573766
Author: John Budorick <jbudorick@chromium.org>
Date: Fri Dec 29 13:26:14 2017

[android] Update stack tool pydeps to include llvm_symbolizer.

TBR=hzl@chromium.org

Bug:  774267 
Change-Id: I5c5bb7022fa8533adc3ef66658a6e852856bc036
Reviewed-on: https://chromium-review.googlesource.com/846461
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526371}
[modify] https://crrev.com/fe506dcc4c90b4a3819f040fbce7c2ae37573766/build/secondary/third_party/android_platform/development/scripts/stack.pydeps

Project Member

Comment 18 by bugdroid1@chromium.org, Jan 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d24221ca3e05c599f2420539ee32367f93c7e667

commit d24221ca3e05c599f2420539ee32367f93c7e667
Author: John Budorick <jbudorick@chromium.org>
Date: Mon Jan 01 01:02:21 2018

[android] Move stack to stack.py and create a stack bash trampoline.

This is primarily motivated by PRESUBMIT not recognizing that changes
to 'stack' require an update to the corresponding pydeps file (as happened
in the llvm_symbolizer CLs in  crbug.com/774267 ). It'll also keep us
from generating a 'stackc' bytecode file.

Bug:  774267 
Change-Id: I5ae07fa317883a429865e07452fbef0dd3f92234
Reviewed-on: https://chromium-review.googlesource.com/846462
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526422}
[modify] https://crrev.com/d24221ca3e05c599f2420539ee32367f93c7e667/build/secondary/third_party/android_platform/development/scripts/BUILD.gn
[modify] https://crrev.com/d24221ca3e05c599f2420539ee32367f93c7e667/build/secondary/third_party/android_platform/development/scripts/stack.pydeps
[modify] https://crrev.com/d24221ca3e05c599f2420539ee32367f93c7e667/third_party/android_platform/development/scripts/stack
[add] https://crrev.com/d24221ca3e05c599f2420539ee32367f93c7e667/third_party/android_platform/development/scripts/stack.py

Project Member

Comment 19 by bugdroid1@chromium.org, Jan 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b9097130f94ddd04cc85ace3bf9a6a6ed52f35e1

commit b9097130f94ddd04cc85ace3bf9a6a6ed52f35e1
Author: Benjamin Pastene <bpastene@chromium.org>
Date: Wed Jan 03 21:27:11 2018

android: Track and log total time spent symbolizing in tests.

Bug:  774267 
Change-Id: If8e4620c781f38f0b3019e201f2e48146047ae06
Reviewed-on: https://chromium-review.googlesource.com/835787
Reviewed-by: Zhiling Huang <hzl@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526820}
[modify] https://crrev.com/b9097130f94ddd04cc85ace3bf9a6a6ed52f35e1/build/android/pylib/symbols/stack_symbolizer.py

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20a3eba1e943e5565d1cdcbcf7f3ed33711f28ad

commit 20a3eba1e943e5565d1cdcbcf7f3ed33711f28ad
Author: David 'Digit' Turner <digit@google.com>
Date: Thu Apr 05 00:27:12 2018

android: Speed up native stack symbol resolution.

When calling the build/android/tombstones.py script, used to
extract tombstones and properly resolve symbols for Chromium
libraries, 'aapt dump badging' is called repeatedly on all
files matching $CHROMIUM_OUTPUT_DIR/apks/*.apk, in order to
extract their package names.

This patch helps speed up this process considerably by caching
the result for each APK (hence each file will be read only once
now).

Time comparison for the following command (for an Android/x86 build).

  third_party/android_platform/development/scripts/stack.py \
      --arch x86 \
      --output-directory out/Emulator \
      --more-info \
      /tmp/tombstone_08

Before: 1m 48s  -->  After: 23s    (same results)

+ Rename symbols.GetAapt() to _GetAapt() to make it private,
  and use constants.ANDROID_SDK_TOOLS to find the location of
  the 'aapt' binary used to extract package names. Note that
  the use of the SDK_HOME environment is preserved unchanged
  at the moment (though is probably not needed).

+ Rename GetApkPackageName() to _GetApkPackageName() and
  remove its 'aapt' parameter and speed it with a small
  cache.

+ Rename GetCandidateApks() to _GetCandidateApks() and
  use a small cache to avoid hitting the filesystem everytime
  this is called, since the result will not change between
  invokations.

+ Simplify GetMatchingApks() implementation.

+ Fix minor typos.

NOTE: There are still many many things that are really wrong
      in this script. In particular, it cannot work properly
      with component builds, and will fail to work in the
      future when Chromium will be installed as a set of
      APK splits. Another point is the reliance on the global
      ARCH variable which is liberally modified directly by
      other Python scripts all over the place (ugh...).

      These will be addressed in future CLs.

BUG= 774267 
R=agrieve@chromium.org,hzl@chromium.org, jbudorick@chromium.org, mattcary@chromium.org

Change-Id: If130a668dd592b682d7fa98012745704a74fb850
Reviewed-on: https://chromium-review.googlesource.com/995932
Commit-Queue: David Turner <digit@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548266}
[modify] https://crrev.com/20a3eba1e943e5565d1cdcbcf7f3ed33711f28ad/third_party/android_platform/README.chromium
[modify] https://crrev.com/20a3eba1e943e5565d1cdcbcf7f3ed33711f28ad/third_party/android_platform/development/scripts/symbol.py

Status: Fixed (was: Assigned)

Sign in to add a comment