Commit df6c07e1 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Add explanation for apkanalyzer.py

This is a bug that is already fixed in upstream apkanalyzer but not yet
released and rolled in the various downstream projects and ultimately
into Android SDK Tools (eventually).

Bug: 874994
Change-Id: I9c83b6ee35c5691f687e174b3213ca7e71a9ea2c
Reviewed-on: https://chromium-review.googlesource.com/1178687
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584049}
parent 75cdb263
......@@ -111,11 +111,18 @@ def UndoHierarchicalSizing(data):
else:
# Sibling or higher nodes
break
# Disabled for perf bots: https://crbug.com/874956
# TODO(wnwen): Investigate reason
# Apkanalyzer may overcount private method sizes at times. Unfortunately
# the fix is not in the version we have in Android SDK Tools. For now we
# prefer to undercount child sizes since the parent's size is more
# accurate. This means the sum of child nodes may exceed its immediate
# parent node's size.
total_child_size = min(size, total_child_size)
# TODO(wnwen): Add assert back once dexlib2 2.2.5 is released and rolled.
#assert total_child_size <= size, (
# 'Child node total size exceeded parent node total size')
node_size = max(0, size - total_child_size)
node_size = size - total_child_size
nodes.append((name, node_size))
return next_idx, size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment