| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Runs an exe through Valgrind and puts the intermediate files in a | 5 """Runs an exe through Valgrind and puts the intermediate files in a |
| 6 directory. | 6 directory. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import datetime | 9 import datetime |
| 10 import glob | 10 import glob |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 # The other case is only possible with -t cmdline. | 854 # The other case is only possible with -t cmdline. |
| 855 # Anyways, if we omit -symcache_dir the -logdir's value is used which | 855 # Anyways, if we omit -symcache_dir the -logdir's value is used which |
| 856 # should be fine. | 856 # should be fine. |
| 857 symcache_dir = os.path.join(self._options.build_dir, "drmemory.symcache") | 857 symcache_dir = os.path.join(self._options.build_dir, "drmemory.symcache") |
| 858 if not os.path.exists(symcache_dir): | 858 if not os.path.exists(symcache_dir): |
| 859 try: | 859 try: |
| 860 os.mkdir(symcache_dir) | 860 os.mkdir(symcache_dir) |
| 861 except OSError: | 861 except OSError: |
| 862 logging.warning("Can't create symcache dir?") | 862 logging.warning("Can't create symcache dir?") |
| 863 if os.path.exists(symcache_dir): | 863 if os.path.exists(symcache_dir): |
| 864 proc += ["-symcache_dir", symcache_dir] | 864 proc += ["-symcache_dir", common.NormalizeWindowsPath(symcache_dir)] |
| 865 | 865 |
| 866 # Use -no_summary to suppress DrMemory's summary and init-time | 866 # Use -no_summary to suppress DrMemory's summary and init-time |
| 867 # notifications. We generate our own with drmemory_analyze.py. | 867 # notifications. We generate our own with drmemory_analyze.py. |
| 868 proc += ["-batch", "-no_summary"] | 868 proc += ["-batch", "-no_summary"] |
| 869 | 869 |
| 870 # Un-comment to disable interleaved output. Will also suppress error | 870 # Un-comment to disable interleaved output. Will also suppress error |
| 871 # messages normally printed to stderr. | 871 # messages normally printed to stderr. |
| 872 #proc += ["-quiet", "-no_results_to_stderr"] | 872 #proc += ["-quiet", "-no_results_to_stderr"] |
| 873 | 873 |
| 874 proc += ["-callstack_max_frames", "40"] | 874 proc += ["-callstack_max_frames", "40"] |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 return Asan() | 1198 return Asan() |
| 1199 try: | 1199 try: |
| 1200 platform_name = common.PlatformNames()[0] | 1200 platform_name = common.PlatformNames()[0] |
| 1201 except common.NotImplementedError: | 1201 except common.NotImplementedError: |
| 1202 platform_name = sys.platform + "(Unknown)" | 1202 platform_name = sys.platform + "(Unknown)" |
| 1203 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, | 1203 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, |
| 1204 platform_name) | 1204 platform_name) |
| 1205 | 1205 |
| 1206 def CreateTool(tool): | 1206 def CreateTool(tool): |
| 1207 return ToolFactory().Create(tool) | 1207 return ToolFactory().Create(tool) |
| OLD | NEW |