1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Support
Fangrui Song d531bf5b5c PrintStackTrace: don't symbolize if LLVM_DISABLE_SYMBOLIZATION is set
See http://lists.llvm.org/pipermail/llvm-dev/2017-June/113975.html for a related previous discussion.
Many tools install signal handlers to print stack traces and optionally
symbolize the addresses with an external program 'llvm-symbolizer' (when
searching for 'llvm-symbolizer', the directory containg the executable
is preferred over PATH).

'llvm-symbolizer' can be slow if the executable is large and/or if
llvm-symbolizer' itself is under-optimized. For example, my 'llvm-lto2' from a
-DCMAKE_BUILD_TYPE=Debug build is 443MiB. The 'llvm-symbolizer' from the same
build takes ~2s to symbolize it. (An optimized 'llvm-symbolizer' takes 0.34s).
A crashed clang may take more than 5s to symbolize a stack trace.

If a test file has several `not --crash` RUN lines. It can be very slow in a Debug build.
This patch makes `not --crash` set an environment variable to suppress symbolization.
This is similar to D33804 which uses a command line option.
I pick 'symbolization' instead of 'symbolication' because the former is
used much more commonly and its stem matches 'llvm-symbolizer'.

Also set LLVM_DISABLE_CRASH_REPORT=1, which is currently only applicable on
`__APPLE__`.

Reviewed By: dblaikie, aganea

