| 119 | } |
| 120 | |
| 121 | bool TFShow::ReAccount(ShowNode* node, const Options& opts) { |
| 122 | node->ReInit(opts.step); |
| 123 | if (opts.account_type_regexes.size() == 1 && |
| 124 | opts.account_type_regexes[0] == ".*") { |
| 125 | return true; |
| 126 | } |
| 127 | for (const string& regex : opts.account_type_regexes) { |
| 128 | for (const string& type : node->node->op_types()) { |
| 129 | if (RE2::FullMatch(type, regex)) { |
| 130 | return true; |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | return false; |
| 135 | } |
| 136 | |
| 137 | string TFShow::FormatNodeMemory(ShowNode* node, int64 bytes, |
| 138 | int64 total_bytes) const { |