equal
deleted
inserted
replaced
1898 |
1898 |
1899 assert(extract_state(_oops_do_mark_link) == claim_weak_request_tag || |
1899 assert(extract_state(_oops_do_mark_link) == claim_weak_request_tag || |
1900 extract_state(_oops_do_mark_link) == claim_strong_request_tag, |
1900 extract_state(_oops_do_mark_link) == claim_strong_request_tag, |
1901 "must be but is nmethod " PTR_FORMAT " %u", p2i(extract_nmethod(_oops_do_mark_link)), extract_state(_oops_do_mark_link)); |
1901 "must be but is nmethod " PTR_FORMAT " %u", p2i(extract_nmethod(_oops_do_mark_link)), extract_state(_oops_do_mark_link)); |
1902 |
1902 |
1903 nmethod* old_head = Atomic::xchg(this, &_oops_do_mark_nmethods); |
1903 nmethod* old_head = Atomic::xchg(&_oops_do_mark_nmethods, this); |
1904 // Self-loop if needed. |
1904 // Self-loop if needed. |
1905 if (old_head == NULL) { |
1905 if (old_head == NULL) { |
1906 old_head = this; |
1906 old_head = this; |
1907 } |
1907 } |
1908 // Try to install end of list and weak done tag. |
1908 // Try to install end of list and weak done tag. |
1915 } |
1915 } |
1916 |
1916 |
1917 void nmethod::oops_do_add_to_list_as_strong_done() { |
1917 void nmethod::oops_do_add_to_list_as_strong_done() { |
1918 assert(SafepointSynchronize::is_at_safepoint(), "only at safepoint"); |
1918 assert(SafepointSynchronize::is_at_safepoint(), "only at safepoint"); |
1919 |
1919 |
1920 nmethod* old_head = Atomic::xchg(this, &_oops_do_mark_nmethods); |
1920 nmethod* old_head = Atomic::xchg(&_oops_do_mark_nmethods, this); |
1921 // Self-loop if needed. |
1921 // Self-loop if needed. |
1922 if (old_head == NULL) { |
1922 if (old_head == NULL) { |
1923 old_head = this; |
1923 old_head = this; |
1924 } |
1924 } |
1925 assert(_oops_do_mark_link == mark_link(this, claim_strong_done_tag), "must be but is nmethod " PTR_FORMAT " state %u", |
1925 assert(_oops_do_mark_link == mark_link(this, claim_strong_done_tag), "must be but is nmethod " PTR_FORMAT " state %u", |