Commit e3a42b25 authored by Peter Wen's avatar Peter Wen Committed by LUCI CQ

More detailed build-step type summary for android

Increase the number of long times by extension to report from 5 to 10
since java build steps produce a number of different extension types. It
is difficult to distinguish between android vs non-android builds, so
increase this default for all platforms.

Prioritize .jar outputs for java targets and allow up to two levels of
extensions to be recognized.

e.g.
file.interface.jar would have .interface.jar as its full extension.
file.javac.jar would have .javac.jar as its full extension.

Some of these build steps require .jar outputs, which is why these
targets use a secondary extension to differentiate.

Example output: https://crrev.com/c/2142395

Bug: chromium:1067273
Change-Id: Id5780980f60841c3384d91bf96121c6dec3e8bed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2142163Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
parent c440b23d
......@@ -63,7 +63,7 @@ import sys
# The number of long build times to report:
long_count = 10
# The number of long times by extension to report
long_ext_count = 5
long_ext_count = 10
class Target:
......@@ -179,20 +179,30 @@ def GetExtension(target, extra_patterns):
if output.endswith('type_mappings'):
extension = 'type_mappings'
break
extension = os.path.splitext(output)[1]
# Capture two extensions if present. For example: file.javac.jar should be
# distinguished from file.interface.jar.
root, ext1 = os.path.splitext(output)
_, ext2 = os.path.splitext(root)
extension = ext2 + ext1 # Preserve the order in the file name.
if len(extension) == 0:
extension = '(no extension found)'
if extension in ['.pdb', '.dll', '.exe']:
if ext1 in ['.pdb', '.dll', '.exe']:
extension = 'PEFile (linking)'
# Make sure that .dll and .exe are grouped together and that the
# .dll.lib files don't cause these to be listed as libraries
break
if extension in ['.so', '.TOC']:
if ext1 in ['.so', '.TOC']:
extension = '.so (linking)'
# Attempt to identify linking, avoid identifying as '.TOC'
break
# Make sure .obj files don't get categorized as mojo files
if extension in ['.obj', '.o']:
if ext1 in ['.obj', '.o']:
break
# Jars are the canonical output of java targets.
if ext1 == '.jar':
break
# Normalize all mojo related outputs to 'mojo'.
if output.count('.mojom') > 0:
......
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