src/share/vm/runtime/biasedLocking.cpp

changeset 9892
9a4141de094d
parent 9861
a248d0be1309
child 9895
c439931136f1
equal deleted inserted replaced
9891:4904bded9702 9892:9a4141de094d
254 // Store the unlocked value into the object's header. 254 // Store the unlocked value into the object's header.
255 obj->set_mark(unbiased_prototype); 255 obj->set_mark(unbiased_prototype);
256 } 256 }
257 } 257 }
258 258
259 #if INCLUDE_JFR
259 // If requested, return information on which thread held the bias 260 // If requested, return information on which thread held the bias
260 if (biased_locker != NULL) { 261 if (biased_locker != NULL) {
261 *biased_locker = biased_thread; 262 *biased_locker = biased_thread;
262 } 263 }
264 #endif // INCLUDE_JFR
263 265
264 return BiasedLocking::BIAS_REVOKED; 266 return BiasedLocking::BIAS_REVOKED;
265 } 267 }
266 268
267 269
495 virtual void doit() { 497 virtual void doit() {
496 if (_obj != NULL) { 498 if (_obj != NULL) {
497 if (TraceBiasedLocking) { 499 if (TraceBiasedLocking) {
498 tty->print_cr("Revoking bias with potentially per-thread safepoint:"); 500 tty->print_cr("Revoking bias with potentially per-thread safepoint:");
499 } 501 }
502
500 JavaThread* biased_locker = NULL; 503 JavaThread* biased_locker = NULL;
501 _status_code = revoke_bias((*_obj)(), false, false, _requesting_thread, &biased_locker); 504 _status_code = revoke_bias((*_obj)(), false, false, _requesting_thread, &biased_locker);
505 #if INCLUDE_JFR
502 if (biased_locker != NULL) { 506 if (biased_locker != NULL) {
503 _biased_locker_id = JFR_THREAD_ID(biased_locker); 507 _biased_locker_id = JFR_THREAD_ID(biased_locker);
504 } 508 }
509 #endif // INCLUDE_JFR
510
505 clean_up_cached_monitor_info(); 511 clean_up_cached_monitor_info();
506 return; 512 return;
507 } else { 513 } else {
508 if (TraceBiasedLocking) { 514 if (TraceBiasedLocking) {
509 tty->print_cr("Revoking bias with global safepoint:"); 515 tty->print_cr("Revoking bias with global safepoint:");
514 520
515 BiasedLocking::Condition status_code() const { 521 BiasedLocking::Condition status_code() const {
516 return _status_code; 522 return _status_code;
517 } 523 }
518 524
525 #if INCLUDE_JFR
519 traceid biased_locker() const { 526 traceid biased_locker() const {
520 return _biased_locker_id; 527 return _biased_locker_id;
521 } 528 }
529 #endif // INCLUDE_JFR
522 }; 530 };
523 531
524 532
525 class VM_BulkRevokeBias : public VM_RevokeBias { 533 class VM_BulkRevokeBias : public VM_RevokeBias {
526 private: 534 private:

mercurial