RFR: JDK-8205549 JDK-8205698 Support of flattened values in Unsafe
mandy chung
mandy.chung at oracle.com
Fri Jun 29 18:58:51 UTC 2018
On 6/29/18 9:23 AM, Paul Sandoz wrote:
> View nice!
>
> Comments for further iteration perhaps after committing:
>
> - You may want to follow the same pattern for getType as for
> fieldOffset i.e. use a static method rather than a virtual method.
I added static fieldValueType for Accessor and staticFieldValueType
for StaticAccessor that might help the performance (no data).
I am in two mind if I should prepare the static field case as
hotspot does not flatten static field. For now, I keep it there
and should revisit it at some point.
> - We can remove the atomic add and bitwise ops from
> ValueFieldInstanceReadWrite.
Good catch. I took that out.
> - The Unsafe atomic accessors ValueVolatile/Acquire/Release/Opaque
> can use a global lock for the moment to ensure atomicity and
> ordering, the acquire/release can defer to the volatile accessors.
> Adding the others is also straightforward (weaker CAS and CAE can
> defer to the volatile CAS/CAE methods).
>
> Happy to help with any of this with following patches.
Thanks. I wanted to look at volatile/acquire/release/opaque and
other ops separately and will definitely ask your help. So no lock
at the moment and hope it's okay.
Revised webrev:
http://cr.openjdk.java.net/~mchung/valhalla/webrevs/unsafe-flat-fields-webrev.01/
Mandy
More information about the valhalla-dev
mailing list