MCPcopy Create free account
hub / github.com/apache/impala / SetupThreadLocalBuffer

Method SetupThreadLocalBuffer

be/src/kudu/util/debug/trace_event_impl.cc:1723–1738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1721}
1722
1723TraceLog::PerThreadInfo* TraceLog::SetupThreadLocalBuffer() {
1724 int64_t cur_tid = Thread::UniqueThreadId();
1725
1726 auto thr_info = new PerThreadInfo();
1727 thr_info->event_buffer_ = nullptr;
1728 thr_info->is_in_trace_event_ = 0;
1729 thread_local_info_ = thr_info;
1730
1731 threadlocal::internal::AddDestructor(&TraceLog::ThreadExitingCB, this);
1732
1733 {
1734 MutexLock lock(active_threads_lock_);
1735 InsertOrDie(&active_threads_, cur_tid, thr_info);
1736 }
1737 return thr_info;
1738}
1739
1740void TraceLog::ThreadExitingCB(void* arg) {
1741 static_cast<TraceLog*>(arg)->ThreadExiting();

Callers

nothing calls this directly

Calls 2

AddDestructorFunction · 0.85
InsertOrDieFunction · 0.85

Tested by

no test coverage detected