[Perf-Helper] Add logging for dtrace commands
authorChris Bieneman <beanz@apple.com>
Fri, 29 Jul 2016 22:48:17 +0000 (22:48 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 29 Jul 2016 22:48:17 +0000 (22:48 +0000)
Logging the dtrace command into the top of the dtrace log is useful when debugging why the order file generation is flaky.

llvm-svn: 277234

clang/utils/perf-training/perf-helper.py

index c7c4bdd..0dc280d 100644 (file)
@@ -102,6 +102,7 @@ def dtrace(args):
   start_time = time.time()
 
   with open("%d.dtrace" % os.getpid(), "w") as f:
+    f.write("### Command: %s" % dtrace_args)
     subprocess.check_call(dtrace_args, stdout=f, stderr=subprocess.PIPE)
 
   elapsed = time.time() - start_time