Lines Matching +full:output +full:- +full:files
3 # Use of this source code is governed by a BSD-style license that can be
5 """Functions for interacting with llvm-profdata
8 manually on an as-needed basis:
33 """Calls the llvm-profdata tool.
36 profile_input_file_paths: A list of relative paths to the files that
39 profdata_tool_path: The path to the llvm-profdata executable.
40 sparse (bool): flag to indicate whether to run llvm-profdata with --sparse.
41 Doc: https://llvm.org/docs/CommandGuide/llvm-profdata.html#profdata-merge
51 logging.debug('Profile output path: %r' % profile_output_file_path)
54 profdata_tool_path, 'merge', '-o', profile_output_file_path,
57 subprocess_cmd += ['-sparse=true',]
61 # Redirecting stderr is required because when error happens, llvm-profdata
62 # writes the error output to stderr and our error handling logic relies on
63 # that output.
64 output = subprocess.check_output(subprocess_cmd, stderr=subprocess.STDOUT)
65 logging.info('Merge succeeded with output: %r', output)
67 logging.error('Failed to merge profiles, return code (%d), output: %r' %
68 (error.returncode, error.output))
97 output, otherwise, won't.
99 This method is mainly used to filter out invalid profraw files.
103 profdata_tool_path: The path to the llvm-profdata executable.
104 sparse (bool): flag to indicate whether to run llvm-profdata with --sparse.
105 Doc: https://llvm.org/docs/CommandGuide/llvm-profdata.html#profdata-merge
109 A list of converted .profdata files of *valid* profraw files.
110 A list of *invalid* profraw files.
111 A list of profraw files that have counter overflows.
118 counts = max(10, cpu_count - 5) # Use 10+ processes, but leave 5 cpu cores.
149 '-o',
153 subprocess_cmd.append('--sparse')
165 # Redirecting stderr is required because when error happens, llvm-profdata
166 # writes the error output to stderr and our error handling logic relies on
167 # that output.
171 logging.info('Validating and converting %r to %r succeeded with output: %r',
178 logging.warning('Validating and converting %r to %r failed with output: %r',
179 profraw_file, output_profdata_file, error.output)
180 validation_output = error.output
192 template = 'Bad profile: %r, output: %r'
194 template = 'Counter overflow: %r, output: %r'
199 # The output file may be created before llvm-profdata determines the
205 """Merges generated .exec files to output_path.
208 input_dir (str): The path to traverse to find input files.
220 cmd = [_JAVA_PATH, '-jar', jacococli_path, 'merge']
222 cmd.extend(['--destfile', output_path])
223 output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
224 logging.info('Merge succeeded with output: %r', output)
234 """Merges the profiles produced by the shards using llvm-profdata.
241 profdata_tool_path: The path to the llvm-profdata executable.
244 sparse (bool): flag to indicate whether to run llvm-profdata with --sparse.
245 Doc: https://llvm.org/docs/CommandGuide/llvm-profdata.html#profdata-merge
260 logging.warning('--skip-validation has been enabled. Skipping conversion '
268 logging.info('List of converted .profdata files: %r',
271 'List of invalid .profraw files that failed to validate and convert: %r'
278 # The list of input files could be empty in the following scenarios:
282 # files, however, all of them turned out to be invalid.
284 logging.info('There is no valid profraw/profdata files to merge, skip '
295 # pretty large. If the inputs are profdata files, do not remove them as they
319 # E.g. /b/s/w/ir/tmp/t/tmpSvBRii/44b643576cf39f10/profraw/default-1.profraw