| 251 | Mutex generic_calls_mutex; |
| 252 | |
| 253 | void _record_backtrace(BacktraceMap* map, const Mutex& mutex, Key* k) { |
| 254 | Guard guard(mutex); |
| 255 | |
| 256 | BacktraceMap::iterator it = map->find(*k); |
| 257 | if (it == map->end()) { |
| 258 | k->makePersistent(); |
| 259 | map->insert(std::make_pair(*k, 1)); |
| 260 | } else { |
| 261 | // increment the count |
| 262 | // NOTE: we could assert if it->second is 0 afterwards, since that would |
| 263 | // mean we've wrapped. |
| 264 | ++(it->second); |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * Record an unnecessary virtual function call. |
no test coverage detected