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

Method checkJvmLoaded

src/zInit.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 5

updateSymbolsMethod · 0.80
findLibraryByNameMethod · 0.80
findSymbolMethod · 0.80
isDefaultMethod · 0.80
setCmdlineMethod · 0.80

Tested by

no test coverage detected