Home
last modified time | relevance | path

Searched refs:unsafe (Results 1 – 9 of 9) sorted by relevance

/art/test/004-UnsafeTest/src/
DMain.java65 Unsafe unsafe = getUnsafe(); in main() local
67 testArrayBaseOffset(unsafe); in main()
68 testArrayIndexScale(unsafe); in main()
69 testGetAndPutAndCAS(unsafe); in main()
70 testGetAndPutVolatile(unsafe); in main()
71 testCopyMemoryPrimitiveArrays(unsafe); in main()
74 private static void testArrayBaseOffset(Unsafe unsafe) { in testArrayBaseOffset() argument
75 check(unsafe.arrayBaseOffset(boolean[].class), vmArrayBaseOffset(boolean[].class), in testArrayBaseOffset()
77 check(unsafe.arrayBaseOffset(byte[].class), vmArrayBaseOffset(byte[].class), in testArrayBaseOffset()
79 check(unsafe.arrayBaseOffset(char[].class), vmArrayBaseOffset(char[].class), in testArrayBaseOffset()
[all …]
/art/test/555-UnsafeGetLong-regression/src/
DMain.java36 Unsafe unsafe = getUnsafe(); in main() local
38 testUnsafeGetLong(unsafe); in main()
41 public static void testUnsafeGetLong(Unsafe unsafe) throws Exception { in testUnsafeGetLong() argument
44 long lvar = unsafe.objectFieldOffset(longField); in testUnsafeGetLong()
45 lvar = unsafe.getLong(test, lvar); in testUnsafeGetLong()
/art/test/004-checker-UnsafeTest18/src/
DMain.java30 private static final Unsafe unsafe = getUnsafe(); field in Main
54 return unsafe.getAndSetInt(o, offset, newValue); in set32()
61 return unsafe.getAndSetLong(o, offset, newValue); in set64()
68 return unsafe.getAndSetObject(o, offset, newValue); in setObj()
79 return unsafe.getAndAddInt(o, offset, delta); in add32()
86 return unsafe.getAndAddLong(o, offset, delta); in add64()
102 unsafe.loadFence(); in load()
114 unsafe.storeFence(); in store()
126 unsafe.fullFence(); in full()
171 intOffset = unsafe.objectFieldOffset(intField); in main()
[all …]
/art/test/528-long-hint/src/
DMain.java27 Unsafe unsafe = getUnsafe(); in main() local
29 long offset = unsafe.objectFieldOffset(Main.class.getDeclaredField("instanceField")); in main()
36 unsafe.compareAndSwapLong(f, offset, a, b); in main()
/art/test/160-read-barrier-stress/src/
DMain.java182 Unsafe unsafe = getUnsafe(); in testUnsafeGet() local
184 unsafe.objectFieldOffset(ManyFields.class.getField("testField0000")); in testUnsafeGet()
186 unsafe.objectFieldOffset(ManyFields.class.getField("testField0001")); in testUnsafeGet()
188 unsafe.objectFieldOffset(ManyFields.class.getField("testField1024")); in testUnsafeGet()
190 unsafe.objectFieldOffset(ManyFields.class.getField("testField4444")); in testUnsafeGet()
192 unsafe.objectFieldOffset(ManyFields.class.getField("testField4998")); in testUnsafeGet()
194 unsafe.objectFieldOffset(ManyFields.class.getField("testField4999")); in testUnsafeGet()
203 assertSameObject(f0000, unsafe.getObject(mf, f0000Offset)); in testUnsafeGet()
204 assertDifferentObject(f0000, unsafe.getObject(mf, f0001Offset)); in testUnsafeGet()
205 assertSameObject(f1024, unsafe.getObject(mf, f1024Offset)); in testUnsafeGet()
[all …]
/art/test/518-null-array-get/
Dinfo.txt1 Codifies that the verifier should reject type-unsafe
/art/runtime/native/
Dsun_misc_Unsafe.cc308 static void Unsafe_copyMemory(JNIEnv *env, jobject unsafe ATTRIBUTE_UNUSED, jlong src, in Unsafe_copyMemory()
351 jobject unsafe ATTRIBUTE_UNUSED, in Unsafe_copyMemoryToPrimitiveArray()
386 jobject unsafe ATTRIBUTE_UNUSED, in Unsafe_copyMemoryFromPrimitiveArray()
/art/compiler/jni/
Djni_compiler_test.cc1280 jboolean my_casi(JNIEnv* env, jobject unsafe, jobject obj, jlong offset, jint expected, jint newval… in JNI_TEST()
1281 EXPECT_TRUE(env->IsSameObject(JniCompilerTest::jobj_, unsafe)); in JNI_TEST()
/art/test/1980-obsolete-object-cleared/
Dexpected.txt5 Using unsafe to access values directly from memory.
12 Using unsafe to access obsolete values directly from memory.