| 803 | } |
| 804 | |
| 805 | Error 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 | |
| 830 | Error Profiler::start(Arguments& args, bool reset) { |
| 831 | MutexLocker ml(_state_lock); |
nothing calls this directly
no test coverage detected