llvm-project/clang/lib
Teresa Johnson 0949f96dc6 [MemProf] Pass down memory profile name with optional path from clang
Similar to -fprofile-generate=, add -fmemory-profile= which takes a
directory path. This is passed down to LLVM via a new module flag
metadata. LLVM in turn provides this name to the runtime via the new
__memprof_profile_filename variable.

Additionally, always pass a default filename (in $cwd if a directory
name is not specified vi the = form of the option). This is also
consistent with the behavior of the PGO instrumentation. Since the
memory profiles will generally be fairly large, it doesn't make sense to
dump them to stderr. Also, importantly, the memory profiles will
eventually be dumped in a compact binary format, which is another reason
why it does not make sense to send these to stderr by default.

Change the existing memprof tests to specify log_path=stderr when that
was being relied on.

Depends on D89086.

Differential Revision: https://reviews.llvm.org/D89087
2020-11-01 17:38:23 -08:00
..
ARCMigrate [clang] Use SourceLocation as key in hash maps, NFCI 2020-10-20 16:24:09 +01:00
AST [CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop. 2020-10-31 17:51:29 +01:00
ASTMatchers [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs 2020-10-11 18:52:38 +03:00
Analysis Thread safety analysis: Consider static class members as inaccessible 2020-10-30 00:35:14 +01:00
Basic [X86] Support Intel avxvnni 2020-10-31 12:39:51 +08:00
CodeGen [MemProf] Pass down memory profile name with optional path from clang 2020-11-01 17:38:23 -08:00
CrossTU [analyzer] Add CTUImportCppThreshold for C++ files 2020-07-09 15:36:33 +02:00
DirectoryWatcher Revert "DirectoryWatcher: add an implementation for Windows" 2020-10-13 12:35:22 -07:00
Driver [MemProf] Pass down memory profile name with optional path from clang 2020-11-01 17:38:23 -08:00
Edit [clang] Use SourceLocation as key in hash maps, NFCI 2020-10-20 16:24:09 +01:00
Format [clang-format] Fix misformatted macro definitions after D86959 2020-10-27 12:16:46 +00:00
Frontend [MemProf] Pass down memory profile name with optional path from clang 2020-11-01 17:38:23 -08:00
FrontendTool [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
Headers [X86] Support Intel avxvnni 2020-10-31 12:39:51 +08:00
Index [Clang][PowerPC] Add __vector_pair and __vector_quad types 2020-10-28 13:19:20 -05:00
IndexSerialization [index-while-building] Fix build with -DBUILD_SHARED_LIBS=True 2020-08-20 15:12:56 +01:00
Lex HeaderSearch: Simplify use of FileEntryRef in HeaderSearch::LookupFile, NFC 2020-10-23 22:10:50 -04:00
Parse Add option 'exceptions' to pragma clang fp 2020-10-31 17:36:12 +07:00
Rewrite SourceManager: Clarify that FileInfo always has a ContentCache, NFC 2020-10-23 12:38:53 -04:00
Sema [Sema] Diagnose annotating `if constexpr` with a likelihood attribute 2020-10-31 17:51:36 +01:00
Serialization ModuleManager: Simplify lookupModuleFile by only setting the out parameter once, NFC 2020-10-28 19:04:22 -04:00
StaticAnalyzer [MallocChecker] Remove duplicate QCoreApplication::postEvent check. NFCI. 2020-10-27 13:14:54 +00:00
Testing Fix MSVC "not all control paths return a value" warning. NFC. 2020-06-05 10:45:59 +01:00
Tooling [Syntax] Add iterators over children of syntax trees. 2020-10-28 12:37:57 +01:00
CMakeLists.txt Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00