Differential Revision: https://reviews.llvm.org/D86170
2020-08-21 11:27:13 -07:00
..
Unix Use find_library for ncurses 2020-08-17 19:52:52 -07:00
Windows [NFC] Use value initializer for OVERLAPPED 2020-08-07 11:18:33 -07:00
AArch64TargetParser.cpp
ABIBreak.cpp
Allocator.cpp
AMDGPUMetadata.cpp AMDGPU: Remove .value_type from kernel metadata 2020-07-10 18:16:31 -04:00
APFixedPoint.cpp [ADT] Move FixedPoint.h from Clang to LLVM. 2020-08-20 10:29:45 +02:00
APFloat.cpp Fix convertBFloatAPFloatToAPInt for NaN/Inf values 2020-06-05 17:22:43 -07:00
APInt.cpp [ADT] Make Load(AP)IntFromMemory pointer argument const 2020-07-13 17:32:54 +02:00
APSInt.cpp ADT: Fix that APSInt's string constructor claims it requires 5 bits to store a zero 2020-06-10 16:36:33 +02:00
ARMAttributeParser.cpp
ARMBuildAttrs.cpp
ARMTargetParser.cpp [Driver][ARM] Disable unsupported features when nofp arch extension is used 2020-07-29 14:13:22 +01:00
ARMWinEH.cpp
Atomic.cpp
BinaryStreamError.cpp
BinaryStreamReader.cpp
BinaryStreamRef.cpp
BinaryStreamWriter.cpp
BlockFrequency.cpp
BranchProbability.cpp
BuryPointer.cpp
CachePruning.cpp
Chrono.cpp
circular_raw_ostream.cpp
CMakeLists.txt [ADT] Move FixedPoint.h from Clang to LLVM. 2020-08-20 10:29:45 +02:00
CodeGenCoverage.cpp
COM.cpp
CommandLine.cpp [llvm-symbolizer] Switch command line parsing from llvm::cl to OptTable 2020-08-04 08:53:15 -07:00
Compression.cpp [CMake] Simplify CMake handling for zlib 2020-08-11 20:22:11 -07:00
ConvertUTF.cpp
ConvertUTFWrapper.cpp
COPYRIGHT.regex
CrashRecoveryContext.cpp
CRC.cpp [CMake] Simplify CMake handling for zlib 2020-08-11 20:22:11 -07:00
DAGDeltaAlgorithm.cpp
DataExtractor.cpp [Support] Make DataExtractor error messages more clear 2020-06-02 12:57:51 +02:00
Debug.cpp
DebugCounter.cpp DebugCounterList::printOptionInfo - use const auto& iterator in for-range-loop. 2020-07-09 11:37:49 +01:00
DeltaAlgorithm.cpp
DJB.cpp
DynamicLibrary.cpp
ELFAttributeParser.cpp
ELFAttributes.cpp
Errno.cpp
Error.cpp
ErrorHandling.cpp Allow multiple calls to InitLLVM() (NFC) 2020-08-21 06:13:00 +00:00
ExtensibleRTTI.cpp
FileCheck.cpp Use llvm::is_contained where appropriate (NFC) 2020-08-01 21:51:06 -07:00
FileCheckImpl.h [FileCheck] Report captured variables 2020-07-28 19:15:18 -04:00
FileCollector.cpp [llvm] Don't create the directory hierarchy in the FileCollector... 2020-08-17 11:21:39 -07:00
FileOutputBuffer.cpp FileOutputBuffer.h - remove unused includes. NFC. 2020-05-28 14:38:12 +01:00
FileUtilities.cpp
FoldingSet.cpp [Support] FoldingSetNodeID::AddString(): reserve memory 2020-06-08 23:26:54 +03:00
FormattedStream.cpp [Support] Fix signed/unsigned comparison warning 2020-07-08 11:26:10 +01:00
FormatVariadic.cpp [NFC] Simplify splitLiteralAndReplacement function 2020-07-22 15:32:32 -07:00
GlobPattern.cpp
GraphWriter.cpp
Hashing.cpp
Host.cpp [SystemZ/ZOS] Implement computeHostNumPhysicalCores 2020-08-12 08:31:33 -04:00
InitLLVM.cpp
IntEqClasses.cpp
IntervalMap.cpp
ItaniumManglingCanonicalizer.cpp
JSON.cpp
KnownBits.cpp
LEB128.cpp
LineIterator.cpp
LLVMBuild.txt
Locale.cpp
LockFileManager.cpp
LowLevelType.cpp
ManagedStatic.cpp
MathExtras.cpp
MD5.cpp
MemAlloc.cpp
Memory.cpp
MemoryBuffer.cpp
NativeFormatting.cpp
OptimizedStructLayout.cpp
Optional.cpp
Parallel.cpp [Support] Define llvm::parallel::strategy for -DLLVM_ENABLE_THREADS=off builds after D76885 2020-07-08 10:51:20 -07:00
Path.cpp
PluginLoader.cpp
PrettyStackTrace.cpp [Driver] When forcing a crash print the bug report message 2020-06-29 13:13:12 +01:00
Process.cpp
Program.cpp [Clang] Move clang::Job::printArg to llvm::sys::printArg. NFCI. 2020-06-18 09:17:13 -04:00
RandomNumberGenerator.cpp
raw_os_ostream.cpp
raw_ostream.cpp [Support] Class to facilitate file locking 2020-07-30 13:42:20 +07:00
regcomp.c
regengine.inc
regerror.c
regex2.h
regex_impl.h
Regex.cpp [ASTMatchers] Enhanced support for matchers taking Regex arguments 2020-07-02 14:52:25 +01:00
regexec.c
regfree.c
regstrlcpy.c
regutils.h
RISCVAttributeParser.cpp
RISCVAttributes.cpp
RWMutex.cpp
ScaledNumber.cpp
ScopedPrinter.cpp
SHA1.cpp
Signals.cpp PrintStackTrace: don't symbolize if LLVM_DISABLE_SYMBOLIZATION is set 2020-08-21 11:27:13 -07:00
Signposts.cpp
SmallPtrSet.cpp
SmallVector.cpp
SourceMgr.cpp [Support] Replace 'DisableColors' boolean with 'ColorMode' enum 2020-06-08 09:48:47 -07:00
SpecialCaseList.cpp As part of using inclusive language within the llvm project, 2020-06-20 00:24:57 -07:00
Statistic.cpp Fix "Statistics are disabled" 2020-06-03 16:10:09 -07:00
StringExtras.cpp
StringMap.cpp
StringRef.cpp
StringSaver.cpp
SuffixTree.cpp [SuffixTree][MachOpt] Factoring out Suffix Tree and adding Unit Tests 2020-06-08 12:44:18 -07:00
SymbolRemappingReader.cpp
SystemUtils.cpp [opt] Remove obsolete --quiet option 2020-07-08 13:21:20 -07:00
TargetParser.cpp [HIP] Support target id by --offload-arch 2020-08-18 23:43:53 -04:00
TargetRegistry.cpp
TarWriter.cpp
Threading.cpp
ThreadLocal.cpp
ThreadPool.cpp
TimeProfiler.cpp
Timer.cpp
ToolOutputFile.cpp [Support] Use outs() in ToolOutputFile 2020-06-04 14:56:35 +02:00
TrigramIndex.cpp
Triple.cpp [SystemZ/ZOS] Add binary format goff and operating system zos to the triple 2020-08-11 05:26:26 -04:00
Twine.cpp
Unicode.cpp
UnicodeCaseFold.cpp
Valgrind.cpp
VersionTuple.cpp VersionTuple.h - reduce includes to forward declarations. NFC. 2020-06-08 11:08:44 +01:00
VirtualFileSystem.cpp
Watchdog.cpp
WithColor.cpp WithColor.h - reduce CommandLine.h include to forward declaration. NFC. 2020-06-23 17:07:53 +01:00
X86TargetParser.cpp [X86] Rename X86::getImpliedFeatures to X86::updateImpliedFeatures and pass clang's StringMap directly to it. 2020-08-06 00:20:46 -07:00
xxhash.cpp
YAMLParser.cpp
YAMLTraits.cpp [yaml][clang-tidy] Fix multiline YAML serialization 2020-07-09 02:41:58 -07:00
Z3Solver.cpp [llvm][Z3][NFC] Improve mkBitvector performance 2020-06-30 12:26:50 +02:00