mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
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/+/2142163 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Edward 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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user