src/share/vm/gc_implementation/parNew/parNewGeneration.cpp

changeset 5784
190899198332
parent 5516
330dfb0476f4
child 6131
86e6d691f2e1
     1.1 --- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Wed Sep 25 17:47:51 2013 +0200
     1.2 +++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Thu Sep 26 10:25:02 2013 -0400
     1.3 @@ -1103,7 +1103,7 @@
     1.4    }
     1.5  }
     1.6  
     1.7 -static const oop ClaimedForwardPtr = oop(0x4);
     1.8 +static const oop ClaimedForwardPtr = cast_to_oop<intptr_t>(0x4);
     1.9  
    1.10  // Because of concurrency, there are times where an object for which
    1.11  // "is_forwarded()" is true contains an "interim" forwarding pointer
    1.12 @@ -1226,7 +1226,7 @@
    1.13    if (TraceScavenge) {
    1.14      gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}",
    1.15         is_in_reserved(new_obj) ? "copying" : "tenuring",
    1.16 -       new_obj->klass()->internal_name(), old, new_obj, new_obj->size());
    1.17 +       new_obj->klass()->internal_name(), (void *)old, (void *)new_obj, new_obj->size());
    1.18    }
    1.19  #endif
    1.20  
    1.21 @@ -1347,7 +1347,7 @@
    1.22    if (TraceScavenge) {
    1.23      gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}",
    1.24         is_in_reserved(new_obj) ? "copying" : "tenuring",
    1.25 -       new_obj->klass()->internal_name(), old, new_obj, new_obj->size());
    1.26 +       new_obj->klass()->internal_name(), (void *)old, (void *)new_obj, new_obj->size());
    1.27    }
    1.28  #endif
    1.29  
    1.30 @@ -1436,7 +1436,7 @@
    1.31  // (although some performance comparisons would be useful since
    1.32  // single global lists have their own performance disadvantages
    1.33  // as we were made painfully aware not long ago, see 6786503).
    1.34 -#define BUSY (oop(0x1aff1aff))
    1.35 +#define BUSY (cast_to_oop<intptr_t>(0x1aff1aff))
    1.36  void ParNewGeneration::push_on_overflow_list(oop from_space_obj, ParScanThreadState* par_scan_state) {
    1.37    assert(is_in_reserved(from_space_obj), "Should be from this generation");
    1.38    if (ParGCUseLocalOverflow) {
    1.39 @@ -1512,7 +1512,7 @@
    1.40    if (_overflow_list == NULL) return false;
    1.41  
    1.42    // Otherwise, there was something there; try claiming the list.
    1.43 -  oop prefix = (oop)Atomic::xchg_ptr(BUSY, &_overflow_list);
    1.44 +  oop prefix = cast_to_oop(Atomic::xchg_ptr(BUSY, &_overflow_list));
    1.45    // Trim off a prefix of at most objsFromOverflow items
    1.46    Thread* tid = Thread::current();
    1.47    size_t spin_count = (size_t)ParallelGCThreads;
    1.48 @@ -1526,7 +1526,7 @@
    1.49        return false;
    1.50      } else if (_overflow_list != BUSY) {
    1.51       // try and grab the prefix
    1.52 -     prefix = (oop)Atomic::xchg_ptr(BUSY, &_overflow_list);
    1.53 +     prefix = cast_to_oop(Atomic::xchg_ptr(BUSY, &_overflow_list));
    1.54      }
    1.55    }
    1.56    if (prefix == NULL || prefix == BUSY) {

mercurial