comparison src/share/vm/prims/unsafe.cpp @ 4006:436b4a3231bf

7098194: integrate macosx-port changes Summary: Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29. Reviewed-by: kvn, dholmes, never, phh Contributed-by: Christos Zoulas <christos@zoulas.com>, Greg Lewis <glewis@eyesbeyond.com>, Kurt Miller <kurt@intricatesoftware.com>, Alexander Strange <astrange@apple.com>, Mike Swingler <swingler@apple.com>, Roger Hoover <rhoover@apple.com>, Victor Hernandez <vhernandez@apple.com>, Pratik Solanki <psolanki@apple.com>
author dcubed
date Thu, 13 Oct 2011 09:35:42 -0700
parents e6b1331a51d2
children 12d38ffcba2a
comparison
equal deleted inserted replaced
4005:2ef3386478e6 4006:436b4a3231bf
40 40
41 /* 41 /*
42 * Implementation of class sun.misc.Unsafe 42 * Implementation of class sun.misc.Unsafe
43 */ 43 */
44 44
45 #ifndef USDT2
45 HS_DTRACE_PROBE_DECL3(hotspot, thread__park__begin, uintptr_t, int, long long); 46 HS_DTRACE_PROBE_DECL3(hotspot, thread__park__begin, uintptr_t, int, long long);
46 HS_DTRACE_PROBE_DECL1(hotspot, thread__park__end, uintptr_t); 47 HS_DTRACE_PROBE_DECL1(hotspot, thread__park__end, uintptr_t);
47 HS_DTRACE_PROBE_DECL1(hotspot, thread__unpark, uintptr_t); 48 HS_DTRACE_PROBE_DECL1(hotspot, thread__unpark, uintptr_t);
49 #endif /* !USDT2 */
48 50
49 #define MAX_OBJECT_SIZE \ 51 #define MAX_OBJECT_SIZE \
50 ( arrayOopDesc::header_size(T_DOUBLE) * HeapWordSize \ 52 ( arrayOopDesc::header_size(T_DOUBLE) * HeapWordSize \
51 + ((julong)max_jint * sizeof(double)) ) 53 + ((julong)max_jint * sizeof(double)) )
52 54
1185 } 1187 }
1186 UNSAFE_END 1188 UNSAFE_END
1187 1189
1188 UNSAFE_ENTRY(void, Unsafe_Park(JNIEnv *env, jobject unsafe, jboolean isAbsolute, jlong time)) 1190 UNSAFE_ENTRY(void, Unsafe_Park(JNIEnv *env, jobject unsafe, jboolean isAbsolute, jlong time))
1189 UnsafeWrapper("Unsafe_Park"); 1191 UnsafeWrapper("Unsafe_Park");
1192 #ifndef USDT2
1190 HS_DTRACE_PROBE3(hotspot, thread__park__begin, thread->parker(), (int) isAbsolute, time); 1193 HS_DTRACE_PROBE3(hotspot, thread__park__begin, thread->parker(), (int) isAbsolute, time);
1194 #else /* USDT2 */
1195 HOTSPOT_THREAD_PARK_BEGIN(
1196 (uintptr_t) thread->parker(), (int) isAbsolute, time);
1197 #endif /* USDT2 */
1191 JavaThreadParkedState jtps(thread, time != 0); 1198 JavaThreadParkedState jtps(thread, time != 0);
1192 thread->parker()->park(isAbsolute != 0, time); 1199 thread->parker()->park(isAbsolute != 0, time);
1200 #ifndef USDT2
1193 HS_DTRACE_PROBE1(hotspot, thread__park__end, thread->parker()); 1201 HS_DTRACE_PROBE1(hotspot, thread__park__end, thread->parker());
1202 #else /* USDT2 */
1203 HOTSPOT_THREAD_PARK_END(
1204 (uintptr_t) thread->parker());
1205 #endif /* USDT2 */
1194 UNSAFE_END 1206 UNSAFE_END
1195 1207
1196 UNSAFE_ENTRY(void, Unsafe_Unpark(JNIEnv *env, jobject unsafe, jobject jthread)) 1208 UNSAFE_ENTRY(void, Unsafe_Unpark(JNIEnv *env, jobject unsafe, jobject jthread))
1197 UnsafeWrapper("Unsafe_Unpark"); 1209 UnsafeWrapper("Unsafe_Unpark");
1198 Parker* p = NULL; 1210 Parker* p = NULL;
1220 } 1232 }
1221 } 1233 }
1222 } 1234 }
1223 } 1235 }
1224 if (p != NULL) { 1236 if (p != NULL) {
1237 #ifndef USDT2
1225 HS_DTRACE_PROBE1(hotspot, thread__unpark, p); 1238 HS_DTRACE_PROBE1(hotspot, thread__unpark, p);
1239 #else /* USDT2 */
1240 HOTSPOT_THREAD_UNPARK(
1241 (uintptr_t) p);
1242 #endif /* USDT2 */
1226 p->unpark(); 1243 p->unpark();
1227 } 1244 }
1228 UNSAFE_END 1245 UNSAFE_END
1229 1246
1230 UNSAFE_ENTRY(jint, Unsafe_Loadavg(JNIEnv *env, jobject unsafe, jdoubleArray loadavg, jint nelem)) 1247 UNSAFE_ENTRY(jint, Unsafe_Loadavg(JNIEnv *env, jobject unsafe, jdoubleArray loadavg, jint nelem))