435
436 // For tracking the ObjectMonitor on which this thread called Object.wait()
437 ObjectMonitor* current_waiting_monitor() {
438 return _current_waiting_monitor;
439 }
440 void set_current_waiting_monitor(ObjectMonitor* monitor) {
441 _current_waiting_monitor = monitor;
442 }
443
444 // GC support
445 // Apply "f->do_oop" to all root oops in "this".
446 // Apply "cld_f->do_cld" to CLDs that are otherwise not kept alive.
447 // Used by JavaThread::oops_do.
448 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
449 virtual void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
450
451 // Handles the parallel case for the method below.
452 private:
453 bool claim_oops_do_par_case(int collection_parity);
454 public:
455 // Requires that "collection_parity" is that of the current strong roots
456 // iteration. If "is_par" is false, sets the parity of "this" to
457 // "collection_parity", and returns "true". If "is_par" is true,
458 // uses an atomic instruction to set the current threads parity to
459 // "collection_parity", if it is not already. Returns "true" iff the
460 // calling thread does the update, this indicates that the calling thread
461 // has claimed the thread's stack as a root groop in the current
462 // collection.
463 bool claim_oops_do(bool is_par, int collection_parity) {
464 if (!is_par) {
465 _oops_do_parity = collection_parity;
466 return true;
467 } else {
468 return claim_oops_do_par_case(collection_parity);
469 }
470 }
471
472 // Sweeper support
473 void nmethods_do(CodeBlobClosure* cf);
474
475 // jvmtiRedefineClasses support
|
435
436 // For tracking the ObjectMonitor on which this thread called Object.wait()
437 ObjectMonitor* current_waiting_monitor() {
438 return _current_waiting_monitor;
439 }
440 void set_current_waiting_monitor(ObjectMonitor* monitor) {
441 _current_waiting_monitor = monitor;
442 }
443
444 // GC support
445 // Apply "f->do_oop" to all root oops in "this".
446 // Apply "cld_f->do_cld" to CLDs that are otherwise not kept alive.
447 // Used by JavaThread::oops_do.
448 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
449 virtual void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
450
451 // Handles the parallel case for the method below.
452 private:
453 bool claim_oops_do_par_case(int collection_parity);
454 public:
455 // Requires that "collection_parity" is that of the current roots
456 // iteration. If "is_par" is false, sets the parity of "this" to
457 // "collection_parity", and returns "true". If "is_par" is true,
458 // uses an atomic instruction to set the current threads parity to
459 // "collection_parity", if it is not already. Returns "true" iff the
460 // calling thread does the update, this indicates that the calling thread
461 // has claimed the thread's stack as a root groop in the current
462 // collection.
463 bool claim_oops_do(bool is_par, int collection_parity) {
464 if (!is_par) {
465 _oops_do_parity = collection_parity;
466 return true;
467 } else {
468 return claim_oops_do_par_case(collection_parity);
469 }
470 }
471
472 // Sweeper support
473 void nmethods_do(CodeBlobClosure* cf);
474
475 // jvmtiRedefineClasses support
|