P4 to Git Change 1206023 by yaxunl@yaxunl_stg_win50 on 2015/10/30 14:17:53
SWDEV-80261 - Enable dump stack trace in debug build when assert/abort/segfault to facilitate debugging.
It is useful to see the stack trace when program assert(), especially in teamcity when some issues are not reproducible locally. This change enables that.
Only enabled for debug build.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/v0_8/if_acl.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#83 edit
[ROCm/clr commit: f1b41d1cca]
Este commit está contenido en:
1 padre
e4376a5ecd
commit
336ba7d444
1 file changed
+4
-14
@@ -96,6 +96,10 @@ if_aclCompilerInit(aclCompiler *cl, aclBinary *bin,
|
||||
#endif
|
||||
));
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
llvm::EnablePrettyStackTrace();
|
||||
llvm::sys::PrintStackTraceOnErrorSignal();
|
||||
#endif
|
||||
// Initialize targets first.
|
||||
llvm::InitializeAllTargets();
|
||||
|
||||
@@ -1437,24 +1441,10 @@ if_aclCompile(aclCompiler *cl,
|
||||
}
|
||||
#ifdef WITH_TARGET_HSAIL
|
||||
if (isHSAILTarget(bin->target)) {
|
||||
#ifndef DEBUG
|
||||
// Do not install signal handlers for the pretty stack trace.
|
||||
#if defined(LEGACY_COMPLIB)
|
||||
llvm::DisablePrettyStackTrace = true;
|
||||
#endif
|
||||
#else
|
||||
#if !defined(LEGACY_COMPLIB)
|
||||
llvm::EnablePrettyStackTrace();
|
||||
#endif
|
||||
llvm::sys::PrintStackTraceOnErrorSignal();
|
||||
#endif
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
llvm::InitializeAllAsmParsers();
|
||||
#if defined(LEGACY_COMPLIB)
|
||||
llvm::DisablePrettyStackTrace = true;
|
||||
#endif
|
||||
llvm::PassRegistry &Registry = *llvm::PassRegistry::getPassRegistry();
|
||||
llvm::initializeSPIRVerifierPass(Registry);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user