| 242 | } |
| 243 | |
| 244 | void RuntimeProfileBase::UpdateChildCountersLocked(const unique_lock<SpinLock>& lock, |
| 245 | const ChildCounterMap& src) { |
| 246 | DCHECK(lock.mutex() == &counter_map_lock_ && lock.owns_lock()); |
| 247 | // Merge all new parent->child edges into the map. This assumes that all 'src' maps |
| 248 | // provided are consistent, i.e. one child does not have multiple parents. |
| 249 | ChildCounterMap::const_iterator child_counter_src_itr; |
| 250 | for (const auto& entry : src) { |
| 251 | set<string>* child_counters = |
| 252 | FindOrInsert(&child_counter_map_, entry.first, set<string>()); |
| 253 | child_counters->insert(entry.second.begin(), entry.second.end()); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | RuntimeProfile* RuntimeProfile::Create( |
| 258 | ObjectPool* pool, const string& name, bool add_default_counters) { |