diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-03-20 10:11:24 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-03-20 10:11:24 +0000 |
commit | c25e62b0cdbca855e7611583b0ff7013c31db21d (patch) | |
tree | cd41e575364532b35796f48d548d2cd38865a3ef /lib/asan/asan_mac.cc | |
parent | 4b450f46cac42d473ffa4ff2d8d1395706b9c934 (diff) | |
download | compiler-rt-c25e62b0cdbca855e7611583b0ff7013c31db21d.tar.gz |
[ASan] Move malloc stats collection away from AsanThreadRegistry class.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_mac.cc')
-rw-r--r-- | lib/asan/asan_mac.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/asan/asan_mac.cc b/lib/asan/asan_mac.cc index 80dc0f6ba..e88aa6a7d 100644 --- a/lib/asan/asan_mac.cc +++ b/lib/asan/asan_mac.cc @@ -237,7 +237,7 @@ void GetStackTrace(StackTrace *stack, uptr max_s, uptr pc, uptr bp, bool fast) { if ((max_s) > 1) { stack->max_size = max_s; if (!asan_inited) return; - if (AsanThread *t = asanThreadRegistry().GetCurrent()) + if (AsanThread *t = GetCurrentThread()) stack->FastUnwindStack(pc, bp, t->stack_top(), t->stack_bottom()); } } @@ -291,12 +291,12 @@ typedef struct { static ALWAYS_INLINE void asan_register_worker_thread(int parent_tid, StackTrace *stack) { - AsanThread *t = asanThreadRegistry().GetCurrent(); + AsanThread *t = GetCurrentThread(); if (!t) { t = AsanThread::Create(parent_tid, 0, 0, stack); asanThreadRegistry().RegisterThread(t); t->Init(); - asanThreadRegistry().SetCurrent(t); + SetCurrentThread(t); } } @@ -330,7 +330,7 @@ asan_block_context_t *alloc_asan_context(void *ctxt, dispatch_function_t func, (asan_block_context_t*) asan_malloc(sizeof(asan_block_context_t), stack); asan_ctxt->block = ctxt; asan_ctxt->func = func; - asan_ctxt->parent_tid = asanThreadRegistry().GetCurrentTidOrInvalid(); + asan_ctxt->parent_tid = GetCurrentTidOrInvalid(); return asan_ctxt; } @@ -396,7 +396,7 @@ void dispatch_source_set_event_handler(dispatch_source_t ds, void(^work)(void)); #define GET_ASAN_BLOCK(work) \ void (^asan_block)(void); \ - int parent_tid = asanThreadRegistry().GetCurrentTidOrInvalid(); \ + int parent_tid = GetCurrentTidOrInvalid(); \ asan_block = ^(void) { \ GET_STACK_TRACE_THREAD; \ asan_register_worker_thread(parent_tid, &stack); \ |