Mercurial > hg > graal-compiler
comparison mxtool/mx.py @ 18710:4836c2abc884
mx: removed hard-coded -Xms setting for the 'build' and 'checkstyle' commands to try and avoid unnecessary swapping on low(er) memory machines
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 18 Dec 2014 12:12:04 +1000 |
parents | beb33138029c |
children | fdf29cc07ec2 |
comparison
equal
deleted
inserted
replaced
18709:ae5033a78f1d | 18710:4836c2abc884 |
---|---|
2337 if not self.jdtJar: | 2337 if not self.jdtJar: |
2338 mainJava = java() | 2338 mainJava = java() |
2339 if not args.error_prone: | 2339 if not args.error_prone: |
2340 javac = args.alt_javac if args.alt_javac else mainJava.javac | 2340 javac = args.alt_javac if args.alt_javac else mainJava.javac |
2341 self.logCompilation('javac' if not args.alt_javac else args.alt_javac) | 2341 self.logCompilation('javac' if not args.alt_javac else args.alt_javac) |
2342 javacCmd = [javac, '-g', '-J-Xmx1g', '-J-Xms1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] | 2342 javacCmd = [javac, '-g', '-J-Xmx1g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] |
2343 if jdk.debug_port is not None: | 2343 if jdk.debug_port is not None: |
2344 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] | 2344 javacCmd += ['-J-Xdebug', '-J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(jdk.debug_port)] |
2345 javacCmd += processorArgs | 2345 javacCmd += processorArgs |
2346 javacCmd += ['@' + _cygpathU2W(argfile.name)] | 2346 javacCmd += ['@' + _cygpathU2W(argfile.name)] |
2347 | 2347 |
2348 if not args.warnAPI: | 2348 if not args.warnAPI: |
2349 javacCmd.append('-XDignore.symbol.file') | 2349 javacCmd.append('-XDignore.symbol.file') |
2350 run(javacCmd) | 2350 run(javacCmd) |
2351 else: | 2351 else: |
2352 self.logCompilation('javac (with error-prone)') | 2352 self.logCompilation('javac (with error-prone)') |
2353 javaArgs = ['-Xmx1g', '-Xms1g'] | 2353 javaArgs = ['-Xmx1g'] |
2354 javacArgs = ['-g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] | 2354 javacArgs = ['-g', '-source', compliance, '-target', compliance, '-classpath', cp, '-d', outputDir, '-bootclasspath', jdk.bootclasspath(), '-endorseddirs', jdk.endorseddirs(), '-extdirs', jdk.extdirs()] |
2355 javacArgs += processorArgs | 2355 javacArgs += processorArgs |
2356 javacArgs += ['@' + argfile.name] | 2356 javacArgs += ['@' + argfile.name] |
2357 if not args.warnAPI: | 2357 if not args.warnAPI: |
2358 javacArgs.append('-XDignore.symbol.file') | 2358 javacArgs.append('-XDignore.symbol.file') |
2359 run_java(javaArgs + ['-cp', os.pathsep.join([mainJava.toolsjar, args.error_prone]), 'com.google.errorprone.ErrorProneCompiler'] + javacArgs) | 2359 run_java(javaArgs + ['-cp', os.pathsep.join([mainJava.toolsjar, args.error_prone]), 'com.google.errorprone.ErrorProneCompiler'] + javacArgs) |
2360 else: | 2360 else: |
2361 self.logCompilation('JDT') | 2361 self.logCompilation('JDT') |
2362 | 2362 |
2363 jdtVmArgs = ['-Xmx1g', '-Xms1g', '-jar', _cygpathU2W(self.jdtJar)] | 2363 jdtVmArgs = ['-Xmx1g', '-jar', _cygpathU2W(self.jdtJar)] |
2364 | 2364 |
2365 jdtArgs = ['-' + compliance, | 2365 jdtArgs = ['-' + compliance, |
2366 '-cp', cp, '-g', '-enableJavadoc', | 2366 '-cp', cp, '-g', '-enableJavadoc', |
2367 '-d', outputDir, | 2367 '-d', outputDir, |
2368 '-bootclasspath', jdk.bootclasspath(), | 2368 '-bootclasspath', jdk.bootclasspath(), |
3170 log('Running Checkstyle on {0} using {1}...'.format(sourceDir, config)) | 3170 log('Running Checkstyle on {0} using {1}...'.format(sourceDir, config)) |
3171 | 3171 |
3172 try: | 3172 try: |
3173 for chunk in _chunk_files_for_command_line(javafilelist): | 3173 for chunk in _chunk_files_for_command_line(javafilelist): |
3174 try: | 3174 try: |
3175 run_java(['-Xmx1g', '-Xms1g', '-jar', library('CHECKSTYLE').get_path(True), '-f', 'xml', '-c', config, '-o', auditfileName] + chunk, nonZeroIsFatal=False) | 3175 run_java(['-Xmx1g', '-jar', library('CHECKSTYLE').get_path(True), '-f', 'xml', '-c', config, '-o', auditfileName] + chunk, nonZeroIsFatal=False) |
3176 finally: | 3176 finally: |
3177 if exists(auditfileName): | 3177 if exists(auditfileName): |
3178 errors = [] | 3178 errors = [] |
3179 source = [None] | 3179 source = [None] |
3180 def start_element(name, attrs): | 3180 def start_element(name, attrs): |