Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/thread.cpp @ 14309:63a4eb8bcd23
8025856: Fix typos in the GC code
Summary: Fix about 440 typos in comments in the VM code
Reviewed-by: mgerdin, tschatzl, coleenp, kmo, jcoomes
author | jwilhelm |
---|---|
date | Thu, 23 Jan 2014 14:47:23 +0100 |
parents | dbcb1dd0785b |
children | 2c95095271e9 |
comparison
equal
deleted
inserted
replaced
14308:870aedf4ba4f | 14309:63a4eb8bcd23 |
---|---|
765 | 765 |
766 #ifndef PRODUCT | 766 #ifndef PRODUCT |
767 void JavaThread::record_jump(address target, address instr, const char* file, int line) { | 767 void JavaThread::record_jump(address target, address instr, const char* file, int line) { |
768 | 768 |
769 // This should not need to be atomic as the only way for simultaneous | 769 // This should not need to be atomic as the only way for simultaneous |
770 // updates is via interrupts. Even then this should be rare or non-existant | 770 // updates is via interrupts. Even then this should be rare or non-existent |
771 // and we don't care that much anyway. | 771 // and we don't care that much anyway. |
772 | 772 |
773 int index = _jmp_ring_index; | 773 int index = _jmp_ring_index; |
774 _jmp_ring_index = (index + 1 ) & (jump_ring_buffer_size - 1); | 774 _jmp_ring_index = (index + 1 ) & (jump_ring_buffer_size - 1); |
775 _jmp_ring[index]._target = (intptr_t) target; | 775 _jmp_ring[index]._target = (intptr_t) target; |
923 // This could potentially lead to deadlocks | 923 // This could potentially lead to deadlocks |
924 for(Monitor *cur = _owned_locks; cur; cur = cur->next()) { | 924 for(Monitor *cur = _owned_locks; cur; cur = cur->next()) { |
925 // Threads_lock is special, since the safepoint synchronization will not start before this is | 925 // Threads_lock is special, since the safepoint synchronization will not start before this is |
926 // acquired. Hence, a JavaThread cannot be holding it at a safepoint. So is VMOperationRequest_lock, | 926 // acquired. Hence, a JavaThread cannot be holding it at a safepoint. So is VMOperationRequest_lock, |
927 // since it is used to transfer control between JavaThreads and the VMThread | 927 // since it is used to transfer control between JavaThreads and the VMThread |
928 // Do not *exclude* any locks unless you are absolutly sure it is correct. Ask someone else first! | 928 // Do not *exclude* any locks unless you are absolutely sure it is correct. Ask someone else first! |
929 if ( (cur->allow_vm_block() && | 929 if ( (cur->allow_vm_block() && |
930 cur != Threads_lock && | 930 cur != Threads_lock && |
931 cur != Compile_lock && // Temporary: should not be necessary when we get spearate compilation | 931 cur != Compile_lock && // Temporary: should not be necessary when we get separate compilation |
932 cur != VMOperationRequest_lock && | 932 cur != VMOperationRequest_lock && |
933 cur != VMOperationQueue_lock) || | 933 cur != VMOperationQueue_lock) || |
934 cur->rank() == Mutex::special) { | 934 cur->rank() == Mutex::special) { |
935 warning("Thread holding lock at safepoint that vm can block on: %s", cur->name()); | 935 warning("Thread holding lock at safepoint that vm can block on: %s", cur->name()); |
936 } | 936 } |
1269 // if we didn't have any tasks we could have waited for a long time | 1269 // if we didn't have any tasks we could have waited for a long time |
1270 // consider the time_slept zero and reset time_before_loop | 1270 // consider the time_slept zero and reset time_before_loop |
1271 time_slept = 0; | 1271 time_slept = 0; |
1272 time_before_loop = now; | 1272 time_before_loop = now; |
1273 } else { | 1273 } else { |
1274 // need to recalulate since we might have new tasks in _tasks | 1274 // need to recalculate since we might have new tasks in _tasks |
1275 time_slept = (int) ((now - time_before_loop) / 1000000); | 1275 time_slept = (int) ((now - time_before_loop) / 1000000); |
1276 } | 1276 } |
1277 | 1277 |
1278 // Change to task list or spurious wakeup of some kind | 1278 // Change to task list or spurious wakeup of some kind |
1279 if (timedout || _should_terminate) { | 1279 if (timedout || _should_terminate) { |
1636 // The first routine called by a new Java thread | 1636 // The first routine called by a new Java thread |
1637 void JavaThread::run() { | 1637 void JavaThread::run() { |
1638 // initialize thread-local alloc buffer related fields | 1638 // initialize thread-local alloc buffer related fields |
1639 this->initialize_tlab(); | 1639 this->initialize_tlab(); |
1640 | 1640 |
1641 // used to test validitity of stack trace backs | 1641 // used to test validity of stack trace backs |
1642 this->record_base_of_stack_pointer(); | 1642 this->record_base_of_stack_pointer(); |
1643 | 1643 |
1644 // Record real stack base and size. | 1644 // Record real stack base and size. |
1645 this->record_stack_base_and_size(); | 1645 this->record_stack_base_and_size(); |
1646 | 1646 |
3318 os::init(); | 3318 os::init(); |
3319 | 3319 |
3320 // Initialize system properties. | 3320 // Initialize system properties. |
3321 Arguments::init_system_properties(); | 3321 Arguments::init_system_properties(); |
3322 | 3322 |
3323 // So that JDK version can be used as a discrimintor when parsing arguments | 3323 // So that JDK version can be used as a discriminator when parsing arguments |
3324 JDK_Version_init(); | 3324 JDK_Version_init(); |
3325 | 3325 |
3326 // Update/Initialize System properties after JDK version number is known | 3326 // Update/Initialize System properties after JDK version number is known |
3327 Arguments::init_version_specific_system_properties(); | 3327 Arguments::init_version_specific_system_properties(); |
3328 | 3328 |
3357 if (os_init_2_result != JNI_OK) return os_init_2_result; | 3357 if (os_init_2_result != JNI_OK) return os_init_2_result; |
3358 | 3358 |
3359 jint adjust_after_os_result = Arguments::adjust_after_os(); | 3359 jint adjust_after_os_result = Arguments::adjust_after_os(); |
3360 if (adjust_after_os_result != JNI_OK) return adjust_after_os_result; | 3360 if (adjust_after_os_result != JNI_OK) return adjust_after_os_result; |
3361 | 3361 |
3362 // intialize TLS | 3362 // initialize TLS |
3363 ThreadLocalStorage::init(); | 3363 ThreadLocalStorage::init(); |
3364 | 3364 |
3365 // Bootstrap native memory tracking, so it can start recording memory | 3365 // Bootstrap native memory tracking, so it can start recording memory |
3366 // activities before worker thread is started. This is the first phase | 3366 // activities before worker thread is started. This is the first phase |
3367 // of bootstrapping, VM is currently running in single-thread mode. | 3367 // of bootstrapping, VM is currently running in single-thread mode. |
4154 | 4154 |
4155 // Operations on the Threads list for GC. These are not explicitly locked, | 4155 // Operations on the Threads list for GC. These are not explicitly locked, |
4156 // but the garbage collector must provide a safe context for them to run. | 4156 // but the garbage collector must provide a safe context for them to run. |
4157 // In particular, these things should never be called when the Threads_lock | 4157 // In particular, these things should never be called when the Threads_lock |
4158 // is held by some other thread. (Note: the Safepoint abstraction also | 4158 // is held by some other thread. (Note: the Safepoint abstraction also |
4159 // uses the Threads_lock to gurantee this property. It also makes sure that | 4159 // uses the Threads_lock to guarantee this property. It also makes sure that |
4160 // all threads gets blocked when exiting or starting). | 4160 // all threads gets blocked when exiting or starting). |
4161 | 4161 |
4162 void Threads::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { | 4162 void Threads::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf) { |
4163 ALL_JAVA_THREADS(p) { | 4163 ALL_JAVA_THREADS(p) { |
4164 p->oops_do(f, cld_f, cf); | 4164 p->oops_do(f, cld_f, cf); |