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

Method VMInit

src/vmEntry.cpp:414–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414void JNICALL VM::VMInit(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) {
415 ready();
416 loadAllMethodIDs(jvmti, jni);
417
418 // Allow profiler server only at JVM startup
419 if (_global_args._server != NULL) {
420 if (JavaAPI::startHttpServer(jvmti, jni, _global_args._server)) {
421 Log::info("Profiler server started at %s", _global_args._server);
422 } else {
423 Log::error("Failed to start profiler server");
424 }
425 }
426
427 // Delayed start of profiler if agent has been loaded at VM bootstrap
428 if (!_global_args._preloaded) {
429 Error error = Profiler::instance()->run(_global_args);
430 if (error) {
431 Log::error("%s", error.message());
432 }
433 }
434}
435
436void JNICALL VM::VMDeath(jvmtiEnv* jvmti, JNIEnv* jni) {
437 _terminating = true;

Callers

nothing calls this directly

Calls 3

errorFunction · 0.85
messageMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected