Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/thread.cpp @ 8883:b9a918201d47
Merge with hsx25
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Sat, 06 Apr 2013 20:04:06 +0200 |
parents | b8f261ba79c6 24ef5fb05e0f |
children | 89e4d67fdd2a |
comparison
equal
deleted
inserted
replaced
8660:d47b52b0ff68 | 8883:b9a918201d47 |
---|---|
3424 | 3424 |
3425 // Any JVMTI raw monitors entered in onload will transition into | 3425 // Any JVMTI raw monitors entered in onload will transition into |
3426 // real raw monitor. VM is setup enough here for raw monitor enter. | 3426 // real raw monitor. VM is setup enough here for raw monitor enter. |
3427 JvmtiExport::transition_pending_onload_raw_monitors(); | 3427 JvmtiExport::transition_pending_onload_raw_monitors(); |
3428 | 3428 |
3429 if (VerifyBeforeGC && | |
3430 Universe::heap()->total_collections() >= VerifyGCStartAt) { | |
3431 Universe::heap()->prepare_for_verify(); | |
3432 Universe::verify(); // make sure we're starting with a clean slate | |
3433 } | |
3434 | |
3435 // Fully start NMT | 3429 // Fully start NMT |
3436 MemTracker::start(); | 3430 MemTracker::start(); |
3437 | 3431 |
3438 // Create the VMThread | 3432 // Create the VMThread |
3439 { TraceTime timer("Start VMThread", TraceStartupTime); | 3433 { TraceTime timer("Start VMThread", TraceStartupTime); |
3453 } | 3447 } |
3454 } | 3448 } |
3455 } | 3449 } |
3456 | 3450 |
3457 assert (Universe::is_fully_initialized(), "not initialized"); | 3451 assert (Universe::is_fully_initialized(), "not initialized"); |
3452 if (VerifyBeforeGC && VerifyGCStartAt == 0) { | |
3453 Universe::heap()->prepare_for_verify(); | |
3454 Universe::verify(); // make sure we're starting with a clean slate | |
3455 } | |
3456 | |
3458 EXCEPTION_MARK; | 3457 EXCEPTION_MARK; |
3459 | 3458 |
3460 // At this point, the Universe is initialized, but we have not executed | 3459 // At this point, the Universe is initialized, but we have not executed |
3461 // any byte code. Now is a good time (the only time) to dump out the | 3460 // any byte code. Now is a good time (the only time) to dump out the |
3462 // internal state of the JVM for sharing. | 3461 // internal state of the JVM for sharing. |
4062 | 4061 |
4063 jboolean Threads::is_supported_jni_version(jint version) { | 4062 jboolean Threads::is_supported_jni_version(jint version) { |
4064 if (version == JNI_VERSION_1_2) return JNI_TRUE; | 4063 if (version == JNI_VERSION_1_2) return JNI_TRUE; |
4065 if (version == JNI_VERSION_1_4) return JNI_TRUE; | 4064 if (version == JNI_VERSION_1_4) return JNI_TRUE; |
4066 if (version == JNI_VERSION_1_6) return JNI_TRUE; | 4065 if (version == JNI_VERSION_1_6) return JNI_TRUE; |
4066 if (version == JNI_VERSION_1_8) return JNI_TRUE; | |
4067 return JNI_FALSE; | 4067 return JNI_FALSE; |
4068 } | 4068 } |
4069 | 4069 |
4070 | 4070 |
4071 void Threads::add(JavaThread* p, bool force_daemon) { | 4071 void Threads::add(JavaThread* p, bool force_daemon) { |
4286 ALL_JAVA_THREADS(p) { | 4286 ALL_JAVA_THREADS(p) { |
4287 // first, see if owner is the address of a Java thread | 4287 // first, see if owner is the address of a Java thread |
4288 if (owner == (address)p) return p; | 4288 if (owner == (address)p) return p; |
4289 } | 4289 } |
4290 } | 4290 } |
4291 assert(UseHeavyMonitors == false, "Did not find owning Java thread with UseHeavyMonitors enabled"); | 4291 // Cannot assert on lack of success here since this function may be |
4292 // used by code that is trying to report useful problem information | |
4293 // like deadlock detection. | |
4292 if (UseHeavyMonitors) return NULL; | 4294 if (UseHeavyMonitors) return NULL; |
4293 | 4295 |
4294 // | 4296 // |
4295 // If we didn't find a matching Java thread and we didn't force use of | 4297 // If we didn't find a matching Java thread and we didn't force use of |
4296 // heavyweight monitors, then the owner is the stack address of the | 4298 // heavyweight monitors, then the owner is the stack address of the |
4304 the_owner = q; | 4306 the_owner = q; |
4305 break; | 4307 break; |
4306 } | 4308 } |
4307 } | 4309 } |
4308 } | 4310 } |
4309 assert(the_owner != NULL, "Did not find owning Java thread for lock word address"); | 4311 // cannot assert on lack of success here; see above comment |
4310 return the_owner; | 4312 return the_owner; |
4311 } | 4313 } |
4312 | 4314 |
4313 // Threads::print_on() is called at safepoint by VM_PrintThreads operation. | 4315 // Threads::print_on() is called at safepoint by VM_PrintThreads operation. |
4314 void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks) { | 4316 void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks) { |