| 605 | } |
| 606 | |
| 607 | std::vector<CodeNode*> TFCode::Account(const std::vector<CodeNode*>& roots, |
| 608 | const Options& opts) { |
| 609 | std::vector<CodeNode*> act_nodes; |
| 610 | |
| 611 | for (CodeNode* node : roots) { |
| 612 | node->ResetTotalStats(); |
| 613 | std::vector<CodeNode*> act_cnodes = Account(node->children, opts); |
| 614 | node->account = ReAccount(node, opts); |
| 615 | if (node->account || !act_cnodes.empty()) { |
| 616 | node->show_children.clear(); |
| 617 | node->ResetTotalStats(); |
| 618 | node->AddSelfToTotalStats(); |
| 619 | for (CodeNode* c : act_cnodes) { |
| 620 | node->AggregateTotalStats(c); |
| 621 | node->show_children.push_back(c); |
| 622 | } |
| 623 | act_nodes.push_back(node); |
| 624 | } |
| 625 | } |
| 626 | return act_nodes; |
| 627 | } |
| 628 | |
| 629 | string TFCode::FormatNodeMemory(CodeNode* node, int64 bytes, |
| 630 | int64 total_bytes) const { |
nothing calls this directly
no test coverage detected