Increases/Decreases the consumption of this tracker and the ancestors up to (but not including) end_tracker.
| 426 | /// Increases/Decreases the consumption of this tracker and the ancestors up to (but |
| 427 | /// not including) end_tracker. |
| 428 | void ChangeConsumption(int64_t bytes, MemTracker* end_tracker) { |
| 429 | DCHECK(!closed_) << label_; |
| 430 | DCHECK(consumption_metric_ == nullptr) << "Should not be called on root."; |
| 431 | for (MemTracker* tracker : all_trackers_) { |
| 432 | if (tracker == end_tracker) return; |
| 433 | DCHECK(!tracker->has_limit()); |
| 434 | DCHECK(!tracker->closed_) << tracker->label_; |
| 435 | tracker->consumption_->Add(bytes); |
| 436 | } |
| 437 | DCHECK(false) << "end_tracker is not an ancestor"; |
| 438 | } |
| 439 | |
| 440 | /// Update the following fields in pool_stats. |
| 441 | /// min_memory_consumed: take the min of min_memory_consumed and mem_consumed |