|
Hi David,
Thank you for making the changes! Initially, I did not notice there are several spots with a wrong indent: 124 if (Atomic::replace_if_null(self, &_owner)) { 125 return; 126 } ... 136 if (_owner == NULL && Atomic::replace_if_null(self, &_owner)) { 137 _entryList = node._next; 138 RawMonitor_lock->unlock(); 139 return; 140 } 141 RawMonitor_lock->unlock(); 142 while (node.tState == QNode::TS_ENTER) { 143 self->_ParkEvent->park(); 144 } ... 158 if (w != NULL) {
159 _entryList = w->_next;
160 }
161 RawMonitor_lock->unlock();
162 if (w != NULL) {
163 guarantee(w ->tState == QNode::TS_ENTER, "invariant");
164 // Once we set tState to TS_RUN the waiting thread can complete
165 // simpleEnter and 'w' is pointing into random stack space. So we have
166 // to ensure we extract the ParkEvent (which is in type-stable memory)
167 // before we set the state, and then don't access 'w'.
168 ParkEvent* ev = w->_event;
169 OrderAccess::loadstore();
170 w->tState = QNode::TS_RUN;
171 OrderAccess::fence();
172 ev->unpark();
173 }
...
250 for (;;) {
251 QNode* w = _waitSet;
252 if (w == NULL) break;
253 _waitSet = w->_next;
254 if (ev != NULL) {
255 ev->unpark();
256 ev = NULL;
257 }
258 ev = w->_event;
259 OrderAccess::loadstore();
260 w->tState = QNode::TS_RUN;
261 OrderAccess::storeload();
262 if (!all) {
263 break;
264 }
265 }
...
294 if (contended == self) {
295 _recursions++;
296 return;
297 }
298
299 if (contended == NULL) {
300 guarantee(_owner == self, "invariant");
301 guarantee(_recursions == 0, "invariant");
302 return;
303 }
...
307 if (!self->is_Java_thread()) {
308 simpleEnter(self);
309 } else {
Thanks, Serguei On 10/7/19 21:42, David Holmes wrote: Hi Serguei, |
- RFR (S/T): 8231737: Cleanup JvmtiRawMonitor cod... David Holmes
- Re: RFR (S/T): 8231737: Cleanup JvmtiRawMo... [email protected]
- Re: RFR (S/T): 8231737: Cleanup JvmtiR... David Holmes
- Re: RFR (S/T): 8231737: Cleanup Jv... [email protected]
- Re: RFR (S/T): 8231737: Cleanu... David Holmes
- Re: RFR (S/T): 8231737: Cleanup Jv... coleen . phillimore
- Re: RFR (S/T): 8231737: Cleanu... David Holmes
- Re: RFR (S/T): 8231737: C... coleen . phillimore
- Re: RFR (S/T): 823173... David Holmes
- Re: RFR (S/T): 8231737: Cleanup JvmtiRawMo... Per Liden
- Re: RFR (S/T): 8231737: Cleanup JvmtiR... David Holmes
- Re: RFR (S/T): 8231737: Cleanup Jv... Per Liden
- Re: RFR (S/T): 8231737: Cleanup JvmtiRawMo... Daniel D. Daugherty
