RFR: 8152341 - JVMCI test task: Unit tests for MemoryAccessProvider

Paul Sandoz paul.sandoz at oracle.com
Wed May 11 19:27:17 UTC 2016


> On 11 May 2016, at 21:09, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> 
> Should you use jdk.internal.misc.Unsafe instead of sun.misc.Unsafe?
> 

Yes, see other tests that require the /test/lib library to

  import jdk.test.lib.Utils;

and then declare, say:

  private static final Unsafe UNSAFE = Utils.getUnsafe();

such as in:

  test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java

Since the data providers are only used from within the MemoryAccessProviderTest i recommend pulling them into MemoryAccessProviderTest unless the intention is that these should be accessible to other test classes at some point, or that is the agreed upon style for this area.

Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160511/a846c26d/signature.asc>


More information about the hotspot-compiler-dev mailing list