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

Method UpdateAggregatedFromInstancesRecursive

be/src/util/runtime-profile.cc:562–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void AggregatedRuntimeProfile::UpdateAggregatedFromInstancesRecursive(
563 const TRuntimeProfileTree& src, int* node_idx, int start_idx,
564 bool add_default_counters) {
565 DCHECK_LT(*node_idx, src.nodes.size());
566 const TRuntimeProfileNode& node = src.nodes[*node_idx];
567 DCHECK(node.__isset.aggregated);
568
569 UpdateFromInstances(node, start_idx, pool_);
570
571 ++*node_idx;
572 {
573 lock_guard<SpinLock> l(children_lock_);
574 ChildVector::iterator insert_pos = children_.begin();
575 // Update children with matching names; create new ones if they don't match.
576 for (int i = 0; i < node.num_children; ++i) {
577 const TRuntimeProfileNode& tchild = src.nodes[*node_idx];
578 bool is_timed = add_default_counters && !UntimedProfileNode(tchild.name);
579 AggregatedRuntimeProfile* child =
580 dynamic_cast<AggregatedRuntimeProfile*>(AddOrCreateChild(
581 tchild.name, &insert_pos,
582 [this, tchild, is_timed]() {
583 AggregatedRuntimeProfile* child2 = Create(
584 pool_, tchild.name, num_input_profiles_, /*is_root=*/false, is_timed);
585 child2->metadata_ = tchild.node_metadata;
586 return child2;
587 },
588 tchild.indent));
589 DCHECK(child != nullptr);
590 child->UpdateAggregatedFromInstancesRecursive(src, node_idx, start_idx, is_timed);
591 }
592 }
593}
594
595void AggregatedRuntimeProfile::UpdateFromInstances(
596 const TRuntimeProfileNode& node, int start_idx, ObjectPool* pool) {

Callers

nothing calls this directly

Calls 4

UntimedProfileNodeFunction · 0.85
CreateClass · 0.85
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected