llvm-project/clang/unittests
Justin Lebar 8b08d2c5c8 Don't instantiate a full host toolchain in ASTMatchersTest.
Summary:
This test was stat()'ing large swaths of /usr/lib hundreds of times, as
every invocation of matchesConditionally*() created a new Linux
toolchain.

In addition to being slow, perf indicated this was causing substantial
contention in the kernel.

Something is...interesting in the kernel, as without this patch I
sometimes see ~11m spent in the kernel, and sometimes ~5m.  This
corresponds to bimodal ninja check-clang times of ~30s and ~20s.

It's not clear to me exactly what causes the bimodality.  In any case,
this change makes this test run in 2.5s, down from 17s, and it seems to
cause us to get the 20s ninja check-clang time unconditionally.

Reviewers: chandlerc

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D21810

llvm-svn: 274257
2016-06-30 18:12:25 +00:00
..
AST Prune away some unused using decls. NFC. 2016-06-08 15:34:36 +00:00
ASTMatchers Don't instantiate a full host toolchain in ASTMatchersTest. 2016-06-30 18:12:25 +00:00
Basic [VFS] Add level() method to vfs::recursive_directory_iterator 2016-05-14 00:00:18 +00:00
CodeGen Make sure the LLVMContext outlive the CompilerInstance 2016-04-14 05:37:41 +00:00
Driver Remove autoconf support 2016-01-26 21:30:40 +00:00
Format clang-format: [JS] Fix build breakage. 2016-06-24 17:45:13 +00:00
Frontend Use Backend_EmitMCNull for null codegen unit tests. 2016-02-18 20:27:16 +00:00
Lex [Lexer] Don't merge macro args from different macro files 2016-05-19 23:44:02 +00:00
Rewrite Remove autoconf support 2016-01-26 21:30:40 +00:00
Sema [Sema] Allow an external sema source to handle delayed typo corrections. 2016-05-19 10:46:10 +00:00
StaticAnalyzer Remove autoconf support 2016-01-26 21:30:40 +00:00
Tooling [Tooling] Add optional argument to getFullyQualifiedName to prepend "::". 2016-06-29 22:38:59 +00:00
libclang tests: Add explicit -stdlib=libstdc++ to tests that require it 2016-02-12 07:48:28 +00:00
CMakeLists.txt [CMake] Don't build the libclang tests unless you're building libclang 2015-12-04 23:12:19 +00:00