MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / checkJvmCapabilities

Method checkJvmCapabilities

src/profiler.cpp:805–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803}
804
805Error Profiler::checkJvmCapabilities() {
806 if (VM::loaded()) {
807 if (!VMStructs::hasJavaThreadId()) {
808 return Error("Could not find Thread ID field. Unsupported JVM?");
809 }
810
811 if (VMThread::key() < 0) {
812 return Error("Could not find VMThread bridge. Unsupported JVM?");
813 }
814
815 if (_dlopen_entry == NULL) {
816 CodeCache* lib = findJvmLibrary("libj9prt");
817 if (lib == NULL || (_dlopen_entry = lib->findImport(im_dlopen)) == NULL) {
818 return Error("Could not set dlopen hook. Unsupported JVM?");
819 }
820 }
821
822 if (!VMStructs::libjvm()->hasDebugSymbols()) {
823 Log::warn("Install JVM debug symbols to improve profile accuracy");
824 }
825 }
826
827 return Error::OK;
828}
829
830Error Profiler::start(Arguments& args, bool reset) {
831 MutexLocker ml(_state_lock);

Callers

nothing calls this directly

Calls 3

ErrorClass · 0.85
findImportMethod · 0.80
hasDebugSymbolsMethod · 0.80

Tested by

no test coverage detected