[feature-wip] (memory tracker) (step4) Switch TLS mem tracker to separate more detailed memory usage (#8669)
Based on #8605, Separate out the memory usage of each operator from the Query/Load/StorageEngine mem tracker.
This commit is contained in:
@ -67,6 +67,7 @@ Status UnionNode::init(const TPlanNode& tnode, RuntimeState* state) {
|
||||
Status UnionNode::prepare(RuntimeState* state) {
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
RETURN_IF_ERROR(ExecNode::prepare(state));
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_MEM_TRACKER(mem_tracker());
|
||||
_tuple_desc = state->desc_tbl().get_tuple_descriptor(_tuple_id);
|
||||
DCHECK(_tuple_desc != nullptr);
|
||||
_materialize_exprs_evaluate_timer =
|
||||
@ -93,6 +94,7 @@ Status UnionNode::prepare(RuntimeState* state) {
|
||||
|
||||
Status UnionNode::open(RuntimeState* state) {
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_MEM_TRACKER(mem_tracker());
|
||||
RETURN_IF_ERROR(ExecNode::open(state));
|
||||
// open const expr lists.
|
||||
for (const std::vector<ExprContext*>& exprs : _const_expr_lists) {
|
||||
@ -231,6 +233,7 @@ Status UnionNode::get_next_const(RuntimeState* state, RowBatch* row_batch) {
|
||||
|
||||
Status UnionNode::get_next(RuntimeState* state, RowBatch* row_batch, bool* eos) {
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_EXISTED_MEM_TRACKER(mem_tracker());
|
||||
RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::GETNEXT));
|
||||
RETURN_IF_CANCELLED(state);
|
||||
// TODO(zc)
|
||||
|
||||
Reference in New Issue
Block a user