| 33 | |
| 34 | private: |
| 35 | bool checkJvmLoaded() { |
| 36 | Profiler* profiler = Profiler::instance(); |
| 37 | profiler->updateSymbols(false); |
| 38 | |
| 39 | CodeCache* libjvm = profiler->findLibraryByName(OS::isLinux() ? "libjvm.so" : "libjvm.dylib"); |
| 40 | if (libjvm != NULL && libjvm->findSymbol("AsyncGetCallTrace") != NULL) { |
| 41 | VMStructs::init(libjvm); |
| 42 | if (CollectedHeap::created()) { // heap is already created => this is dynamic attach |
| 43 | JVMFlag* f = JVMFlag::find("EnableDynamicAgentLoading"); |
| 44 | if (f != NULL && f->isDefault()) { |
| 45 | f->setCmdline(); |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | return libjvm != NULL; |
| 51 | } |
| 52 | |
| 53 | void startProfiler(const char* command) { |
| 54 | Error error = _global_args.parse(command); |
nothing calls this directly
no test coverage detected