| 82 | volatile u64 NativeLockTracer::_total_duration; // for interval sampling |
| 83 | |
| 84 | void NativeLockTracer::initialize() { |
| 85 | CodeCache* lib = Profiler::instance()->findLibraryByAddress((void*)NativeLockTracer::initialize); |
| 86 | assert(lib); |
| 87 | |
| 88 | lib->mark( |
| 89 | [](const char* s) -> bool { |
| 90 | return strcmp(s, "pthread_mutex_lock_hook") == 0 |
| 91 | || strcmp(s, "pthread_rwlock_rdlock_hook") == 0 |
| 92 | || strcmp(s, "pthread_rwlock_wrlock_hook") == 0; |
| 93 | }, |
| 94 | MARK_ASYNC_PROFILER); |
| 95 | } |
| 96 | |
| 97 | void NativeLockTracer::patchLibraries() { |
| 98 | MutexLocker ml(_patch_lock); |
nothing calls this directly
no test coverage detected