Skip to content
Permalink
Browse files
8287362: FieldAccessWatch testcase failed on AIX platform
Reviewed-by: mdoerr
Backport-of: 66340372d595aeb4b3dfd9169a8448f363097256
  • Loading branch information
Ichiroh Takiguchi committed May 30, 2022
1 parent de59d51 commit 27d4c1e53383250688c19f4fd6feaba759742816
Showing 2 changed files with 8 additions and 5 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@ Agent_OnLoad(JavaVM* vm,
void* reserved) {

jvmtiCapabilities capa;
jvmtiEventCallbacks cbs = {0};
jvmtiEventCallbacks cbs;

(*vm)->GetEnv(vm, (void**)&jvmti, JVMTI_VERSION_1_0);

@@ -110,6 +110,7 @@ Agent_OnLoad(JavaVM* vm,
capa.can_generate_single_step_events = 1;
(*jvmti)->AddCapabilities(jvmti, &capa);

memset(&cbs, 0, sizeof(cbs));
cbs.ClassPrepare = classprepare;
cbs.Breakpoint = breakpoint;
(*jvmti)->SetEventCallbacks(jvmti, &cbs, sizeof(cbs));
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -208,14 +208,15 @@ JNIEXPORT jint JNICALL
Agent_OnLoad(JavaVM *jvm, char *options, void *reserved)
{
jvmtiError err;
jvmtiCapabilities caps = {0};
jvmtiEventCallbacks callbacks = {0};
jvmtiCapabilities caps;
jvmtiEventCallbacks callbacks;
jint res = (*jvm)->GetEnv(jvm, (void **) &jvmti, JVMTI_VERSION_1_1);
if (res != JNI_OK || jvmti == NULL) {
reportError("GetEnv failed", res);
return JNI_ERR;
}

memset(&caps, 0, sizeof(caps));
caps.can_generate_field_modification_events = 1;
caps.can_generate_field_access_events = 1;
caps.can_tag_objects = 1;
@@ -225,6 +226,7 @@ Agent_OnLoad(JavaVM *jvm, char *options, void *reserved)
return JNI_ERR;
}

memset(&callbacks, 0, sizeof(callbacks));
callbacks.FieldModification = &onFieldModification;
callbacks.FieldAccess = &onFieldAccess;

1 comment on commit 27d4c1e

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 27d4c1e May 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.