summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_stackdepot.h
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-10-26 03:35:14 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-10-26 03:35:14 +0000
commit4c25703803a2bf100987e0905314eebd2af1c5c7 (patch)
tree13f177d45ee7a7a05958a818c149f41615d257fd /lib/sanitizer_common/sanitizer_stackdepot.h
parent259b4571c582b9c6852b2d18b5583f25bc6582f6 (diff)
[Sanitizer] Make StackTrace a lightweight reference to array of PCs, and
introduce a BufferedStackTrace class, which owns this array. Summary: This change splits __sanitizer::StackTrace class into a lightweight __sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace, which owns it. This would allow us to simplify the interface of StackDepot, and eventually merge __sanitizer::StackTrace with __tsan::StackTrace. Test Plan: regression test suite. Reviewers: kcc, dvyukov Reviewed By: dvyukov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5985 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_stackdepot.h')
-rw-r--r--lib/sanitizer_common/sanitizer_stackdepot.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_stackdepot.h b/lib/sanitizer_common/sanitizer_stackdepot.h
index 10987e348..c76c075ac 100644
--- a/lib/sanitizer_common/sanitizer_stackdepot.h
+++ b/lib/sanitizer_common/sanitizer_stackdepot.h
@@ -15,6 +15,7 @@
#include "sanitizer_common.h"
#include "sanitizer_internal_defs.h"
+#include "sanitizer_stacktrace.h"
namespace __sanitizer {
@@ -35,10 +36,11 @@ struct StackDepotHandle {
const int kStackDepotMaxUseCount = 1U << 20;
StackDepotStats *StackDepotGetStats();
+// FIXME: Pass StackTrace as an input argument here.
u32 StackDepotPut(const uptr *stack, uptr size);
StackDepotHandle StackDepotPut_WithHandle(const uptr *stack, uptr size);
// Retrieves a stored stack trace by the id.
-const uptr *StackDepotGet(u32 id, uptr *size);
+StackTrace StackDepotGet(u32 id);
void StackDepotLockAll();
void StackDepotUnlockAll();