[TSan] Use StackTrace from sanitizer_common where applicable
authorAlexey Samsonov <vonosmas@gmail.com>
Mon, 3 Nov 2014 22:23:44 +0000 (22:23 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Mon, 3 Nov 2014 22:23:44 +0000 (22:23 +0000)
commit40733a8024776d7fe088f433a234f85bfc91692f
treecf0cae88305f4e578d476cd71c28b3aaefdb1f38
parent46ecdeecc4931d42b9d28b38de0081f6d7c0adc6
[TSan] Use StackTrace from sanitizer_common where applicable

Summary:
This change removes `__tsan::StackTrace` class. There are
now three alternatives:
  # Lightweight `__sanitizer::StackTrace`, which doesn't own a buffer
  of PCs. It is used in functions that need stack traces in read-only
  mode, and helps to prevent unnecessary allocations/copies (e.g.
  for StackTraces fetched from StackDepot).
  # `__sanitizer::BufferedStackTrace`, which stores buffer of PCs in
  a constant array. It is used in TraceHeader (non-Go version)
  # `__tsan::VarSizeStackTrace`, which owns buffer of PCs, dynamically
  allocated via TSan internal allocator.

Test Plan: compiler-rt test suite

Reviewers: dvyukov, kcc

Reviewed By: kcc

Subscribers: llvm-commits, kcc

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

llvm-svn: 221194
16 files changed:
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
compiler-rt/lib/tsan/rtl/tsan_defs.h
compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc
compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc
compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
compiler-rt/lib/tsan/rtl/tsan_mman.cc
compiler-rt/lib/tsan/rtl/tsan_rtl.cc
compiler-rt/lib/tsan/rtl/tsan_rtl.h
compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc
compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
compiler-rt/lib/tsan/rtl/tsan_stack_trace.cc
compiler-rt/lib/tsan/rtl/tsan_stack_trace.h
compiler-rt/lib/tsan/rtl/tsan_trace.h
compiler-rt/lib/tsan/tests/unit/tsan_stack_test.cc