We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8dcc2eb + e64161d commit fa4e82aCopy full SHA for fa4e82a
src/c/perf-map-agent.c
@@ -337,6 +337,21 @@ jvmtiError set_callbacks(jvmtiEnv *jvmti) {
337
return (*jvmti)->SetEventCallbacks(jvmti, &callbacks, (jint)sizeof(callbacks));
338
}
339
340
+JNIEXPORT jint JNICALL
341
+Agent_OnLoad(JavaVM *vm, char *options, void *reserved)
342
+{
343
+ open_map_file();
344
+
345
+ jvmtiEnv *jvmti;
346
+ (*vm)->GetEnv(vm, (void **)&jvmti, JVMTI_VERSION_1);
347
+ enable_capabilities(jvmti);
348
+ set_callbacks(jvmti);
349
+ set_notification_mode(jvmti, JVMTI_ENABLE);
350
351
+ return 0;
352
+}
353
354
355
JNIEXPORT jint JNICALL
356
Agent_OnAttach(JavaVM *vm, char *options, void *reserved) {
357
open_map_file();
0 commit comments