[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:
@ -23,7 +23,6 @@
|
||||
#include "runtime/raw_value.h"
|
||||
#include "runtime/row_batch.h"
|
||||
#include "runtime/runtime_state.h"
|
||||
#include "runtime/thread_context.h"
|
||||
|
||||
namespace doris {
|
||||
SetOperationNode::SetOperationNode(ObjectPool* pool, const TPlanNode& tnode,
|
||||
@ -41,13 +40,14 @@ Status SetOperationNode::init(const TPlanNode& tnode, RuntimeState* state) {
|
||||
}
|
||||
|
||||
Status SetOperationNode::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);
|
||||
_build_pool.reset(new MemPool(mem_tracker().get()));
|
||||
_build_timer = ADD_TIMER(runtime_profile(), "BuildTime");
|
||||
_probe_timer = ADD_TIMER(runtime_profile(), "ProbeTime");
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
for (size_t i = 0; i < _child_expr_lists.size(); ++i) {
|
||||
RETURN_IF_ERROR(Expr::prepare(_child_expr_lists[i], state, child(i)->row_desc(),
|
||||
expr_mem_tracker()));
|
||||
@ -138,8 +138,9 @@ bool SetOperationNode::equals(TupleRow* row, TupleRow* other) {
|
||||
Status SetOperationNode::open(RuntimeState* state) {
|
||||
RETURN_IF_ERROR(ExecNode::open(state));
|
||||
RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::OPEN));
|
||||
SCOPED_SWITCH_THREAD_LOCAL_MEM_TRACKER_ERR_CB("SetOperation, while constructing the hash table.");
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_MEM_TRACKER(mem_tracker());
|
||||
SCOPED_SWITCH_THREAD_LOCAL_MEM_TRACKER_ERR_CB("SetOperation, while constructing the hash table.");
|
||||
RETURN_IF_CANCELLED(state);
|
||||
// open result expr lists.
|
||||
for (const std::vector<ExprContext*>& exprs : _child_expr_lists) {
|
||||
|
||||
Reference in New Issue
Block a user