summaryrefslogtreecommitdiff
path: root/lib/msan/msan.h
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-21 09:02:13 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-21 09:02:13 +0000
commit6f365cc753d8150ae694357281e4775ac6e365cf (patch)
tree9e5c94cfc525292635964f034f96dbbc255cefe2 /lib/msan/msan.h
parent72a4588166670e397a15c4a97529c849dcb11b3f (diff)
[msan] Chained origins re-design.
Generalize StackDepot and create a new specialized instance of it to efficiently (i.e. without duplicating stack trace data) store the origin history tree. This reduces memory usage for chained origins roughly by an order of magnitude. Most importantly, this new design allows us to put two limits on stored history data (exposed in MSAN_OPTIONS) that help avoid exponential growth in used memory on certain workloads. See comments in lib/msan/msan_origin.h for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.h')
-rw-r--r--lib/msan/msan.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h
index c307534b0..65e233c69 100644
--- a/lib/msan/msan.h
+++ b/lib/msan/msan.h
@@ -32,12 +32,6 @@
#define MEM_IS_SHADOW(mem) \
((uptr)mem >= 0x200000000000ULL && (uptr)mem <= 0x400000000000ULL)
-// Chained stack trace format.
-#define TRACE_MAGIC_MASK 0xFFFFFFFF00000000LLU
-#define TRACE_MAKE_CHAINED(id) ((uptr)id | TRACE_MAGIC_MASK)
-#define TRACE_TO_CHAINED_ID(u) ((uptr)u & (~TRACE_MAGIC_MASK))
-#define TRACE_IS_CHAINED(u) ((((uptr)u) & TRACE_MAGIC_MASK) == TRACE_MAGIC_MASK)
-
const int kMsanParamTlsSizeInWords = 100;
const int kMsanRetvalTlsSizeInWords = 100;
@@ -59,7 +53,7 @@ void InstallTrapHandler();
void InstallAtExitHandler();
void ReplaceOperatorsNewAndDelete();
-const char *GetOriginDescrIfStack(u32 id, uptr *pc);
+const char *GetStackOriginDescr(u32 id, uptr *pc);
void EnterSymbolizer();
void ExitSymbolizer();