RFR: 8287362: FieldAccessWatch testcase failed on AIX platform [v2]
Ichiroh Takiguchi
itakiguchi at openjdk.java.net
Fri May 27 19:04:49 UTC 2022
On Fri, 27 May 2022 06:15:59 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8287362: FieldAccessWatch testcase failed on AIX platform
>
> Given 99.9% of the tests don't try to initialize "caps" but instead do the memset, I would suggest it is perfectly fine to delete the initializer and remove the comments related to AIX/xlclang.
>
> You may also need to check
> hotspot/jtreg/runtime/jni/FastGetField/libFastGetField.c
> hotspot/jtreg/compiler/jsr292/cr8026328/libTest8026328.c
> which have a similar usage for the callbacks structure.
Hello @dholmes-ora and @TheRealMDoerr .
I appreciate your suggestions.
I checked other files which were use `jvmtiEventCallbacks` structure initializer.
`jvmtiEventCallbacks` structure was initialized properly with AIX's xlclang compiler.
It seems only `jvmtiCapabilities` structure initializer does not work as expected with xlclang.
I tried to create small testcase for this issue.
According to `jvmti.h`, `jvmtiCapabilities` structure likes:
typedef struct {
unsigned int can_tag_objects : 1;
unsigned int can_generate_field_modification_events : 1;
unsigned int can_generate_field_access_events : 1;
unsigned int can_get_bytecodes : 1;
......
unsigned int can_generate_sampled_object_alloc_events : 1;
unsigned int can_support_virtual_threads : 1;
unsigned int : 3;
unsigned int : 16;
unsigned int : 16;
unsigned int : 16;
unsigned int : 16;
unsigned int : 16;
} jvmtiCapabilities;
This structure can handle bits and it has padding data without variable name.
It seems xlclang initializes only variable name is available by initializer.
So last part is not initialized.
If I put dummy variable name into above structure, all bytes are initialized properly.
I checked other source files which used `jvmtiCapabilities` structure, they used `memset()` instead of initializer.
I removed `jvmtiCapabilities` and `jvmtiEventCallbacks` initializer and add `memset()`
-------------
PR: https://git.openjdk.java.net/jdk/pull/8904
More information about the serviceability-dev
mailing list