diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-03-18 09:02:27 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-03-18 09:02:27 +0000 |
commit | 2c5284e0f87e101e177a151fae5f557bcf6f664c (patch) | |
tree | 20cce478fa6e8c4a5584fe2b43aa2719135c9245 /lib/tsan/rtl/tsan_rtl_report.cc | |
parent | 491852ecf05d927cf543292ded98dcc545799b4d (diff) | |
download | compiler-rt-2c5284e0f87e101e177a151fae5f557bcf6f664c.tar.gz compiler-rt-2c5284e0f87e101e177a151fae5f557bcf6f664c.tar.bz2 compiler-rt-2c5284e0f87e101e177a151fae5f557bcf6f664c.tar.xz |
tsan: use StackDepot for thread creation stacks
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl_report.cc')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl_report.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_rtl_report.cc b/lib/tsan/rtl/tsan_rtl_report.cc index 27ffddaa..5967f774 100644 --- a/lib/tsan/rtl/tsan_rtl_report.cc +++ b/lib/tsan/rtl/tsan_rtl_report.cc @@ -188,7 +188,18 @@ void ScopedReport::AddThread(const ThreadContext *tctx) { rt->running = (tctx->status == ThreadStatusRunning); rt->name = tctx->name ? internal_strdup(tctx->name) : 0; rt->parent_tid = tctx->parent_tid; + rt->stack = 0; +#ifdef TSAN_GO rt->stack = SymbolizeStack(tctx->creation_stack); +#else + uptr ssz = 0; + const uptr *stack = StackDepotGet(tctx->creation_stack_id, &ssz); + if (stack) { + StackTrace trace; + trace.Init(stack, ssz); + rt->stack = SymbolizeStack(trace); + } +#endif } #ifndef TSAN_GO |