RFR: 8189685: need PerfMemory class update and a volatile_static_field support in VMStructs [v3]
Chris Plummer
cjplummer at openjdk.org
Wed Aug 23 23:34:41 UTC 2023
On Wed, 23 Aug 2023 23:14:43 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> I can't convince myself that `volatile` is in the right place in `type volatile * dummy`. But `volatile * dummy` means that the pointer is volatile as opposed to the type being pointed to, which would match with the original macro name's use of `PTR_VOLATILE`.
>
> But in that case the use of the macro doesn't make much sense. Regardless of the field type, vmstructs doesn't deal with volatile pointers to fields. It deals with volatile fields (that can be pointers or scalar). I think if anything the macro has always been wrong and should contain `volatile type * dummy`. It probably never fails because it is taking a non-volatile type and assigning it to a volatile type, which always works if the types are otherwise the same.
Well of course that change blows up
invalid conversion from 'ClassLoaderData* volatile*' to 'volatile ClassLoaderData**'
There's something I'm not understanding here. I use to understand the volatile ordering syntax and how to read it properly, but that was long long ago.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15373#discussion_r1303638518
More information about the serviceability-dev
mailing list