[clang] 0f34ea5 - [perf-training] Update ' (in-process)' prefix handling

Francis Visoiu Mistrih via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 25 09:29:38 PST 2020


Author: Francis Visoiu Mistrih
Date: 2020-01-25T09:14:24-08:00
New Revision: 0f34ea5dc3cb3efea12dac1fa28b4d3db0cebc75

URL: https://github.com/llvm/llvm-project/commit/0f34ea5dc3cb3efea12dac1fa28b4d3db0cebc75
DIFF: https://github.com/llvm/llvm-project/commit/0f34ea5dc3cb3efea12dac1fa28b4d3db0cebc75.diff

LOG: [perf-training] Update ' (in-process)' prefix handling

A recent change added a new line after the prefix, so it's now part of
the prefix list.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/utils/perf-training/perf-helper.py b/clang/utils/perf-training/perf-helper.py
index 58eef65c6e73..88708a92712a 100644
--- a/clang/utils/perf-training/perf-helper.py
+++ b/clang/utils/perf-training/perf-helper.py
@@ -123,6 +123,7 @@ def get_cc1_command_for_args(cmd, env):
           ln.startswith('Thread model:') or
           ln.startswith('InstalledDir:') or
           ln.startswith('LLVM Profile Note') or
+          ln.startswith(' (in-process)') or
           ' version ' in ln):
           continue
       cc_commands.append(ln)
@@ -131,15 +132,7 @@ def get_cc1_command_for_args(cmd, env):
       print('Fatal error: unable to determine cc1 command: %r' % cc_output)
       exit(1)
 
-  cc_command = cc_commands[0]
-
-  # When cc1 runs in the same process as the driver, it prefixes the cc1
-  # invocation with ' (in-process)'. Skip it.
-  skip_pfx_line = ' (in-process)'
-  if cc_command.startswith(skip_pfx_line):
-      cc_command = cc_command[len(skip_pfx_line):]
-
-  cc1_cmd = shlex.split(cc_command)
+  cc1_cmd = shlex.split(cc_commands[0])
   if not cc1_cmd:
       print('Fatal error: unable to determine cc1 command: %r' % cc_output)
       exit(1)


        


More information about the cfe-commits mailing list