Mercurial > hg > truffle
comparison src/share/vm/runtime/thread.cpp @ 1410:b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Some memos:
- the result is not stored in a jobject, but in an oop! => (oop)get_as_jobject()
- we get problems with locks hold by the user program when disabling background compilation => currently this makes an assert, we need a better solution
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Wed, 12 May 2010 16:29:41 +0200 |
parents | 3b3d12e645e7 |
children | 7cf1952ec5fb |
comparison
equal
deleted
inserted
replaced
1407:09e7826ecf01 | 1410:b30a2cd5e3a2 |
---|---|
1851 assert(Threads_lock->is_locked(), "Threads_lock should be locked by safepoint code"); | 1851 assert(Threads_lock->is_locked(), "Threads_lock should be locked by safepoint code"); |
1852 assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped"); | 1852 assert(SafepointSynchronize::is_at_safepoint(), "all threads are stopped"); |
1853 | 1853 |
1854 // Do not throw asynchronous exceptions against the compiler thread | 1854 // Do not throw asynchronous exceptions against the compiler thread |
1855 // (the compiler thread should not be a Java thread -- fix in 1.4.2) | 1855 // (the compiler thread should not be a Java thread -- fix in 1.4.2) |
1856 if (is_Compiler_thread()) return; | 1856 |
1857 // (tw) May we do this? | |
1858 //if (is_Compiler_thread()) return; | |
1857 | 1859 |
1858 // This is a change from JDK 1.1, but JDK 1.2 will also do it: | 1860 // This is a change from JDK 1.1, but JDK 1.2 will also do it: |
1859 if (java_throwable->is_a(SystemDictionary::ThreadDeath_klass())) { | 1861 if (java_throwable->is_a(SystemDictionary::ThreadDeath_klass())) { |
1860 java_lang_Thread::set_stillborn(threadObj()); | 1862 java_lang_Thread::set_stillborn(threadObj()); |
1861 } | 1863 } |
3739 | 3741 |
3740 int i = 0; | 3742 int i = 0; |
3741 { | 3743 { |
3742 MutexLockerEx ml(doLock ? Threads_lock : NULL); | 3744 MutexLockerEx ml(doLock ? Threads_lock : NULL); |
3743 ALL_JAVA_THREADS(p) { | 3745 ALL_JAVA_THREADS(p) { |
3744 if (p->is_Compiler_thread()) continue; | 3746 |
3747 // (tw) May we do this? | |
3748 //if (p->is_Compiler_thread()) continue; | |
3745 | 3749 |
3746 address pending = (address)p->current_pending_monitor(); | 3750 address pending = (address)p->current_pending_monitor(); |
3747 if (pending == monitor) { // found a match | 3751 if (pending == monitor) { // found a match |
3748 if (i < count) result->append(p); // save the first count matches | 3752 if (i < count) result->append(p); // save the first count matches |
3749 i++; | 3753 i++; |