/root/doris/be/src/runtime/thread_context.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include <bthread/bthread.h> |
21 | | #include <bthread/types.h> |
22 | | |
23 | | #include <chrono> |
24 | | #include <memory> |
25 | | #include <string> |
26 | | #include <thread> |
27 | | |
28 | | #include "common/exception.h" |
29 | | #include "common/logging.h" |
30 | | #include "runtime/exec_env.h" |
31 | | #include "runtime/memory/mem_tracker_limiter.h" |
32 | | #include "runtime/memory/thread_mem_tracker_mgr.h" |
33 | | #include "runtime/workload_management/resource_context.h" |
34 | | #include "util/defer_op.h" // IWYU pragma: keep |
35 | | |
36 | | // Used to tracking query/load/compaction/e.g. execution thread memory usage. |
37 | | // This series of methods saves some information to the thread local context of the current worker thread, |
38 | | // including MemTracker, QueryID, etc. Use CONSUME_THREAD_MEM_TRACKER/RELEASE_THREAD_MEM_TRACKER in the code segment where |
39 | | // the macro is located to record the memory into MemTracker. |
40 | | // Not use it in rpc done.run(), because bthread_setspecific may have errors when UBSAN compiles. |
41 | | #if defined(USE_MEM_TRACKER) && !defined(BE_TEST) |
42 | | // Attach to query/load/compaction/e.g. when thread starts. |
43 | | // This will save some info about a working thread in the thread context. |
44 | | // Looking forward to tracking memory during thread execution into MemTrackerLimiter. |
45 | | #define SCOPED_ATTACH_TASK(arg1) auto VARNAME_LINENUM(attach_task) = AttachTask(arg1) |
46 | | // Switch resource context in thread context, used after SCOPED_ATTACH_TASK. |
47 | | #define SCOPED_SWITCH_RESOURCE_CONTEXT(arg1) \ |
48 | | auto VARNAME_LINENUM(switch_resource_context) = doris::SwitchResourceContext(arg1) |
49 | | |
50 | | // Switch MemTrackerLimiter for count memory during thread execution. |
51 | | // Used after SCOPED_ATTACH_TASK, in order to count the memory into another |
52 | | // MemTrackerLimiter instead of the MemTrackerLimiter added by the attach task. |
53 | | #define SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(arg1) \ |
54 | | auto VARNAME_LINENUM(switch_mem_tracker) = doris::SwitchThreadMemTrackerLimiter(arg1) |
55 | | |
56 | | // Looking forward to tracking memory during thread execution into MemTracker. |
57 | | // Usually used to record query more detailed memory, including ExecNode operators. |
58 | | #define SCOPED_CONSUME_MEM_TRACKER(mem_tracker) \ |
59 | | auto VARNAME_LINENUM(add_mem_consumer) = doris::AddThreadMemTrackerConsumer(mem_tracker) |
60 | | |
61 | | #define DEFER_RELEASE_RESERVED() \ |
62 | | Defer VARNAME_LINENUM(defer) { \ |
63 | | [&]() { doris::thread_context()->thread_mem_tracker_mgr->shrink_reserved(); }}; |
64 | | #else |
65 | | // thread context need to be initialized, required by Allocator and elsewhere. |
66 | | #define SCOPED_ATTACH_TASK(arg1, ...) \ |
67 | 272 | auto VARNAME_LINENUM(scoped_tls_at) = doris::ScopedInitThreadContext() |
68 | | #define SCOPED_SWITCH_RESOURCE_CONTEXT(arg1) \ |
69 | 0 | auto VARNAME_LINENUM(switch_resource_context) = doris::ScopedInitThreadContext() |
70 | | #define SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(arg1) \ |
71 | 531k | auto VARNAME_LINENUM(scoped_tls_stmtl) = doris::ScopedInitThreadContext() |
72 | | #define SCOPED_CONSUME_MEM_TRACKER(mem_tracker) \ |
73 | 147 | auto VARNAME_LINENUM(scoped_tls_cmt) = doris::ScopedInitThreadContext() |
74 | 1.02M | #define DEFER_RELEASE_RESERVED() (void)0 |
75 | | #endif |
76 | | |
77 | | #if defined(USE_MEM_TRACKER) && !defined(BE_TEST) |
78 | | // Count a code segment memory |
79 | | // Usage example: |
80 | | // int64_t peak_mem = 0; |
81 | | // { |
82 | | // SCOPED_PEAK_MEM(&peak_mem); |
83 | | // xxxx |
84 | | // } |
85 | | // LOG(INFO) << *peak_mem; |
86 | | #define SCOPED_PEAK_MEM(peak_mem) \ |
87 | | auto VARNAME_LINENUM(scope_peak_mem) = doris::ScopedPeakMem(peak_mem) |
88 | | |
89 | | // Count a code segment memory (memory malloc - memory free) to MemTracker. |
90 | | // Compared to count `scope_mem`, MemTracker is easier to observe from the outside and is thread-safe. |
91 | | // Usage example: std::unique_ptr<MemTracker> tracker = std::make_unique<MemTracker>("first_tracker"); |
92 | | // { SCOPED_CONSUME_MEM_TRACKER_BY_HOOK(_mem_tracker.get()); xxx; xxx; } |
93 | | #define SCOPED_CONSUME_MEM_TRACKER_BY_HOOK(mem_tracker) \ |
94 | | auto VARNAME_LINENUM(add_mem_consumer) = doris::AddThreadMemTrackerConsumerByHook(mem_tracker) |
95 | | #else |
96 | | #define SCOPED_PEAK_MEM(peak_mem) \ |
97 | 121 | auto VARNAME_LINENUM(scoped_tls_pm) = doris::ScopedInitThreadContext() |
98 | | #define SCOPED_CONSUME_MEM_TRACKER_BY_HOOK(mem_tracker) \ |
99 | | auto VARNAME_LINENUM(scoped_tls_cmtbh) = doris::ScopedInitThreadContext() |
100 | | #endif |
101 | | |
102 | | #define SCOPED_SKIP_MEMORY_CHECK() \ |
103 | 1.07M | auto VARNAME_LINENUM(scope_skip_memory_check) = doris::ScopeSkipMemoryCheck() |
104 | | |
105 | | #define SKIP_LARGE_MEMORY_CHECK(...) \ |
106 | | do { \ |
107 | | doris::ThreadLocalHandle::create_thread_local_if_not_exits(); \ |
108 | | doris::thread_context()->thread_mem_tracker_mgr->skip_large_memory_check++; \ |
109 | | DEFER({ \ |
110 | | doris::thread_context()->thread_mem_tracker_mgr->skip_large_memory_check--; \ |
111 | | doris::ThreadLocalHandle::del_thread_local_if_count_is_zero(); \ |
112 | | }); \ |
113 | | __VA_ARGS__; \ |
114 | | } while (0) |
115 | | |
116 | | #define LIMIT_LOCAL_SCAN_IO(data_dir, bytes_read) \ |
117 | 324k | std::shared_ptr<IOThrottle> iot = nullptr; \ |
118 | 324k | auto* t_ctx = doris::thread_context(true); \ |
119 | 324k | if (t_ctx && t_ctx->is_attach_task() && t_ctx->resource_ctx()->workload_group() != nullptr) { \ |
120 | 0 | iot = t_ctx->resource_ctx()->workload_group()->get_local_scan_io_throttle(data_dir); \ |
121 | 0 | } \ |
122 | 324k | if (iot) { \ |
123 | 0 | iot->acquire(-1); \ |
124 | 0 | } \ |
125 | 324k | Defer defer { \ |
126 | 324k | [&]() { \ |
127 | 324k | if (iot) { \ |
128 | 0 | iot->update_next_io_time(*bytes_read); \ |
129 | 0 | t_ctx->resource_ctx()->workload_group()->update_local_scan_io(data_dir, \ |
130 | 0 | *bytes_read); \ |
131 | 0 | } \ |
132 | 324k | } \ |
133 | 324k | } |
134 | | |
135 | | #define LIMIT_REMOTE_SCAN_IO(bytes_read) \ |
136 | 11 | std::shared_ptr<IOThrottle> iot = nullptr; \ |
137 | 11 | auto* t_ctx = doris::thread_context(true); \ |
138 | 11 | if (t_ctx && t_ctx->is_attach_task() && t_ctx->resource_ctx()->workload_group() != nullptr) { \ |
139 | 0 | iot = t_ctx->resource_ctx()->workload_group()->get_remote_scan_io_throttle(); \ |
140 | 0 | } \ |
141 | 11 | if (iot) { \ |
142 | 0 | iot->acquire(-1); \ |
143 | 0 | } \ |
144 | 11 | Defer defer { \ |
145 | 11 | [&]() { \ |
146 | 11 | if (iot) { \ |
147 | 0 | iot->update_next_io_time(*bytes_read); \ |
148 | 0 | t_ctx->resource_ctx()->workload_group()->update_remote_scan_io(*bytes_read); \ |
149 | 0 | } \ |
150 | 11 | } \ buffered_reader.cpp:_ZZN5doris2io14PrefetchBuffer11read_bufferEmPKcmPmENK3$_1clEv Line | Count | Source | 145 | 11 | [&]() { \ | 146 | 11 | if (iot) { \ | 147 | 0 | iot->update_next_io_time(*bytes_read); \ | 148 | 0 | t_ctx->resource_ctx()->workload_group()->update_remote_scan_io(*bytes_read); \ | 149 | 0 | } \ | 150 | 11 | } \ |
Unexecuted instantiation: hdfs_file_reader.cpp:_ZZN5doris2io14HdfsFileReader12read_at_implEmNS_5SliceEPmPKNS0_9IOContextEENK3$_0clEv Unexecuted instantiation: s3_file_reader.cpp:_ZZN5doris2io12S3FileReader12read_at_implEmNS_5SliceEPmPKNS0_9IOContextEENK3$_0clEv |
151 | 11 | } |
152 | | |
153 | | namespace doris { |
154 | | |
155 | | class ThreadContext; |
156 | | class MemTracker; |
157 | | class RuntimeState; |
158 | | class SwitchResourceContext; |
159 | | |
160 | | extern bthread_key_t btls_key; |
161 | | |
162 | | // Is true after ThreadContext construction. |
163 | | inline thread_local bool pthread_context_ptr_init = false; |
164 | | inline thread_local constinit ThreadContext* thread_context_ptr = nullptr; |
165 | | // use mem hook to consume thread mem tracker. |
166 | | inline thread_local bool use_mem_hook = false; |
167 | | |
168 | | // The thread context saves some info about a working thread. |
169 | | // 2 required info: |
170 | | // 1. thread_id: Current thread id, Auto generated. |
171 | | // 2. type(abolished): The type is a enum value indicating which type of task current thread is running. |
172 | | // For example: QUERY, LOAD, COMPACTION, ... |
173 | | // 3. task id: A unique id to identify this task. maybe query id, load job id, etc. |
174 | | // 4. ThreadMemTrackerMgr |
175 | | // |
176 | | // There may be other optional info to be added later. |
177 | | // |
178 | | // Note: Keep the class simple and only add properties. |
179 | | class ThreadContext { |
180 | | public: |
181 | 429k | ThreadContext() { thread_mem_tracker_mgr = std::make_unique<ThreadMemTrackerMgr>(); } |
182 | | |
183 | 429k | ~ThreadContext() = default; |
184 | | |
185 | 9 | void attach_task(const std::shared_ptr<ResourceContext>& rc) { |
186 | | // will only attach_task at the beginning of the thread function, there should be no duplicate attach_task. |
187 | 9 | DCHECK(resource_ctx_ == nullptr); |
188 | 9 | resource_ctx_ = rc; |
189 | 9 | thread_mem_tracker_mgr->attach_limiter_tracker(rc->memory_context()->mem_tracker(), |
190 | 9 | rc->workload_group()); |
191 | 9 | thread_mem_tracker_mgr->enable_wait_gc(); |
192 | 9 | } |
193 | | |
194 | 9 | void detach_task() { |
195 | 9 | resource_ctx_.reset(); |
196 | 9 | thread_mem_tracker_mgr->detach_limiter_tracker(); |
197 | 9 | thread_mem_tracker_mgr->disable_wait_gc(); |
198 | 9 | } |
199 | | |
200 | 324k | bool is_attach_task() { return resource_ctx_ != nullptr; } |
201 | | |
202 | 91 | std::shared_ptr<ResourceContext> resource_ctx() { |
203 | | #if defined(USE_MEM_TRACKER) && !defined(BE_TEST) |
204 | | CHECK(is_attach_task()); |
205 | | return resource_ctx_; |
206 | | #else |
207 | 91 | if (is_attach_task()) { |
208 | 16 | return resource_ctx_; |
209 | 75 | } else { |
210 | 75 | auto ctx = ResourceContext::create_shared(); |
211 | 75 | ctx->memory_context()->set_mem_tracker( |
212 | 75 | doris::ExecEnv::GetInstance()->orphan_mem_tracker()); |
213 | 75 | return ctx; |
214 | 75 | } |
215 | 91 | #endif |
216 | 91 | } |
217 | | |
218 | 0 | static std::string get_thread_id() { |
219 | 0 | std::stringstream ss; |
220 | 0 | ss << std::this_thread::get_id(); |
221 | 0 | return ss.str(); |
222 | 0 | } |
223 | | // Note that if set global Memory Hook, After thread_mem_tracker_mgr is initialized, |
224 | | // the current thread Hook starts to consume/release mem_tracker. |
225 | | // the use of shared_ptr will cause a crash. The guess is that there is an |
226 | | // intermediate state during the copy construction of shared_ptr. Shared_ptr is not equal |
227 | | // to nullptr, but the object it points to is not initialized. At this time, when the memory |
228 | | // is released somewhere, the hook is triggered to cause the crash. |
229 | | std::unique_ptr<ThreadMemTrackerMgr> thread_mem_tracker_mgr; |
230 | | |
231 | | int thread_local_handle_count = 0; |
232 | | |
233 | | private: |
234 | | friend class SwitchResourceContext; |
235 | | std::shared_ptr<ResourceContext> resource_ctx_; |
236 | | }; |
237 | | |
238 | | class ThreadLocalHandle { |
239 | | public: |
240 | 1.60M | static void create_thread_local_if_not_exits() { |
241 | 1.60M | if (bthread_self() == 0) { |
242 | 1.60M | if (!pthread_context_ptr_init) { |
243 | 429k | thread_context_ptr = new ThreadContext(); |
244 | 429k | pthread_context_ptr_init = true; |
245 | 429k | } |
246 | 1.60M | DCHECK(thread_context_ptr != nullptr); |
247 | 1.60M | thread_context_ptr->thread_local_handle_count++; |
248 | 18.4E | } else { |
249 | | // Avoid calling bthread_getspecific frequently to get bthread local. |
250 | | // Very frequent bthread_getspecific will slow, but create_thread_local_if_not_exits is not expected to be much. |
251 | | // Cache the pointer of bthread local in pthead local. |
252 | 18.4E | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); |
253 | 18.4E | if (bthread_context == nullptr) { |
254 | | // If bthread_context == nullptr: |
255 | | // 1. First call to bthread_getspecific (and before any bthread_setspecific) returns NULL |
256 | | // 2. There are not enough reusable btls in btls pool. |
257 | | // else if bthread_context != nullptr: |
258 | | // 1. A new bthread starts, but get a reuses btls. |
259 | 40 | bthread_context = new ThreadContext; |
260 | | // The brpc server should respond as quickly as possible. |
261 | 40 | bthread_context->thread_mem_tracker_mgr->disable_wait_gc(); |
262 | | // set the data so that next time bthread_getspecific in the thread returns the data. |
263 | 40 | CHECK(0 == bthread_setspecific(btls_key, bthread_context) || doris::k_doris_exit); |
264 | 40 | } |
265 | 18.4E | DCHECK(bthread_context != nullptr); |
266 | 18.4E | bthread_context->thread_local_handle_count++; |
267 | 18.4E | } |
268 | 1.60M | } |
269 | | |
270 | | // `create_thread_local_if_not_exits` and `del_thread_local_if_count_is_zero` should be used in pairs, |
271 | | // `del_thread_local_if_count_is_zero` should only be called if `create_thread_local_if_not_exits` returns true |
272 | 1.60M | static void del_thread_local_if_count_is_zero() { |
273 | 1.60M | if (pthread_context_ptr_init) { |
274 | | // in pthread |
275 | 1.60M | thread_context_ptr->thread_local_handle_count--; |
276 | 1.60M | if (thread_context_ptr->thread_local_handle_count == 0) { |
277 | 429k | pthread_context_ptr_init = false; |
278 | 429k | delete doris::thread_context_ptr; |
279 | 429k | thread_context_ptr = nullptr; |
280 | 429k | } |
281 | 1.60M | } else if (bthread_self() != 0) { |
282 | | // in bthread |
283 | 75 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); |
284 | 75 | DCHECK(bthread_context != nullptr); |
285 | 75 | bthread_context->thread_local_handle_count--; |
286 | 1.16k | } else { |
287 | 1.16k | throw Exception(Status::FatalError("__builtin_unreachable")); |
288 | 1.16k | } |
289 | 1.60M | } |
290 | | }; |
291 | | |
292 | | // must call create_thread_local_if_not_exits() before use thread_context(). |
293 | 2.51M | static ThreadContext* thread_context(bool allow_return_null = false) { |
294 | 2.51M | if (pthread_context_ptr_init) { |
295 | | // in pthread |
296 | 2.51M | DCHECK(bthread_self() == 0); |
297 | 2.51M | DCHECK(thread_context_ptr != nullptr); |
298 | 2.51M | return thread_context_ptr; |
299 | 2.51M | } |
300 | 16 | if (bthread_self() != 0) { |
301 | | // in bthread |
302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. |
303 | 14 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); |
304 | 14 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); |
305 | 14 | return bthread_context; |
306 | 14 | } |
307 | 2 | if (allow_return_null) { |
308 | 2 | return nullptr; |
309 | 2 | } |
310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. |
311 | 0 | throw Exception( |
312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); |
313 | 2 | } Unexecuted instantiation: task_worker_pool_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_cumulative_compaction_policy_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: test_schema_cloud_dictionary_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_util_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bitmapfilter_predicate_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bloom_filter_func_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hybrid_set_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: minmax_predicate_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: message_body_sink_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_load_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multi_table_pipe_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_sink_file_writer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: base_compaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bitmap_filter_column_predicate_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: block_column_predicate_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: compaction_delete_bitmap_calculator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: compaction_score_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: compaction_task_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cumulative_compaction_policy_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cumulative_compaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cumulative_compaction_time_series_policy_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: date_bloom_filter_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delete_bitmap_calculator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delete_handler_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delta_writer_cluster_key_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delta_writer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_storage_migration_task_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: index_builder_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: lru_cache_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: memtable_flush_executor_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: memtable_memory_limiter_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: memtable_sort_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: metadata_adder_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: ordered_data_compaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: page_cache_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: path_gc_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: primary_key_index_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: row_cursor_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowid_conversion_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: beta_rowset_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset_meta_manager_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset_meta_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bitmap_index_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bloom_filter_index_reader_writer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: encoding_info_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_gc_binlogs_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: index_compaction_performance_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: index_compaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: index_compaction_utils.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_array_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_compound_reader_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_file_writer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_searcher_cache_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_writer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: zone_map_index_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segcompaction_mow_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segcompaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segment_cache_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segment_footer_cache_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: single_compaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: storage_engine_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: storage_resource_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: storage_types_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_column_object_pool_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_cooldown_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_index_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_meta_manager_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_meta_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_mgr_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_schema_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_schema_index_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: timestamped_version_tracker_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: txn_manager_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wal_manager_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wal_reader_writer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_queue_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multi_cast_data_streamer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vdata_stream_recvr_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: local_exchanger_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: agg_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: agg_shared_state_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: analytic_sink_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: assert_nums_rows_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: datagen_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: distinct_streaming_aggregation_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: empty_set_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exchange_sink_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exchange_source_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: local_merge_sort_source_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_sort_sink_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_aggregation_sink_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_aggregation_source_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_aggregation_test_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_hash_join_probe_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_hash_join_sink_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_hash_join_test_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: repeat_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: set_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: sort_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_sort_sink_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_sort_source_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_sort_test_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spillable_operator_test_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: table_function_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: union_operator_test.cpp:_ZN5dorisL14thread_contextEb pipeline_task_test.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 34 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 34 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 34 | DCHECK(bthread_self() == 0); | 297 | 34 | DCHECK(thread_context_ptr != nullptr); | 298 | 34 | return thread_context_ptr; | 299 | 34 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: pipeline_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: external_scan_context_mgr_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: thread_mem_tracker_mgr_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: snapshot_loader_test.cpp:_ZN5dorisL14thread_contextEb thread_context_test.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 49 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 49 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 49 | DCHECK(bthread_self() == 0); | 297 | 49 | DCHECK(thread_context_ptr != nullptr); | 298 | 49 | return thread_context_ptr; | 299 | 49 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: dummy_workload_group_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: workload_group_manager_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: workload_sched_policy_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_consumer_helper_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_consumer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_merger_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_mgr_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_producer_helper_cross_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_producer_helper_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_producer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: utils_test.cpp:_ZN5dorisL14thread_contextEb scanner_context_test.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 28 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 28 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 28 | DCHECK(bthread_self() == 0); | 297 | 28 | DCHECK(thread_context_ptr != nullptr); | 298 | 28 | return thread_context_ptr; | 299 | 28 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: mock_agg_fn_evaluator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: mock_literal_expr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: mock_slot_ref.cpp:_ZN5dorisL14thread_contextEb run_all_tests.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 2 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 2 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 2 | DCHECK(bthread_self() == 0); | 297 | 2 | DCHECK(thread_context_ptr != nullptr); | 298 | 2 | return thread_context_ptr; | 299 | 2 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
byte_buffer2_test.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 9 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 9 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 9 | DCHECK(bthread_self() == 0); | 297 | 9 | DCHECK(thread_context_ptr != nullptr); | 298 | 9 | return thread_context_ptr; | 299 | 9 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: key_util_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: agg_replace_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_array_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_decimal_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_dictionary_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_ip_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_object_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_string_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_vector_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_agg_state_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_array_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_bitmap_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_datetime_v1_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_decimal_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_fixed_length_object_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_hll_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_ip_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_map_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_number_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_quantile_state_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_string_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_struct_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_time_v2_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: datetime_round_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: from_string_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_arrow_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_csv_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_datetime_v1_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_datetime_v2_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_decimal_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_mysql_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_number_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_string_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_serde_text_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_to_string_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_type_convert_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delta_writer_v2_pool_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exchange_sink_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: paimon_schema_change_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: parquet_reader_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: parquet_thrift_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream_stub_map_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: orc_convert_dict_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: orc_convert_to_orc_literal_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: orc_reader_fill_data_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: orc_reader_init_column_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: orc_reader_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: scan_operator_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: sort_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vfile_scanner_exception_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vgeneric_iterators_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexpr_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_arithmetic_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_aggregation_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_element_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_index_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_size_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_arrays_overlap_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bitmap_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_compressed_materialization_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_convert_tz_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_eq_for_null_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_geo_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_hash_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_hll_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_ifnull_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_ip_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_json_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_jsonb_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_like_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_match_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_math_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_money_format_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_multi_match.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_nullif_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_round_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_string_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_sub_replace_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_test_template.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_test_util.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_time_cast_to_date_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_time_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_url_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: simple_function_factory_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: table_function_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: serialize_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: char_type_padding_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: jsonb_value_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vertical_compaction_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: sort_merger_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: arrow_result_block_buffer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: result_block_buffer_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vtablet_writer_v2_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_transformers_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: arrow_column_to_doris_column_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: task_worker_pool.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_scanner_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_info.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: file_factory.cpp:_ZN5dorisL14thread_contextEb buffered_reader.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 11 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 11 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 11 | DCHECK(bthread_self() == 0); | 297 | 11 | DCHECK(thread_context_ptr != nullptr); | 298 | 11 | return thread_context_ptr; | 299 | 11 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: hdfs_file_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hdfs_file_system.cpp:_ZN5dorisL14thread_contextEb local_file_reader.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 324k | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 324k | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 324k | DCHECK(bthread_self() == 0); | 297 | 324k | DCHECK(thread_context_ptr != nullptr); | 298 | 324k | return thread_context_ptr; | 299 | 324k | } | 300 | 2 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 2 | if (allow_return_null) { | 308 | 2 | return nullptr; | 309 | 2 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 2 | } |
Unexecuted instantiation: local_file_system.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multi_table_pipe.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: s3_file_bufferpool.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: s3_file_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_load_pipe.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_sink_file_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: base_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: base_tablet.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: block_column_predicate.cpp:_ZN5dorisL14thread_contextEb calc_delete_bitmap_executor.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 1 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 1 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 1 | DCHECK(bthread_self() == 0); | 297 | 1 | DCHECK(thread_context_ptr != nullptr); | 298 | 1 | return thread_context_ptr; | 299 | 1 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cumulative_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cumulative_compaction_policy.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cumulative_compaction_time_series_policy.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_dir.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delete_bitmap_calculator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delete_handler.cpp:_ZN5dorisL14thread_contextEb delta_writer.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 15 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 15 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 15 | DCHECK(bthread_self() == 0); | 297 | 15 | DCHECK(thread_context_ptr != nullptr); | 298 | 15 | return thread_context_ptr; | 299 | 15 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: delta_writer_v2.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: match_predicate.cpp:_ZN5dorisL14thread_contextEb memtable.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 15 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 15 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 15 | DCHECK(bthread_self() == 0); | 297 | 15 | DCHECK(thread_context_ptr != nullptr); | 298 | 15 | return thread_context_ptr; | 299 | 15 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: memtable_flush_executor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: memtable_memory_limiter.cpp:_ZN5dorisL14thread_contextEb memtable_writer.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 15 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 15 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 15 | DCHECK(bthread_self() == 0); | 297 | 15 | DCHECK(thread_context_ptr != nullptr); | 298 | 15 | return thread_context_ptr; | 299 | 15 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: merger.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: null_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: olap_server.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cold_data_compaction.cpp:_ZN5dorisL14thread_contextEb page_cache.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 34.7k | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 34.7k | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 34.7k | DCHECK(bthread_self() == 0); | 297 | 34.7k | DCHECK(thread_context_ptr != nullptr); | 298 | 34.7k | return thread_context_ptr; | 299 | 34.7k | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: partial_update_info.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: primary_key_index.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: row_cursor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: beta_rowset.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: beta_rowset_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: beta_rowset_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: beta_rowset_writer_v2.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset_factory.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset_meta.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset_meta_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segcompaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segment_creator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bitmap_index_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bitmap_index_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bloom_filter_index_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: bloom_filter_index_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: encoding_info.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: indexed_column_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: indexed_column_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_compound_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_file_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_file_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_fs_directory.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inverted_index_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: lazy_init_segment_iterator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: ordinal_page_index.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: page_io.cpp:_ZN5dorisL14thread_contextEb segment.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 2.15M | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 2.15M | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 2.15M | DCHECK(bthread_self() == 0); | 297 | 2.15M | DCHECK(thread_context_ptr != nullptr); | 298 | 2.15M | return thread_context_ptr; | 299 | 2.15M | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: column_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: empty_segment_iterator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hierarchical_data_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segment_iterator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segment_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vertical_segment_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: zone_map_index.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vertical_beta_rowset_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowset_builder.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_change.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: segment_loader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: single_replica_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: snapshot_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: storage_engine.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: storage_policy.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: full_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_column_object_pool.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_meta.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_meta_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: like_column_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_schema.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_schema_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_batch_load_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: push_handler.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_checksum_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_clone_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_index_change_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_publish_version_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: engine_storage_migration_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: index_builder.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: txn_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: types.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: version_graph.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wal_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wal_table.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wal_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wrapper_field.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exec_env.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exec_env_init.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: external_scan_context_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: fragment_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: group_commit_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_channel_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_channel.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream.cpp:_ZN5dorisL14thread_contextEb load_stream_writer.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 14 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 14 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 0 | DCHECK(bthread_self() == 0); | 297 | 0 | DCHECK(thread_context_ptr != nullptr); | 298 | 0 | return thread_context_ptr; | 299 | 0 | } | 300 | 14 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 14 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 14 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 14 | return bthread_context; | 306 | 14 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
global_memory_arbitrator.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 1.20k | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 1.20k | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 1.20k | DCHECK(bthread_self() == 0); | 297 | 1.20k | DCHECK(thread_context_ptr != nullptr); | 298 | 1.20k | return thread_context_ptr; | 299 | 1.20k | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: mem_tracker_limiter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: memory_profile.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: message_body_sink.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: query_context.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: result_block_buffer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: record_batch_queue.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: routine_load_task_executor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_consumer_pool.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_consumer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_consumer_group.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_state.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: snapshot_loader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_load_context.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_load_executor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablets_channel.cpp:_ZN5dorisL14thread_contextEb thread_context.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 46 | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 46 | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 46 | DCHECK(bthread_self() == 0); | 297 | 46 | DCHECK(thread_context_ptr != nullptr); | 298 | 46 | return thread_context_ptr; | 299 | 46 | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: dummy_workload_group.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: workload_group.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: workload_group_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: workload_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: workload_sched_policy_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_consumer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_consumer_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_producer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_producer_helper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: runtime_filter_wrapper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: utils.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: http_service.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: internal_service.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: fold_constant_executor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: rowid_fetcher.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: point_query_executor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: row_batch.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: block_compression.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: obj_lru_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: thread.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: thrift_util.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: calc_file_crc_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: check_tablet_segment_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: compaction_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: compaction_score_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delete_bitmap_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: download_binlog_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: file_cache_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: http_stream.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_channel_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: meta_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: pad_rowset_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: pipeline_task_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: report_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: show_hotspot_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: show_nested_index_file_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_load.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: stream_load_2pc.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_migration_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablets_distribution_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablets_info_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregate_function_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregate_function_approx_count_distinct.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregate_function_map.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregate_function_window.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregate_function_window_funnel.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_nullable.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_object.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: allocator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_util.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: heap_sorter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: sorter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: topn_sorter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: block.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_factory.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_object.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: get_least_supertype.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_nullable_serde.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_type_object_serde.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: column_type_convert.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: csv_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: new_plain_binary_line_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: new_json_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: parquet_column_convert.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vparquet_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: file_meta_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vparquet_group_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vparquet_column_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: paimon_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: file_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: iceberg_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: equality_delete.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hudi_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: transactional_hive_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: wal_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: arrow_stream_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: olap_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: scanner_context.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: scanner_scheduler.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: simplified_scan_scheduler.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vjdbc_connector.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: table_connector.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_numbers.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_split.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_v2.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vbitmap_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vbloom_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vectorized_agg_fn.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vectorized_fn_call.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexpr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vcast_expr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: varray_literal.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: varray_map_function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: varray_filter_function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vcase_expr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexpr_context.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vin_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vinfo_func.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vliteral.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vmap_literal.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vmatch_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vruntimefilter_wrapper.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vslot_ref.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vstruct_literal.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vtuple_is_null_predicate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_register.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_flatten.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_exists.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_element.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_index.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_aggregation.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_distance.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_distinct.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_except.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_intersect.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_difference.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_enumerate.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_enumerate_uniq.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_range.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_compact.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_pop.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_constructor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_apply.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_concat.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_pushfront.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_pushback.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_first_or_last_index.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_cum_sum.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_count.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_filter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_contains_all.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_remove.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_shuffle.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_slice.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_sort.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_sortby.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_split.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_union.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_utils.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_with_constant.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_array_zip.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_arrays_overlap.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: varray_match_function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: comparison.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: comparison_equal_for_null.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: comparison_equals.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: comparison_greater.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: comparison_less.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: divide.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_assert_true.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bit.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bit_count.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bit_shift.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bit_test.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bitmap.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_bitmap_variadic.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_case.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_cast.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_coalesce.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_collection_in.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_compress.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_conv.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_convert_tz.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_date_or_datetime_computation.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_date_or_datetime_computation_v2.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_date_or_datetime_to_string.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_datetime_floor_ceil.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_datetime_string_to_string.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_decode_varchar.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_encode_varchar.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_encryption.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_fake.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_grouping.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_hash.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_helpers.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_hex.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_hll.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_ifnull.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_ignore.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_ip.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_java_udf.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_json.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_jsonb.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_map.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_nullables.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_quantile_state.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_regexp.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_rpc.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_size.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_split_by_regexp.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_string.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_struct.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_struct_element.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_time_value_to_field.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_timestamp.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_tokenize.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_utility.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_uuid.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_variant_element.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_width_bucket.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: functions_geo.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: functions_logical.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: functions_multi_string_position.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: functions_multi_string_search.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: if.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: in.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: int_div.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: is_not_null.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: is_null.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: least_greast.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: like.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: match.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: math.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: minus.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: modulo.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multiply.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: nullif.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: plus.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: random.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: round.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: time_of_function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: to_time_function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: function_url.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: uuid.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: uuid_numeric.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: parse2column.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: serialize.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: block_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: olap_data_convertor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vcollect_iterator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vertical_block_reader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vertical_merge_iterator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vgeneric_iterators.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vdata_stream_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vdata_stream_recvr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vsorted_run_merger.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: delta_writer_v2_pool.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream_map_pool.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: load_stream_stub.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: varrow_flight_result_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vdata_stream_sender.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_transformers.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vtablet_writer_v2.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: async_result_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vrow_distribution.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vtablet_finder.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vtablet_block_convertor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vwal_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_stream.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: dependency.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregation_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: aggregation_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: analytic_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: analytic_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: assert_num_rows_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: data_queue.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: datagen_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: distinct_streaming_aggregation_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: empty_set_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exchange_sink_buffer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exchange_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: tablet_sink_hash_partitioner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: exchange_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vsort_exec_exprs.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: file_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: split_source_connector.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hashjoin_build_sink.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hashjoin_probe_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: full_outer_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: inner_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: left_anti_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: left_outer_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: left_semi_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: null_aware_left_anti_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: null_aware_left_semi_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: right_anti_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: right_outer_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: right_semi_join_impl.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: join_build_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: join_probe_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: local_merge_sort_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multi_cast_data_streamer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: nested_loop_join_build_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: nested_loop_join_probe_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: olap_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: parallel_scanner_builder.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vjdbc_table_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: memory_scratch_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vtablet_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: hive_table_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vhive_table_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vhive_partition_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vparquet_transformer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vorc_transformer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vcsv_transformer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: iceberg_table_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: viceberg_table_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: viceberg_partition_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multi_cast_data_stream_sink.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: group_commit_block_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cache_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: group_commit_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: jdbc_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: jdbc_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: es_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: es_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: multi_cast_data_stream_source.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: meta_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: meta_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cache_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vfile_result_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: jdbc_table_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_sort_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_sort_utils.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_sorter.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partition_sort_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_aggregation_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_aggregation_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_hash_join_probe_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: partitioned_hash_join_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: repeat_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: result_file_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: result_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_scan_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_partitions_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_rowsets_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_backend_active_tasks.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_active_queries_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_workload_groups_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_processlist_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_routine_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_user_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_workload_sched_policy_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_table_options_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_workload_group_privileges.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_workload_group_resource_usage_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_table_properties_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_file_cache_statistics.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_catalog_meta_cache_stats_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_backend_kerberos_ticket_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_routine_load_job_scanner.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: set_probe_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: set_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: set_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: sort_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: sort_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_sort_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: spill_sort_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: streaming_aggregation_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: table_function_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: table_function_factory.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: udf_table_function.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_json_array.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_bitmap.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_map.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vexplode_json_object.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: vposexplode.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: union_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: union_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: local_exchange_sink_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: local_exchange_source_operator.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: local_exchanger.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: pipeline.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: pipeline_fragment_context.cpp:_ZN5dorisL14thread_contextEb pipeline_task.cpp:_ZN5dorisL14thread_contextEb Line | Count | Source | 293 | 1.42k | static ThreadContext* thread_context(bool allow_return_null = false) { | 294 | 1.42k | if (pthread_context_ptr_init) { | 295 | | // in pthread | 296 | 1.42k | DCHECK(bthread_self() == 0); | 297 | 1.42k | DCHECK(thread_context_ptr != nullptr); | 298 | 1.42k | return thread_context_ptr; | 299 | 1.42k | } | 300 | 0 | if (bthread_self() != 0) { | 301 | | // in bthread | 302 | | // bthread switching pthread may be very frequent, remember not to use lock or other time-consuming operations. | 303 | 0 | auto* bthread_context = static_cast<ThreadContext*>(bthread_getspecific(btls_key)); | 304 | 0 | DCHECK(bthread_context != nullptr && bthread_context->thread_local_handle_count > 0); | 305 | 0 | return bthread_context; | 306 | 0 | } | 307 | 0 | if (allow_return_null) { | 308 | 0 | return nullptr; | 309 | 0 | } | 310 | | // It means that use thread_context() but this thread not attached a query/load using SCOPED_ATTACH_TASK macro. | 311 | 0 | throw Exception( | 312 | 0 | Status::FatalError("__builtin_unreachable, {}", doris::MEMORY_ORPHAN_CHECK_MSG)); | 313 | 0 | } |
Unexecuted instantiation: query_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: task_queue.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: task_scheduler.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_compaction_action.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_cumulative_compaction_policy.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_delete_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_engine_calc_delete_bitmap_task.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_meta_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_rowset_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_schema_change_job.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_storage_engine.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: block_file_cache_downloader.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_compaction_stop_token.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_full_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_cumulative_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_base_compaction.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_stream_load_executor.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_tablet.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_tablet_hotspot.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_tablet_mgr.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_tablets_channel.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_delta_writer.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_rowset_builder.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_txn_delete_bitmap_cache.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: cloud_warm_up_manager.cpp:_ZN5dorisL14thread_contextEb Unexecuted instantiation: schema_cloud_dictionary_cache.cpp:_ZN5dorisL14thread_contextEb |
314 | | |
315 | | class ScopedPeakMem { |
316 | | public: |
317 | | explicit ScopedPeakMem(int64* peak_mem) |
318 | | : _peak_mem(peak_mem), |
319 | 3 | _mem_tracker("ScopedPeakMem:" + UniqueId::gen_uid().to_string()) { |
320 | 3 | ThreadLocalHandle::create_thread_local_if_not_exits(); |
321 | 3 | thread_context()->thread_mem_tracker_mgr->push_consumer_tracker(&_mem_tracker); |
322 | 3 | } |
323 | | |
324 | 3 | ~ScopedPeakMem() { |
325 | 3 | thread_context()->thread_mem_tracker_mgr->pop_consumer_tracker(); |
326 | 3 | *_peak_mem += _mem_tracker.peak_consumption(); |
327 | 3 | ThreadLocalHandle::del_thread_local_if_count_is_zero(); |
328 | 3 | } |
329 | | |
330 | | private: |
331 | | int64* _peak_mem; |
332 | | MemTracker _mem_tracker; |
333 | | }; |
334 | | |
335 | | // only hold thread context in scope. |
336 | | class ScopedInitThreadContext { |
337 | | public: |
338 | 531k | explicit ScopedInitThreadContext() { ThreadLocalHandle::create_thread_local_if_not_exits(); } |
339 | | |
340 | 531k | ~ScopedInitThreadContext() { ThreadLocalHandle::del_thread_local_if_count_is_zero(); } |
341 | | }; |
342 | | |
343 | | class AttachTask { |
344 | | public: |
345 | | // you must use ResourceCtx or MemTracker initialization. |
346 | | explicit AttachTask() = delete; |
347 | | |
348 | | explicit AttachTask(const std::shared_ptr<ResourceContext>& rc); |
349 | | |
350 | | // Shortcut attach task, initialize an empty resource context, and set the memory tracker. |
351 | | explicit AttachTask(const std::shared_ptr<MemTrackerLimiter>& mem_tracker); |
352 | | |
353 | | // is query or load, initialize with memory tracker, query id and workload group wptr. |
354 | | explicit AttachTask(RuntimeState* runtime_state); |
355 | | |
356 | | explicit AttachTask(QueryContext* query_ctx); |
357 | | |
358 | | void init(const std::shared_ptr<ResourceContext>& rc); |
359 | | |
360 | | ~AttachTask(); |
361 | | }; |
362 | | |
363 | | class SwitchResourceContext { |
364 | | public: |
365 | | explicit SwitchResourceContext(const std::shared_ptr<ResourceContext>& rc); |
366 | | |
367 | | ~SwitchResourceContext(); |
368 | | |
369 | | private: |
370 | | std::shared_ptr<ResourceContext> old_resource_ctx_ {nullptr}; |
371 | | }; |
372 | | |
373 | | class SwitchThreadMemTrackerLimiter { |
374 | | public: |
375 | | explicit SwitchThreadMemTrackerLimiter( |
376 | | const std::shared_ptr<doris::MemTrackerLimiter>& mem_tracker); |
377 | | |
378 | | ~SwitchThreadMemTrackerLimiter(); |
379 | | |
380 | | private: |
381 | | bool is_switched_ {false}; |
382 | | }; |
383 | | |
384 | | class AddThreadMemTrackerConsumer { |
385 | | public: |
386 | | // The owner and user of MemTracker are in the same thread, and the raw pointer is faster. |
387 | | // If mem_tracker is nullptr, do nothing. |
388 | | explicit AddThreadMemTrackerConsumer(MemTracker* mem_tracker); |
389 | | |
390 | | // The owner and user of MemTracker are in different threads. If mem_tracker is nullptr, do nothing. |
391 | | explicit AddThreadMemTrackerConsumer(const std::shared_ptr<MemTracker>& mem_tracker); |
392 | | |
393 | | ~AddThreadMemTrackerConsumer(); |
394 | | |
395 | | private: |
396 | | std::shared_ptr<MemTracker> _mem_tracker; // Avoid mem_tracker being released midway. |
397 | | bool _need_pop = false; |
398 | | }; |
399 | | |
400 | | class AddThreadMemTrackerConsumerByHook { |
401 | | public: |
402 | | explicit AddThreadMemTrackerConsumerByHook(const std::shared_ptr<MemTracker>& mem_tracker); |
403 | | ~AddThreadMemTrackerConsumerByHook(); |
404 | | |
405 | | private: |
406 | | std::shared_ptr<MemTracker> _mem_tracker; |
407 | | }; |
408 | | |
409 | | class ScopeSkipMemoryCheck { |
410 | | public: |
411 | 1.07M | explicit ScopeSkipMemoryCheck() { |
412 | 1.07M | ThreadLocalHandle::create_thread_local_if_not_exits(); |
413 | 1.07M | doris::thread_context()->thread_mem_tracker_mgr->skip_memory_check++; |
414 | 1.07M | } |
415 | | |
416 | 1.07M | ~ScopeSkipMemoryCheck() { |
417 | 1.07M | doris::thread_context()->thread_mem_tracker_mgr->skip_memory_check--; |
418 | 1.07M | ThreadLocalHandle::del_thread_local_if_count_is_zero(); |
419 | 1.07M | } |
420 | | }; |
421 | | |
422 | | // Basic macros for mem tracker, usually do not need to be modified and used. |
423 | | #if defined(USE_MEM_TRACKER) && !defined(BE_TEST) |
424 | | // used to fix the tracking accuracy of caches. |
425 | | #define THREAD_MEM_TRACKER_TRANSFER_TO(size, tracker) \ |
426 | | do { \ |
427 | | DCHECK(doris::k_doris_exit || !doris::config::enable_memory_orphan_check || \ |
428 | | doris::thread_context()->thread_mem_tracker_mgr->limiter_mem_tracker()->label() != \ |
429 | | "Orphan") \ |
430 | | << doris::memory_orphan_check_msg; \ |
431 | | doris::thread_context()->thread_mem_tracker_mgr->limiter_mem_tracker()->transfer_to( \ |
432 | | size, tracker); \ |
433 | | } while (0) |
434 | | |
435 | | #define THREAD_MEM_TRACKER_TRANSFER_FROM(size, tracker) \ |
436 | | do { \ |
437 | | DCHECK(doris::k_doris_exit || !doris::config::enable_memory_orphan_check || \ |
438 | | doris::thread_context()->thread_mem_tracker_mgr->limiter_mem_tracker()->label() != \ |
439 | | "Orphan") \ |
440 | | << doris::memory_orphan_check_msg; \ |
441 | | tracker->transfer_to( \ |
442 | | size, doris::thread_context()->thread_mem_tracker_mgr->limiter_mem_tracker()); \ |
443 | | } while (0) |
444 | | |
445 | | // Mem Hook to consume thread mem tracker |
446 | | #define CONSUME_THREAD_MEM_TRACKER_BY_HOOK(size) \ |
447 | | do { \ |
448 | | if (doris::use_mem_hook) { \ |
449 | | doris::thread_context()->thread_mem_tracker_mgr->consume(size); \ |
450 | | } \ |
451 | | } while (0) |
452 | | #define RELEASE_THREAD_MEM_TRACKER_BY_HOOK(size) CONSUME_THREAD_MEM_TRACKER_BY_HOOK(-size) |
453 | | #define CONSUME_THREAD_MEM_TRACKER_BY_HOOK_WITH_FN(size_fn, ...) \ |
454 | | do { \ |
455 | | if (doris::use_mem_hook) { \ |
456 | | doris::thread_context()->thread_mem_tracker_mgr->consume(size_fn(__VA_ARGS__)); \ |
457 | | } \ |
458 | | } while (0) |
459 | | #define RELEASE_THREAD_MEM_TRACKER_BY_HOOK_WITH_FN(size_fn, ...) \ |
460 | | do { \ |
461 | | if (doris::use_mem_hook) { \ |
462 | | doris::thread_context()->thread_mem_tracker_mgr->consume(-size_fn(__VA_ARGS__)); \ |
463 | | } \ |
464 | | } while (0) |
465 | | |
466 | | // if use mem hook, avoid repeated consume. |
467 | | // must call create_thread_local_if_not_exits() before use thread_context(). |
468 | | #define CONSUME_THREAD_MEM_TRACKER(size) \ |
469 | | do { \ |
470 | | if (size == 0 || doris::use_mem_hook) { \ |
471 | | break; \ |
472 | | } \ |
473 | | if (doris::pthread_context_ptr_init) { \ |
474 | | DCHECK(bthread_self() == 0); \ |
475 | | doris::thread_context_ptr->thread_mem_tracker_mgr->consume(size); \ |
476 | | } else if (bthread_self() != 0) { \ |
477 | | auto* bthread_context = \ |
478 | | static_cast<doris::ThreadContext*>(bthread_getspecific(doris::btls_key)); \ |
479 | | DCHECK(bthread_context != nullptr); \ |
480 | | if (bthread_context != nullptr) { \ |
481 | | bthread_context->thread_mem_tracker_mgr->consume(size); \ |
482 | | } else { \ |
483 | | doris::ExecEnv::GetInstance()->orphan_mem_tracker()->consume_no_update_peak(size); \ |
484 | | } \ |
485 | | } else if (doris::ExecEnv::ready()) { \ |
486 | | DCHECK(doris::k_doris_exit || !doris::config::enable_memory_orphan_check) \ |
487 | | << doris::MEMORY_ORPHAN_CHECK_MSG; \ |
488 | | doris::ExecEnv::GetInstance()->orphan_mem_tracker()->consume_no_update_peak(size); \ |
489 | | } \ |
490 | | } while (0) |
491 | | #define RELEASE_THREAD_MEM_TRACKER(size) CONSUME_THREAD_MEM_TRACKER(-size) |
492 | | |
493 | | #else |
494 | | #define THREAD_MEM_TRACKER_TRANSFER_TO(size, tracker) (void)0 |
495 | | #define THREAD_MEM_TRACKER_TRANSFER_FROM(size, tracker) (void)0 |
496 | | #define CONSUME_THREAD_MEM_TRACKER_BY_HOOK(size) (void)0 |
497 | | #define RELEASE_THREAD_MEM_TRACKER_BY_HOOK(size) (void)0 |
498 | | #define CONSUME_THREAD_MEM_TRACKER_BY_HOOK_WITH_FN(size_fn, ...) (void)0 |
499 | | #define RELEASE_THREAD_MEM_TRACKER_BY_HOOK_WITH_FN(size_fn, ...) (void)0 |
500 | 619k | #define CONSUME_THREAD_MEM_TRACKER(size) (void)0 |
501 | 553k | #define RELEASE_THREAD_MEM_TRACKER(size) (void)0 |
502 | | #endif |
503 | | } // namespace doris |