Remove golem.py and references to link third party libraries
Change-Id: Ie39364af1bbeec92e7413d091807b0355370341c
diff --git a/tools/golem.py b/tools/golem.py
deleted file mode 100755
index 6a4e399..0000000
--- a/tools/golem.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Utility methods to make running on our performance tracking system easier.
-import os
-import sys
-
-LINKED_THIRD_PARTY_DIRECTORIES = [
- 'android_jar',
- 'android_sdk',
- 'benchmarks',
- 'framework',
- 'gmail',
- 'gmscore',
- 'gradle',
- 'gradle-plugin',
- 'openjdk',
- 'proguard',
- 'proguardsettings',
- 'r8',
- 'remapper',
- 'retrace_benchmark',
- 'sample_libraries',
- 'youtube',
-]
-
-LINKED_TOOL_DIRECTORIES = [
- 'linux/dx',
-]
-
-# Path to our internally updated third party
-THIRD_PARTY_SOURCE = "/usr/local/google/home/golem/r8/third_party"
-TOOLS_SOURCE = "/usr/local/google/home/golem/r8/tools"
-
-def link_third_party():
- assert os.path.exists('third_party')
- for dir in LINKED_THIRD_PARTY_DIRECTORIES:
- src = os.path.join(THIRD_PARTY_SOURCE, dir)
- dest = os.path.join('third_party', dir)
- if os.path.exists(dest):
- raise Exception('Destination "{}" already exists, are you running with'
- ' --golem locally'.format(dest))
- print('Symlinking {} to {}'.format(src, dest))
- os.symlink(src, dest)
- for dir in LINKED_TOOL_DIRECTORIES:
- src = os.path.join(TOOLS_SOURCE, dir)
- dest = os.path.join('tools', dir)
- if os.path.exists(dest):
- raise Exception('Destination "{}" already exists, are you running with'
- ' --golem locally'.format(dest))
- print('Symlinking {} to {}'.format(src, dest))
- if '/' in dir:
- os.makedirs(os.path.dirname(dest))
- os.symlink(src, dest)
-
-if __name__ == '__main__':
- sys.exit(link_third_party())
diff --git a/tools/keeprule_benchmark.py b/tools/keeprule_benchmark.py
index 4b843c6..1401084 100755
--- a/tools/keeprule_benchmark.py
+++ b/tools/keeprule_benchmark.py
@@ -125,10 +125,6 @@
def parse_arguments(argv):
parser = argparse.ArgumentParser(
description = 'Run keep-rule benchmarks.')
- parser.add_argument('--golem',
- help = 'Link in third party dependencies.',
- default = False,
- action = 'store_true')
parser.add_argument('--ignore-java-version',
help='Do not check java version',
default=False,
@@ -239,8 +235,6 @@
if __name__ == '__main__':
options = parse_arguments(sys.argv[1:])
- if options.golem:
- golem.link_third_party()
if not options.ignore_java_version:
utils.check_java_version()
with utils.TempDir() as temp:
diff --git a/tools/run_kotlin_benchmarks.py b/tools/run_kotlin_benchmarks.py
index ce0f1ad..86adbe2 100755
--- a/tools/run_kotlin_benchmarks.py
+++ b/tools/run_kotlin_benchmarks.py
@@ -5,7 +5,6 @@
# Script for running kotlin based benchmarks
-import golem
import optparse
import os
import subprocess
@@ -45,9 +44,6 @@
help='The benchmark to run',
default='rgx',
choices=['rgx', 'deltablue', 'sta', 'empty'])
- result.add_option('--golem',
- help='Don\'t build r8 and link in third_party deps',
- default=False, action='store_true')
result.add_option('--use-device',
help='Run the benchmark on an attaced device',
default=False, action='store_true')
@@ -85,8 +81,6 @@
def Main():
(options, args) = parse_options()
- if options.golem:
- golem.link_third_party()
with utils.TempDir() as temp:
dex_path = os.path.join(temp, "classes.jar")
proguard_conf = os.path.join(temp, 'proguard.conf')
@@ -100,7 +94,7 @@
'--min-api', str(options.api),
benchmark_jar
]
- toolhelper.run('r8', r8_args, build=not options.golem)
+ toolhelper.run('r8', r8_args, True)
if options.use_device:
result = run_art_device(dex_path)
else:
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index 8c72939..a0542d4 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -16,7 +16,6 @@
import gradle
import gmail_data
import gmscore_data
-import golem
import nest_data
from sanitize_libraries import SanitizeLibraries, SanitizeLibrariesInPgconf
import toolhelper
@@ -106,10 +105,6 @@
type='int',
default=0,
help='Set timeout instead of waiting for OOM.')
- result.add_option('--golem',
- help='Running on golem, do not build or download',
- default=False,
- action='store_true')
result.add_option('--ignore-java-version',
help='Do not check java version',
default=False,
@@ -138,8 +133,6 @@
'Same as --compiler-flags, keeping it for backward'
' compatibility. ' +
'If passing several options use a quoted string.')
- # TODO(tamaskenez) remove track-memory-to-file as soon as we updated golem
- # to use --print-memoryuse instead
result.add_option('--track-memory-to-file',
help='Track how much memory the jvm is using while ' +
' compiling. Output to the specified file.')
@@ -447,7 +440,7 @@
raise Exception("Unexpected -libraryjars found in " + pgconf)
def should_build(options):
- return not options.no_build and not options.golem
+ return not options.no_build
def build_desugared_library_dex(
options,
@@ -519,9 +512,6 @@
extra_args.append('-Xmx%sM' % options.max_memory)
else:
extra_args.append('-Xmx8G')
- if options.golem:
- golem.link_third_party()
- options.out = os.getcwd()
if not options.ignore_java_version:
utils.check_java_version()
@@ -743,9 +733,8 @@
if options.print_dexsegments:
dex_files = glob(os.path.join(outdir, '*.dex'))
utils.print_dexsegments(options.print_dexsegments, dex_files)
- if not options.golem:
- print('{}-Total(CodeSize): {}'.format(
- options.print_dexsegments, compute_size_of_dex_files(dex_files)))
+ print('{}-Total(CodeSize): {}'.format(
+ options.print_dexsegments, compute_size_of_dex_files(dex_files)))
return 0
def compute_size_of_dex_files(dex_files):
diff --git a/tools/test_gradle_benchmarks.py b/tools/test_gradle_benchmarks.py
index d9c00e6..7346830 100755
--- a/tools/test_gradle_benchmarks.py
+++ b/tools/test_gradle_benchmarks.py
@@ -6,7 +6,6 @@
from __future__ import print_function
import argparse
import gradle
-import golem
import os
import subprocess
import sys
@@ -20,9 +19,6 @@
description='Run D8 or DX on gradle apps located in'
' third_party/benchmarks/.'
' Report Golem-compatible RunTimeRaw values.')
- parser.add_argument('--golem',
- help = 'Running on golem, link in third_party resources.',
- default = False, action = 'store_true')
parser.add_argument('--skip_download',
help='Don\'t automatically pull down dependencies.',
default=False, action='store_true')
@@ -124,7 +120,7 @@
return any(namePattern in taskname for namePattern in acceptedGradleTasks)
-def PrintBuildTimeForGolem(benchmark, stdOut):
+def PrintBuildTime(benchmark, stdOut):
for line in stdOut.splitlines():
if 'BENCH' in line and benchmark.moduleName in line:
commaSplit = line.split(',')
@@ -160,12 +156,6 @@
def Main():
args = parse_arguments()
- if args.golem:
- # Ensure that we don't have a running daemon
- exitcode = subprocess.call(['pkill', 'java'])
- assert exitcode == 0 or exitcode == 1
- golem.link_third_party()
-
if args.tool == 'd8':
tool = Benchmark.Tools.D8
desugarMode = Benchmark.DesugarMode.D8_DESUGARING
@@ -217,7 +207,7 @@
['clean']),
]
- if not args.skip_download and not args.golem:
+ if not args.skip_download:
EnsurePresence(os.path.join('third_party', 'benchmarks', 'android-sdk'),
'android SDK')
EnsurePresence(os.path.join('third_party', 'gradle-plugin'),
@@ -232,7 +222,7 @@
benchmark.EnsurePresence()
benchmark.Clean()
stdOut = benchmark.Build(tool, desugarMode)
- PrintBuildTimeForGolem(benchmark, stdOut)
+ PrintBuildTime(benchmark, stdOut)
if __name__ == '__main__':
diff --git a/tools/test_r8cfsegments.py b/tools/test_r8cfsegments.py
index be8e49c..2081ee2 100755
--- a/tools/test_r8cfsegments.py
+++ b/tools/test_r8cfsegments.py
@@ -22,7 +22,6 @@
from __future__ import print_function
import argparse
-import golem
import minify_tool
import os
import sys
@@ -37,10 +36,6 @@
choices = ['pg', 'r8'],
required = True,
help = 'Compiler tool to use.')
- parser.add_argument('--golem',
- help = 'Running on golem, link in third_party resources.',
- default = False,
- action = 'store_true')
parser.add_argument('--name',
required = True,
help = 'Results will be printed using the specified benchmark name (e.g.'
@@ -59,8 +54,6 @@
def Main():
args = parse_arguments()
- if args.golem:
- golem.link_third_party()
utils.check_java_version()
output_dir = args.output
with utils.TempDir() as temp_dir: