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

Function Agent_OnLoad

src/vmEntry.cpp:474–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472
473
474extern "C" DLLEXPORT jint JNICALL
475Agent_OnLoad(JavaVM* vm, char* options, void* reserved) {
476 if (!_global_args._preloaded) {
477 Error error = _global_args.parse(options);
478
479 Log::open(_global_args);
480
481 if (error) {
482 Log::error("%s", error.message());
483 return ARGUMENTS_ERROR;
484 }
485 }
486
487 if (!VM::init(vm, false)) {
488 Log::error("JVM does not support Tool Interface");
489 return COMMAND_ERROR;
490 }
491
492 return 0;
493}
494
495extern "C" DLLEXPORT jint JNICALL
496Agent_OnAttach(JavaVM* vm, char* options, void* reserved) {

Callers

nothing calls this directly

Calls 3

errorFunction · 0.85
messageMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected