[Order Files] Fixing an error in the perf-helper script
authorChris Bieneman <beanz@apple.com>
Mon, 1 Aug 2016 22:54:00 +0000 (22:54 +0000)
committerChris Bieneman <beanz@apple.com>
Mon, 1 Aug 2016 22:54:00 +0000 (22:54 +0000)
Dtrace probemod needs to be based on the first argument of the command, not the first argument of the args. This error was introduced a while back when I added support for skipping the driver and invoking cc1 directly.

llvm-svn: 277401

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

index 0dc280d..30b9cae 100644 (file)
@@ -75,7 +75,7 @@ def dtrace(args):
       target = "oneshot$target:::entry"
   else:
       target = "pid$target:::entry"
-  predicate = '%s/probemod=="%s"/' % (target, os.path.basename(args[0]))
+  predicate = '%s/probemod=="%s"/' % (target, os.path.basename(cmd[0]))
   log_timestamp = 'printf("dtrace-TS: %d\\n", timestamp)'
   if opts.use_ustack:
       action = 'ustack(1);'