| # Copyright (c) 2017, 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. |
| def run(args, build=True, debug=True, profile=False, |
| cmd.extend(['tools/track_memory.sh', track_memory_file]) |
| cmd.append('-agentlib:hprof=cpu=samples,interval=1,depth=8') |
| cmd.extend(['-jar', utils.D8_JAR]) |
| result = subprocess.check_output(cmd) |
| if arg in ("--build", "--no-build"): |
| except subprocess.CalledProcessError as e: |
| # In case anything relevant was printed to stdout, normally this is already |
| if __name__ == '__main__': |