MCPcopy Create free account
hub / github.com/apache/thrift / _record_backtrace

Function _record_backtrace

lib/cpp/src/thrift/VirtualProfiling.cpp:253–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251Mutex generic_calls_mutex;
252
253void _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.

Callers 2

profile_virtual_callFunction · 0.85
profile_generic_protocolFunction · 0.85

Calls 3

findMethod · 0.80
makePersistentMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected