Mercurial > hg > graal-compiler
comparison src/share/vm/oops/instanceKlass.cpp @ 997:46b819ba120b
Merge
author | jrose |
---|---|
date | Wed, 30 Sep 2009 13:25:39 -0700 |
parents | 74a5db69c1fe 54b3b351d6f9 |
children | 987e948ebbc8 |
comparison
equal
deleted
inserted
replaced
981:1af62b6ca0f9 | 997:46b819ba120b |
---|---|
2150 // only one compilation can be active | 2150 // only one compilation can be active |
2151 NEEDS_CLEANUP | 2151 NEEDS_CLEANUP |
2152 // This is a short non-blocking critical region, so the no safepoint check is ok. | 2152 // This is a short non-blocking critical region, so the no safepoint check is ok. |
2153 OsrList_lock->lock_without_safepoint_check(); | 2153 OsrList_lock->lock_without_safepoint_check(); |
2154 assert(n->is_osr_method(), "wrong kind of nmethod"); | 2154 assert(n->is_osr_method(), "wrong kind of nmethod"); |
2155 n->set_link(osr_nmethods_head()); | 2155 n->set_osr_link(osr_nmethods_head()); |
2156 set_osr_nmethods_head(n); | 2156 set_osr_nmethods_head(n); |
2157 // Remember to unlock again | 2157 // Remember to unlock again |
2158 OsrList_lock->unlock(); | 2158 OsrList_lock->unlock(); |
2159 } | 2159 } |
2160 | 2160 |
2166 nmethod* last = NULL; | 2166 nmethod* last = NULL; |
2167 nmethod* cur = osr_nmethods_head(); | 2167 nmethod* cur = osr_nmethods_head(); |
2168 // Search for match | 2168 // Search for match |
2169 while(cur != NULL && cur != n) { | 2169 while(cur != NULL && cur != n) { |
2170 last = cur; | 2170 last = cur; |
2171 cur = cur->link(); | 2171 cur = cur->osr_link(); |
2172 } | 2172 } |
2173 if (cur == n) { | 2173 if (cur == n) { |
2174 if (last == NULL) { | 2174 if (last == NULL) { |
2175 // Remove first element | 2175 // Remove first element |
2176 set_osr_nmethods_head(osr_nmethods_head()->link()); | 2176 set_osr_nmethods_head(osr_nmethods_head()->osr_link()); |
2177 } else { | 2177 } else { |
2178 last->set_link(cur->link()); | 2178 last->set_osr_link(cur->osr_link()); |
2179 } | 2179 } |
2180 } | 2180 } |
2181 n->set_link(NULL); | 2181 n->set_osr_link(NULL); |
2182 // Remember to unlock again | 2182 // Remember to unlock again |
2183 OsrList_lock->unlock(); | 2183 OsrList_lock->unlock(); |
2184 } | 2184 } |
2185 | 2185 |
2186 nmethod* instanceKlass::lookup_osr_nmethod(const methodOop m, int bci) const { | 2186 nmethod* instanceKlass::lookup_osr_nmethod(const methodOop m, int bci) const { |
2193 (bci == InvocationEntryBci || osr->osr_entry_bci() == bci)) { | 2193 (bci == InvocationEntryBci || osr->osr_entry_bci() == bci)) { |
2194 // Found a match - return it. | 2194 // Found a match - return it. |
2195 OsrList_lock->unlock(); | 2195 OsrList_lock->unlock(); |
2196 return osr; | 2196 return osr; |
2197 } | 2197 } |
2198 osr = osr->link(); | 2198 osr = osr->osr_link(); |
2199 } | 2199 } |
2200 OsrList_lock->unlock(); | 2200 OsrList_lock->unlock(); |
2201 return NULL; | 2201 return NULL; |
2202 } | 2202 } |
2203 | 2203 |