< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
@@ -3456,14 +3456,14 @@
const bool _unloading_occurred;
const uint _num_workers;
// Variables used to claim nmethods.
CompiledMethod* _first_nmethod;
- volatile CompiledMethod* _claimed_nmethod;
+ CompiledMethod* volatile _claimed_nmethod;
// The list of nmethods that need to be processed by the second pass.
- volatile CompiledMethod* _postponed_list;
+ CompiledMethod* volatile _postponed_list;
volatile uint _num_entered_barrier;
public:
G1CodeCacheUnloadingTask(uint num_workers, BoolObjectClosure* is_alive, bool unloading_occurred) :
_is_alive(is_alive),
@@ -3478,11 +3478,11 @@
// Get first alive nmethod
CompiledMethodIterator iter = CompiledMethodIterator();
if(iter.next_alive()) {
_first_nmethod = iter.method();
}
- _claimed_nmethod = (volatile CompiledMethod*)_first_nmethod;
+ _claimed_nmethod = _first_nmethod;
}
~G1CodeCacheUnloadingTask() {
CodeCache::verify_clean_inline_caches();
@@ -3494,11 +3494,11 @@
private:
void add_to_postponed_list(CompiledMethod* nm) {
CompiledMethod* old;
do {
- old = (CompiledMethod*)_postponed_list;
+ old = _postponed_list;
nm->set_unloading_next(old);
} while (Atomic::cmpxchg(nm, &_postponed_list, old) != old);
}
void clean_nmethod(CompiledMethod* nm) {
@@ -3525,11 +3525,11 @@
CompiledMethodIterator last;
do {
*num_claimed_nmethods = 0;
- first = (CompiledMethod*)_claimed_nmethod;
+ first = _claimed_nmethod;
last = CompiledMethodIterator(first);
if (first != NULL) {
for (int i = 0; i < MaxClaimNmethods; i++) {
@@ -3547,11 +3547,11 @@
CompiledMethod* claim_postponed_nmethod() {
CompiledMethod* claim;
CompiledMethod* next;
do {
- claim = (CompiledMethod*)_postponed_list;
+ claim = _postponed_list;
if (claim == NULL) {
return NULL;
}
next = claim->unloading_next();
< prev index next >