| 352 | } |
| 353 | |
| 354 | void AggregatedRuntimeProfile::UpdateAggregatedFromInstance( |
| 355 | RuntimeProfile* other, int idx, bool add_default_counters) { |
| 356 | { |
| 357 | lock_guard<SpinLock> l(input_profile_name_lock_); |
| 358 | DCHECK(!input_profile_names_.empty()) |
| 359 | << "Update() can only be called on root of averaged profile tree"; |
| 360 | input_profile_names_[idx] = other->name(); |
| 361 | } |
| 362 | |
| 363 | UpdateAggregatedFromInstanceRecursive(other, idx, add_default_counters); |
| 364 | |
| 365 | // Recursively compute times on the whole tree. |
| 366 | ComputeTimeInProfile(); |
| 367 | } |
| 368 | |
| 369 | void AggregatedRuntimeProfile::UpdateAggregatedFromInstanceRecursive( |
| 370 | RuntimeProfile* other, int idx, bool add_default_counters) { |