summaryrefslogtreecommitdiffstats
path: root/clang/utils/perf-training
Commit message (Collapse)AuthorAgeFilesLines
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-162-4/+4
| | | | | | | | | | | | At the moment almost every lit.site.cfg.in contains two lines comment: ## Autogenerated by LLVM/Clang configuration. # Do not edit! The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from configure_lit_site_cfg with the note and some useful information. llvm-svn: 266516
* [OrderFiles] Don't allow lit to run dtrace multithreadedChris Bieneman2016-04-131-0/+1
| | | | | | Dtrace is implemented to try and minimize performance impact on the process being traced. This results in dtrace dropping samples if it is taking too many CPU resources. Multi-threading dtrace increases the sample drop rate dramatically. llvm-svn: 266213
* [Perf-Training] Reworked workflow improvements for order-file generationChris Bieneman2016-04-081-2/+1
| | | | | | | | | | | | | | | | | | | This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64. Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. llvm-svn: 265864
* [Perf-training] Using os.devnull instead of a temp fileChris Bieneman2016-03-221-4/+1
| | | | | | | | This is based on post-commit feedback from Vedant. Totally didn't know that existed and worked on Windows. Thanks Vedant! llvm-svn: 264064
* [Perf-training] Cleanup based on feedback from Sean SilvasChris Bieneman2016-03-221-11/+6
| | | | | | Sean provided feedback based on r257934 on cfe-commits. This change addresses that feedback. llvm-svn: 264063
* [Perf-training] Fixing an issue with multi-threading PGO generationChris Bieneman2016-03-221-2/+5
| | | | | | When LIT parallelizes the profraw file generation we need to generate unique temp filenames then clean them up after the driver executes. llvm-svn: 264021
* [Perf-training] Adding support for tests to skip the clang driverChris Bieneman2016-03-215-2/+69
| | | | | | | | | | This patch adds a new set of substitutions to the lit run lines for order files and PGO generation which run the clang driver to get the cc1 command, then execute the cc1 command directly. This allows the scripts to bypass profiling the clang driver over and over again. The approach in this patch was discussed via IRC with Sean Silvas. Special thanks to Daniel Dunbar whose out-of-tree code I liberally plagiarized. llvm-svn: 263997
* [cmake] Revert r260742 (and r260744) to improve order file support.Chandler Carruth2016-02-171-1/+2
| | | | | | | | | | This appears to be passing '-Wl,-order_file' to Linux link commands, which then causes the linker to silently, behind the scenes, write the output to 'rder_file' instead of somewhere else. Will work with Chris to figure out the proper support for this, but so far there are numerous people who can't get Clang to update when they build because of this. llvm-svn: 261054
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one. Original Patch Review: http://reviews.llvm.org/D16896 Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16999 llvm-svn: 260742
* Revert "[CMake] Improve the clang order-file generation workflow"Chris Bieneman2016-02-051-1/+2
| | | | | | | | | | | | | This reverts commit r259862, and attempts to fix builder CMakeCaches. Will try this again some other time... Conflicts: CMakeLists.txt tools/driver/CMakeLists.txt llvm-svn: 259872
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16896 llvm-svn: 259862
* [CMake] Fix bots broken by including order file generation in check-allChris Bieneman2016-01-151-0/+4
| | | | llvm-svn: 257948
* [CMake] [Order-files] Use print_function as an attempt at being forward ↵Chris Bieneman2016-01-151-17/+19
| | | | | | | | compatible. Based on feedback from bogner. llvm-svn: 257936
* [CMake] Support generation of linker order files using dtraceChris Bieneman2016-01-154-22/+408
| | | | | | | | | | | | | | | | | | | Summary: This patch extends the lit-based perf-training tooling supplied for PGO data generation to also generate linker order files using dtrace. This patch should work on any system that has dtrace. If CMake can find the dtrace tool it will generate a target 'generate-order-file' which will run the per-training tests wrapped by dtrace to capture function entries. There are several algorithms implemented for sorting the order files which can be experimented with for best performance. The dtrace wrapper also supports bot oneshot and pid probes. The perf-helper.py changes to support order file construction are ported from internal changes by ddunbar; he gets all the credit for the hard work here, I just copy and pasted. Note: I've tested these patches on FreeBSD and OS X 10.10. Reviewers: ddunbar, bogner, silvas Subscribers: llvm-commits, emaste Differential Revision: http://reviews.llvm.org/D16134 llvm-svn: 257934
* [CMake] Fixing a typo in a flagChris Bieneman2015-12-191-1/+1
| | | | | | Turns out cc1's flag has 1 - not 2... llvm-svn: 256070
* [CMake] PGO training dataChris Bieneman2015-12-181-0/+2
| | | | | | Adding in a few more lit substitutions for cc1 and the test exec path. llvm-svn: 256057
* [CMake] Add support for generating profdata for clang from training filesChris Bieneman2015-12-166-0/+150
Summary: This patch adds support for using LIT to drive generating PGO profile data for clang. This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata. Future opportunities for extension: * Support for Build->Profile->Build bootstrapping * Support for linker order file generation using a similar mechanism and the same training data * Support for Windows Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15462 llvm-svn: 255740
OpenPOWER on IntegriCloud