Merge

Mon, 14 Feb 2011 22:21:18 -0500

author
tonyp
date
Mon, 14 Feb 2011 22:21:18 -0500
changeset 2538
f7702f8c0e25
parent 2524
762bc029de50
parent 2537
55cc33cf55bc
child 2539
02368ad6c63f
child 2574
02f78cfa4656

Merge

make/jprt.properties file | annotate | diff | comparison | revisions
src/share/vm/services/management.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/make/jprt.properties	Fri Feb 11 15:32:03 2011 -0800
     1.2 +++ b/make/jprt.properties	Mon Feb 14 22:21:18 2011 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8  #
     1.9  # This code is free software; you can redistribute it and/or modify it
    1.10 @@ -437,6 +437,7 @@
    1.11      ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
    1.12      ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
    1.13      ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
    1.14 +    ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_G1, \
    1.15      ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParOldGC, \
    1.16      ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_default, \
    1.17      ${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
     2.1 --- a/src/share/vm/classfile/classFileParser.cpp	Fri Feb 11 15:32:03 2011 -0800
     2.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Mon Feb 14 22:21:18 2011 -0500
     2.3 @@ -331,7 +331,7 @@
     2.4      length, CHECK_(nullHandle));
     2.5    constantPoolOop constant_pool =
     2.6                        oopFactory::new_constantPool(length,
     2.7 -                                                   methodOopDesc::IsSafeConc,
     2.8 +                                                   oopDesc::IsSafeConc,
     2.9                                                     CHECK_(nullHandle));
    2.10    constantPoolHandle cp (THREAD, constant_pool);
    2.11  
    2.12 @@ -1929,10 +1929,9 @@
    2.13    }
    2.14  
    2.15    // All sizing information for a methodOop is finally available, now create it
    2.16 -  methodOop m_oop  = oopFactory::new_method(
    2.17 -    code_length, access_flags, linenumber_table_length,
    2.18 -    total_lvt_length, checked_exceptions_length,
    2.19 -    methodOopDesc::IsSafeConc, CHECK_(nullHandle));
    2.20 +  methodOop m_oop  = oopFactory::new_method(code_length, access_flags, linenumber_table_length,
    2.21 +                                            total_lvt_length, checked_exceptions_length,
    2.22 +                                            oopDesc::IsSafeConc, CHECK_(nullHandle));
    2.23    methodHandle m (THREAD, m_oop);
    2.24  
    2.25    ClassLoadingService::add_class_method_size(m_oop->size()*HeapWordSize);
     3.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Fri Feb 11 15:32:03 2011 -0800
     3.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Mon Feb 14 22:21:18 2011 -0500
     3.3 @@ -1040,9 +1040,10 @@
     3.4      } else {
     3.5        // must read from what 'p' points to in each loop.
     3.6        klassOop k = ((volatile oopDesc*)p)->klass_or_null();
     3.7 -      if (k != NULL &&
     3.8 -          ((oopDesc*)p)->is_parsable() &&
     3.9 -          ((oopDesc*)p)->is_conc_safe()) {
    3.10 +      // We trust the size of any object that has a non-NULL
    3.11 +      // klass and (for those in the perm gen) is parsable
    3.12 +      // -- irrespective of its conc_safe-ty.
    3.13 +      if (k != NULL && ((oopDesc*)p)->is_parsable()) {
    3.14          assert(k->is_oop(), "Should really be klass oop.");
    3.15          oop o = (oop)p;
    3.16          assert(o->is_oop(), "Should be an oop");
    3.17 @@ -1051,6 +1052,7 @@
    3.18          assert(res != 0, "Block size should not be 0");
    3.19          return res;
    3.20        } else {
    3.21 +        // May return 0 if P-bits not present.
    3.22          return c->block_size_if_printezis_bits(p);
    3.23        }
    3.24      }
     4.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Feb 11 15:32:03 2011 -0800
     4.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Feb 14 22:21:18 2011 -0500
     4.3 @@ -6360,18 +6360,16 @@
     4.4  // A variant of the above (block_size_using_printezis_bits()) except
     4.5  // that we return 0 if the P-bits are not yet set.
     4.6  size_t CMSCollector::block_size_if_printezis_bits(HeapWord* addr) const {
     4.7 -  if (_markBitMap.isMarked(addr)) {
     4.8 -    assert(_markBitMap.isMarked(addr + 1), "Missing Printezis bit?");
     4.9 +  if (_markBitMap.isMarked(addr + 1)) {
    4.10 +    assert(_markBitMap.isMarked(addr), "P-bit can be set only for marked objects");
    4.11      HeapWord* nextOneAddr = _markBitMap.getNextMarkedWordAddress(addr + 2);
    4.12      size_t size = pointer_delta(nextOneAddr + 1, addr);
    4.13      assert(size == CompactibleFreeListSpace::adjustObjectSize(size),
    4.14             "alignment problem");
    4.15      assert(size >= 3, "Necessary for Printezis marks to work");
    4.16      return size;
    4.17 -  } else {
    4.18 -    assert(!_markBitMap.isMarked(addr + 1), "Bit map inconsistency?");
    4.19 -    return 0;
    4.20 -  }
    4.21 +  }
    4.22 +  return 0;
    4.23  }
    4.24  
    4.25  HeapWord* CMSCollector::next_card_start_after_block(HeapWord* addr) const {
    4.26 @@ -9212,7 +9210,6 @@
    4.27  
    4.28  size_t MarkDeadObjectsClosure::do_blk(HeapWord* addr) {
    4.29    size_t res = _sp->block_size_no_stall(addr, _collector);
    4.30 -  assert(res != 0, "Should always be able to compute a size");
    4.31    if (_sp->block_is_obj(addr)) {
    4.32      if (_live_bit_map->isMarked(addr)) {
    4.33        // It can't have been dead in a previous cycle
    4.34 @@ -9221,6 +9218,7 @@
    4.35        _dead_bit_map->mark(addr);      // mark the dead object
    4.36      }
    4.37    }
    4.38 +  // Could be 0, if the block size could not be computed without stalling.
    4.39    return res;
    4.40  }
    4.41  
     5.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp	Fri Feb 11 15:32:03 2011 -0800
     5.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp	Mon Feb 14 22:21:18 2011 -0500
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
    5.10 @@ -132,8 +132,7 @@
    5.11    VM_GenCollectFullConcurrent(unsigned int gc_count_before,
    5.12                                unsigned int full_gc_count_before,
    5.13                                GCCause::Cause gc_cause)
    5.14 -    : VM_GC_Operation(gc_count_before, full_gc_count_before, true /* full */) {
    5.15 -    _gc_cause = gc_cause;
    5.16 +    : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */) {
    5.17      assert(FullGCCount_lock != NULL, "Error");
    5.18      assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
    5.19    }
     6.1 --- a/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp	Fri Feb 11 15:32:03 2011 -0800
     6.2 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp	Mon Feb 14 22:21:18 2011 -0500
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
    6.10 @@ -44,7 +44,7 @@
    6.11  public:
    6.12    VM_G1OperationWithAllocRequest(unsigned int gc_count_before,
    6.13                                   size_t       word_size)
    6.14 -    : VM_GC_Operation(gc_count_before),
    6.15 +    : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
    6.16        _word_size(word_size), _result(NULL), _pause_succeeded(false) { }
    6.17    HeapWord* result() { return _result; }
    6.18    bool pause_succeeded() { return _pause_succeeded; }
    6.19 @@ -55,9 +55,7 @@
    6.20    VM_G1CollectFull(unsigned int gc_count_before,
    6.21                     unsigned int full_gc_count_before,
    6.22                     GCCause::Cause cause)
    6.23 -    : VM_GC_Operation(gc_count_before, full_gc_count_before) {
    6.24 -    _gc_cause = cause;
    6.25 -  }
    6.26 +    : VM_GC_Operation(gc_count_before, cause, full_gc_count_before) { }
    6.27    virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
    6.28    virtual void doit();
    6.29    virtual const char* name() const {
     7.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Fri Feb 11 15:32:03 2011 -0800
     7.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Mon Feb 14 22:21:18 2011 -0500
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
    7.10 @@ -1196,11 +1196,6 @@
    7.11    static inline void adjust_pointer(oop* p)       { adjust_pointer(p, false); }
    7.12    static inline void adjust_pointer(narrowOop* p) { adjust_pointer(p, false); }
    7.13  
    7.14 -  template <class T>
    7.15 -  static inline void adjust_pointer(T* p,
    7.16 -                                    HeapWord* beg_addr,
    7.17 -                                    HeapWord* end_addr);
    7.18 -
    7.19    // Reference Processing
    7.20    static ReferenceProcessor* const ref_processor() { return _ref_processor; }
    7.21  
    7.22 @@ -1408,15 +1403,6 @@
    7.23    return ((HeapWord*) k) >= dense_prefix(perm_space_id);
    7.24  }
    7.25  
    7.26 -template <class T>
    7.27 -inline void PSParallelCompact::adjust_pointer(T* p,
    7.28 -                                              HeapWord* beg_addr,
    7.29 -                                              HeapWord* end_addr) {
    7.30 -  if (is_in((HeapWord*)p, beg_addr, end_addr)) {
    7.31 -    adjust_pointer(p);
    7.32 -  }
    7.33 -}
    7.34 -
    7.35  #ifdef ASSERT
    7.36  inline void
    7.37  PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr)
     8.1 --- a/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp	Fri Feb 11 15:32:03 2011 -0800
     8.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp	Mon Feb 14 22:21:18 2011 -0500
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
     8.6 + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
     8.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.8   *
     8.9   * This code is free software; you can redistribute it and/or modify it
    8.10 @@ -34,7 +34,7 @@
    8.11  // The following methods are used by the parallel scavenge collector
    8.12  VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size,
    8.13    bool is_tlab, unsigned int gc_count) :
    8.14 -  VM_GC_Operation(gc_count),
    8.15 +  VM_GC_Operation(gc_count, GCCause::_allocation_failure),
    8.16    _size(size),
    8.17    _is_tlab(is_tlab),
    8.18    _result(NULL)
    8.19 @@ -57,7 +57,7 @@
    8.20  
    8.21  VM_ParallelGCFailedPermanentAllocation::VM_ParallelGCFailedPermanentAllocation(size_t size,
    8.22    unsigned int gc_count, unsigned int full_gc_count) :
    8.23 -  VM_GC_Operation(gc_count, full_gc_count, true /* full */),
    8.24 +  VM_GC_Operation(gc_count, GCCause::_allocation_failure, full_gc_count, true /* full */),
    8.25    _size(size),
    8.26    _result(NULL)
    8.27  {
    8.28 @@ -80,9 +80,8 @@
    8.29  VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count,
    8.30                                               unsigned int full_gc_count,
    8.31                                               GCCause::Cause gc_cause) :
    8.32 -  VM_GC_Operation(gc_count, full_gc_count, true /* full */)
    8.33 +  VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */)
    8.34  {
    8.35 -  _gc_cause = gc_cause;
    8.36  }
    8.37  
    8.38  void VM_ParallelGCSystemGC::doit() {
     9.1 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.cpp	Fri Feb 11 15:32:03 2011 -0800
     9.2 +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.cpp	Mon Feb 14 22:21:18 2011 -0500
     9.3 @@ -1,5 +1,5 @@
     9.4  /*
     9.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     9.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     9.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.8   *
     9.9   * This code is free software; you can redistribute it and/or modify it
    9.10 @@ -87,6 +87,8 @@
    9.11  
    9.12  bool VM_GC_Operation::doit_prologue() {
    9.13    assert(Thread::current()->is_Java_thread(), "just checking");
    9.14 +  assert(((_gc_cause != GCCause::_no_gc) &&
    9.15 +          (_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause");
    9.16  
    9.17    acquire_pending_list_lock();
    9.18    // If the GC count has changed someone beat us to the collection
    10.1 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.hpp	Fri Feb 11 15:32:03 2011 -0800
    10.2 +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.hpp	Mon Feb 14 22:21:18 2011 -0500
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
   10.10 @@ -85,6 +85,7 @@
   10.11  
   10.12   public:
   10.13    VM_GC_Operation(unsigned int gc_count_before,
   10.14 +                  GCCause::Cause _cause,
   10.15                    unsigned int full_gc_count_before = 0,
   10.16                    bool full = false) {
   10.17      _full = full;
   10.18 @@ -92,7 +93,7 @@
   10.19      _gc_count_before    = gc_count_before;
   10.20  
   10.21      // A subclass constructor will likely overwrite the following
   10.22 -    _gc_cause           = GCCause::_no_cause_specified;
   10.23 +    _gc_cause           = _cause;
   10.24  
   10.25      _gc_locked = false;
   10.26  
   10.27 @@ -136,6 +137,7 @@
   10.28    VM_GC_HeapInspection(outputStream* out, bool request_full_gc,
   10.29                         bool need_prologue) :
   10.30      VM_GC_Operation(0 /* total collections,      dummy, ignored */,
   10.31 +                    GCCause::_heap_inspection /* GC Cause */,
   10.32                      0 /* total full collections, dummy, ignored */,
   10.33                      request_full_gc) {
   10.34      _out = out;
   10.35 @@ -160,7 +162,7 @@
   10.36    VM_GenCollectForAllocation(size_t size,
   10.37                               bool tlab,
   10.38                               unsigned int gc_count_before)
   10.39 -    : VM_GC_Operation(gc_count_before),
   10.40 +    : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
   10.41        _size(size),
   10.42        _tlab(tlab) {
   10.43      _res = NULL;
   10.44 @@ -182,9 +184,8 @@
   10.45                      unsigned int full_gc_count_before,
   10.46                      GCCause::Cause gc_cause,
   10.47                        int max_level)
   10.48 -    : VM_GC_Operation(gc_count_before, full_gc_count_before, true /* full */),
   10.49 -      _max_level(max_level)
   10.50 -  { _gc_cause = gc_cause; }
   10.51 +    : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */),
   10.52 +      _max_level(max_level) { }
   10.53    ~VM_GenCollectFull() {}
   10.54    virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
   10.55    virtual void doit();
   10.56 @@ -199,7 +200,7 @@
   10.57                                        unsigned int gc_count_before,
   10.58                                        unsigned int full_gc_count_before,
   10.59                                        GCCause::Cause gc_cause)
   10.60 -    : VM_GC_Operation(gc_count_before, full_gc_count_before, true),
   10.61 +    : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true),
   10.62        _size(size) {
   10.63      _res = NULL;
   10.64      _gc_cause = gc_cause;
    11.1 --- a/src/share/vm/gc_interface/collectedHeap.cpp	Fri Feb 11 15:32:03 2011 -0800
    11.2 +++ b/src/share/vm/gc_interface/collectedHeap.cpp	Mon Feb 14 22:21:18 2011 -0500
    11.3 @@ -100,8 +100,7 @@
    11.4    }
    11.5  }
    11.6  
    11.7 -void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
    11.8 - {
    11.9 +void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size) {
   11.10    if (CheckMemoryInitialization && ZapUnusedHeapArea) {
   11.11      for (size_t slot = 0; slot < size; slot += 1) {
   11.12        assert((*(intptr_t*) (addr + slot)) == ((intptr_t) badHeapWordVal),
    12.1 --- a/src/share/vm/gc_interface/gcCause.cpp	Fri Feb 11 15:32:03 2011 -0800
    12.2 +++ b/src/share/vm/gc_interface/gcCause.cpp	Mon Feb 14 22:21:18 2011 -0500
    12.3 @@ -1,5 +1,5 @@
    12.4  /*
    12.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
    12.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
    12.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.8   *
    12.9   * This code is free software; you can redistribute it and/or modify it
   12.10 @@ -92,28 +92,3 @@
   12.11    }
   12.12    ShouldNotReachHere();
   12.13  }
   12.14 -
   12.15 -#ifndef PRODUCT
   12.16 -
   12.17 -bool GCCause::is_for_full_collection(GCCause::Cause cause) {
   12.18 -  bool result;
   12.19 -
   12.20 -  // There are more GCCause::Cause types than listed here.
   12.21 -  // For brevity, we list only those that cause full collections.
   12.22 -  switch (cause) {
   12.23 -    case _allocation_failure:
   12.24 -    case _tenured_generation_full:
   12.25 -    case _permanent_generation_full:
   12.26 -    case _cms_generation_full:
   12.27 -    case _last_ditch_collection:
   12.28 -      result = true;
   12.29 -      break;
   12.30 -
   12.31 -    default:
   12.32 -      result = false;
   12.33 -      break;
   12.34 -  }
   12.35 -  return result;
   12.36 -}
   12.37 -
   12.38 -#endif // PRODUCT
    13.1 --- a/src/share/vm/gc_interface/gcCause.hpp	Fri Feb 11 15:32:03 2011 -0800
    13.2 +++ b/src/share/vm/gc_interface/gcCause.hpp	Mon Feb 14 22:21:18 2011 -0500
    13.3 @@ -1,5 +1,5 @@
    13.4  /*
    13.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
    13.6 + * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
    13.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.8   *
    13.9   * This code is free software; you can redistribute it and/or modify it
   13.10 @@ -85,8 +85,6 @@
   13.11  
   13.12    // Return a string describing the GCCause.
   13.13    static const char* to_string(GCCause::Cause cause);
   13.14 -  // Return true if the GCCause is for a full collection.
   13.15 -  static bool is_for_full_collection(GCCause::Cause cause) PRODUCT_RETURN0;
   13.16  };
   13.17  
   13.18  #endif // SHARE_VM_GC_INTERFACE_GCCAUSE_HPP
    14.1 --- a/src/share/vm/interpreter/rewriter.cpp	Fri Feb 11 15:32:03 2011 -0800
    14.2 +++ b/src/share/vm/interpreter/rewriter.cpp	Mon Feb 14 22:21:18 2011 -0500
    14.3 @@ -67,13 +67,11 @@
    14.4  
    14.5  
    14.6  // Creates a constant pool cache given a CPC map
    14.7 -// This creates the constant pool cache initially in a state
    14.8 -// that is unsafe for concurrent GC processing but sets it to
    14.9 -// a safe mode before the constant pool cache is returned.
   14.10  void Rewriter::make_constant_pool_cache(TRAPS) {
   14.11    const int length = _cp_cache_map.length();
   14.12    constantPoolCacheOop cache =
   14.13 -      oopFactory::new_constantPoolCache(length, methodOopDesc::IsUnsafeConc, CHECK);
   14.14 +      oopFactory::new_constantPoolCache(length, CHECK);
   14.15 +  No_Safepoint_Verifier nsv;
   14.16    cache->initialize(_cp_cache_map);
   14.17  
   14.18    // Don't bother with the next pass if there is no JVM_CONSTANT_InvokeDynamic.
    15.1 --- a/src/share/vm/memory/oopFactory.cpp	Fri Feb 11 15:32:03 2011 -0800
    15.2 +++ b/src/share/vm/memory/oopFactory.cpp	Mon Feb 14 22:21:18 2011 -0500
    15.3 @@ -92,12 +92,21 @@
    15.4    }
    15.5  }
    15.6  
    15.7 -objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
    15.8 +objArrayOop oopFactory::new_system_objArray(int length, bool in_perm_gen, TRAPS) {
    15.9    int size = objArrayOopDesc::object_size(length);
   15.10    KlassHandle klass (THREAD, Universe::systemObjArrayKlassObj());
   15.11 -  objArrayOop o = (objArrayOop)
   15.12 -    Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
   15.13 +  oop o;
   15.14 +  if (in_perm_gen) {
   15.15 +    o = Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
   15.16 +  } else {
   15.17 +    o = Universe::heap()->array_allocate(klass, size, length, CHECK_NULL);
   15.18 +  }
   15.19    // initialization not needed, allocated cleared
   15.20 +  return (objArrayOop) o;
   15.21 +}
   15.22 +
   15.23 +objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
   15.24 +  objArrayOop o = oopFactory::new_system_objArray(length, true, CHECK_NULL);
   15.25    return o;
   15.26  }
   15.27  
   15.28 @@ -111,10 +120,9 @@
   15.29  
   15.30  
   15.31  constantPoolCacheOop oopFactory::new_constantPoolCache(int length,
   15.32 -                                                       bool is_conc_safe,
   15.33                                                         TRAPS) {
   15.34    constantPoolCacheKlass* ck = constantPoolCacheKlass::cast(Universe::constantPoolCacheKlassObj());
   15.35 -  return ck->allocate(length, is_conc_safe, CHECK_NULL);
   15.36 +  return ck->allocate(length, CHECK_NULL);
   15.37  }
   15.38  
   15.39  
    16.1 --- a/src/share/vm/memory/oopFactory.hpp	Fri Feb 11 15:32:03 2011 -0800
    16.2 +++ b/src/share/vm/memory/oopFactory.hpp	Mon Feb 14 22:21:18 2011 -0500
    16.3 @@ -69,7 +69,6 @@
    16.4                                                      bool is_conc_safe,
    16.5                                                      TRAPS);
    16.6    static constantPoolCacheOop new_constantPoolCache(int length,
    16.7 -                                                    bool is_conc_safe,
    16.8                                                      TRAPS);
    16.9  
   16.10    // Instance classes
   16.11 @@ -103,6 +102,7 @@
   16.12  
   16.13    // System object arrays
   16.14    static objArrayOop     new_system_objArray(int length, TRAPS);
   16.15 +  static objArrayOop     new_system_objArray(int length, bool in_perm_gen, TRAPS);
   16.16  
   16.17    // Regular object arrays
   16.18    static objArrayOop     new_objArray(klassOop klass, int length, TRAPS);
    17.1 --- a/src/share/vm/oops/arrayKlassKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    17.2 +++ b/src/share/vm/oops/arrayKlassKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    17.3 @@ -1,5 +1,5 @@
    17.4  /*
    17.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    17.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    17.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.8   *
    17.9   * This code is free software; you can redistribute it and/or modify it
   17.10 @@ -128,27 +128,6 @@
   17.11    }
   17.12    return klassKlass::oop_update_pointers(cm, obj);
   17.13  }
   17.14 -
   17.15 -int
   17.16 -arrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   17.17 -                                     HeapWord* beg_addr, HeapWord* end_addr) {
   17.18 -  assert(obj->is_klass(), "must be klass");
   17.19 -  arrayKlass* ak = arrayKlass::cast(klassOop(obj));
   17.20 -
   17.21 -  oop* p;
   17.22 -  p = ak->adr_component_mirror();
   17.23 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   17.24 -  p = ak->adr_lower_dimension();
   17.25 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   17.26 -  p = ak->adr_higher_dimension();
   17.27 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   17.28 -
   17.29 -  {
   17.30 -    HandleMark hm;
   17.31 -    ak->vtable()->oop_update_pointers(cm, beg_addr, end_addr);
   17.32 -  }
   17.33 -  return klassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
   17.34 -}
   17.35  #endif // SERIALGC
   17.36  
   17.37  // Printing
    18.1 --- a/src/share/vm/oops/compiledICHolderKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    18.2 +++ b/src/share/vm/oops/compiledICHolderKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    18.3 @@ -1,5 +1,5 @@
    18.4  /*
    18.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    18.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
    18.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.8   *
    18.9   * This code is free software; you can redistribute it and/or modify it
   18.10 @@ -145,21 +145,6 @@
   18.11    PSParallelCompact::adjust_pointer(c->adr_holder_klass());
   18.12    return c->object_size();
   18.13  }
   18.14 -
   18.15 -int compiledICHolderKlass::oop_update_pointers(ParCompactionManager* cm,
   18.16 -                                               oop obj,
   18.17 -                                               HeapWord* beg_addr,
   18.18 -                                               HeapWord* end_addr) {
   18.19 -  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
   18.20 -  compiledICHolderOop c = compiledICHolderOop(obj);
   18.21 -
   18.22 -  oop* p;
   18.23 -  p = c->adr_holder_method();
   18.24 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   18.25 -  p = c->adr_holder_klass();
   18.26 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   18.27 -  return c->object_size();
   18.28 -}
   18.29  #endif // SERIALGC
   18.30  
   18.31  // Printing
    19.1 --- a/src/share/vm/oops/constMethodKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    19.2 +++ b/src/share/vm/oops/constMethodKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    19.3 @@ -1,5 +1,5 @@
    19.4  /*
    19.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    19.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
    19.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.8   *
    19.9   * This code is free software; you can redistribute it and/or modify it
   19.10 @@ -184,21 +184,6 @@
   19.11    }
   19.12    return cm_oop->object_size();
   19.13  }
   19.14 -
   19.15 -int constMethodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   19.16 -                                          HeapWord* beg_addr,
   19.17 -                                          HeapWord* end_addr) {
   19.18 -  assert(obj->is_constMethod(), "should be constMethod");
   19.19 -  constMethodOop cm_oop = constMethodOop(obj);
   19.20 -
   19.21 -  oop* const beg_oop = MAX2((oop*)beg_addr, cm_oop->oop_block_beg());
   19.22 -  oop* const end_oop = MIN2((oop*)end_addr, cm_oop->oop_block_end());
   19.23 -  for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
   19.24 -    PSParallelCompact::adjust_pointer(cur_oop);
   19.25 -  }
   19.26 -
   19.27 -  return cm_oop->object_size();
   19.28 -}
   19.29  #endif // SERIALGC
   19.30  
   19.31  // Printing
    20.1 --- a/src/share/vm/oops/constantPoolKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    20.2 +++ b/src/share/vm/oops/constantPoolKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    20.3 @@ -1,5 +1,5 @@
    20.4  /*
    20.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    20.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    20.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.8   *
    20.9   * This code is free software; you can redistribute it and/or modify it
   20.10 @@ -55,26 +55,35 @@
   20.11  constantPoolOop constantPoolKlass::allocate(int length, bool is_conc_safe, TRAPS) {
   20.12    int size = constantPoolOopDesc::object_size(length);
   20.13    KlassHandle klass (THREAD, as_klassOop());
   20.14 -  constantPoolOop c =
   20.15 -    (constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
   20.16 +  assert(klass()->is_oop(), "Can't be null, else handlizing of c below won't work");
   20.17 +  constantPoolHandle pool;
   20.18 +  {
   20.19 +    constantPoolOop c =
   20.20 +      (constantPoolOop)CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
   20.21 +    assert(c->klass_or_null() != NULL, "Handlizing below won't work");
   20.22 +    pool = constantPoolHandle(THREAD, c);
   20.23 +  }
   20.24  
   20.25 -  c->set_length(length);
   20.26 -  c->set_tags(NULL);
   20.27 -  c->set_cache(NULL);
   20.28 -  c->set_operands(NULL);
   20.29 -  c->set_pool_holder(NULL);
   20.30 -  c->set_flags(0);
   20.31 +  pool->set_length(length);
   20.32 +  pool->set_tags(NULL);
   20.33 +  pool->set_cache(NULL);
   20.34 +  pool->set_operands(NULL);
   20.35 +  pool->set_pool_holder(NULL);
   20.36 +  pool->set_flags(0);
   20.37    // only set to non-zero if constant pool is merged by RedefineClasses
   20.38 -  c->set_orig_length(0);
   20.39 +  pool->set_orig_length(0);
   20.40    // if constant pool may change during RedefineClasses, it is created
   20.41    // unsafe for GC concurrent processing.
   20.42 -  c->set_is_conc_safe(is_conc_safe);
   20.43 +  pool->set_is_conc_safe(is_conc_safe);
   20.44    // all fields are initialized; needed for GC
   20.45  
   20.46 +  // Note: because we may be in this "conc_unsafe" state when allocating
   20.47 +  // t_oop below, which may in turn cause a GC, it is imperative that our
   20.48 +  // size be correct, consistent and henceforth stable, at this stage.
   20.49 +  assert(pool->is_oop() && pool->is_parsable(), "Else size() below is unreliable");
   20.50 +  assert(size == pool->size(), "size() is wrong");
   20.51 +
   20.52    // initialize tag array
   20.53 -  // Note: cannot introduce constant pool handle before since it is not
   20.54 -  //       completely initialized (no class) -> would cause assertion failure
   20.55 -  constantPoolHandle pool (THREAD, c);
   20.56    typeArrayOop t_oop = oopFactory::new_permanent_byteArray(length, CHECK_NULL);
   20.57    typeArrayHandle tags (THREAD, t_oop);
   20.58    for (int index = 0; index < length; index++) {
   20.59 @@ -82,6 +91,8 @@
   20.60    }
   20.61    pool->set_tags(tags());
   20.62  
   20.63 +  // Check that our size was stable at its old value.
   20.64 +  assert(size == pool->size(), "size() changed");
   20.65    return pool();
   20.66  }
   20.67  
   20.68 @@ -271,40 +282,6 @@
   20.69    return cp->object_size();
   20.70  }
   20.71  
   20.72 -int
   20.73 -constantPoolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   20.74 -                                       HeapWord* beg_addr, HeapWord* end_addr) {
   20.75 -  assert (obj->is_constantPool(), "obj must be constant pool");
   20.76 -  constantPoolOop cp = (constantPoolOop) obj;
   20.77 -
   20.78 -  // If the tags array is null we are in the middle of allocating this constant
   20.79 -  // pool.
   20.80 -  if (cp->tags() != NULL) {
   20.81 -    oop* base = (oop*)cp->base();
   20.82 -    oop* const beg_oop = MAX2((oop*)beg_addr, base);
   20.83 -    oop* const end_oop = MIN2((oop*)end_addr, base + cp->length());
   20.84 -    const size_t beg_idx = pointer_delta(beg_oop, base, sizeof(oop*));
   20.85 -    const size_t end_idx = pointer_delta(end_oop, base, sizeof(oop*));
   20.86 -    for (size_t cur_idx = beg_idx; cur_idx < end_idx; ++cur_idx, ++base) {
   20.87 -      if (cp->is_pointer_entry(int(cur_idx))) {
   20.88 -        PSParallelCompact::adjust_pointer(base);
   20.89 -      }
   20.90 -    }
   20.91 -  }
   20.92 -
   20.93 -  oop* p;
   20.94 -  p = cp->tags_addr();
   20.95 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   20.96 -  p = cp->cache_addr();
   20.97 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   20.98 -  p = cp->operands_addr();
   20.99 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
  20.100 -  p = cp->pool_holder_addr();
  20.101 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
  20.102 -
  20.103 -  return cp->object_size();
  20.104 -}
  20.105 -
  20.106  void constantPoolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
  20.107    assert(obj->is_constantPool(), "should be constant pool");
  20.108    constantPoolOop cp = (constantPoolOop) obj;
    21.1 --- a/src/share/vm/oops/cpCacheKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    21.2 +++ b/src/share/vm/oops/cpCacheKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    21.3 @@ -1,5 +1,5 @@
    21.4  /*
    21.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    21.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
    21.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.8   *
    21.9   * This code is free software; you can redistribute it and/or modify it
   21.10 @@ -49,43 +49,31 @@
   21.11  
   21.12  
   21.13  constantPoolCacheOop constantPoolCacheKlass::allocate(int length,
   21.14 -                                                      bool is_conc_safe,
   21.15                                                        TRAPS) {
   21.16    // allocate memory
   21.17    int size = constantPoolCacheOopDesc::object_size(length);
   21.18  
   21.19    KlassHandle klass (THREAD, as_klassOop());
   21.20  
   21.21 -  // This is the original code.  The code from permanent_obj_allocate()
   21.22 -  // was in-lined to allow the setting of is_conc_safe before the klass
   21.23 -  // is installed.
   21.24 +  // Commented out below is the original code.  The code from
   21.25 +  // permanent_obj_allocate() was in-lined so that we could
   21.26 +  // set the _length field, necessary to correctly compute its
   21.27 +  // size(), before setting its klass word further below.
   21.28    // constantPoolCacheOop cache = (constantPoolCacheOop)
   21.29    //   CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
   21.30  
   21.31    oop obj = CollectedHeap::permanent_obj_allocate_no_klass_install(klass, size, CHECK_NULL);
   21.32 -  constantPoolCacheOop cache = (constantPoolCacheOop) obj;
   21.33 -  cache->set_is_conc_safe(is_conc_safe);
   21.34 -  // The store to is_conc_safe must be visible before the klass
   21.35 -  // is set.  This should be done safely because _is_conc_safe has
   21.36 -  // been declared volatile.  If there are any problems, consider adding
   21.37 -  // OrderAccess::storestore();
   21.38 -  CollectedHeap::post_allocation_install_obj_klass(klass, obj, size);
   21.39    NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value((HeapWord*) obj,
   21.40                                                                size));
   21.41 +  constantPoolCacheOop cache = (constantPoolCacheOop) obj;
   21.42 +  assert(!UseConcMarkSweepGC || obj->klass_or_null() == NULL,
   21.43 +         "klass should be NULL here when using CMS");
   21.44 +  cache->set_length(length);  // should become visible before klass is set below.
   21.45 +  cache->set_constant_pool(NULL);
   21.46  
   21.47 -  // The length field affects the size of the object.  The allocation
   21.48 -  // above allocates the correct size (see calculation of "size") but
   21.49 -  // the size() method of the constant pool cache oop will not reflect
   21.50 -  // that size until the correct length is set.
   21.51 -  cache->set_length(length);
   21.52 -
   21.53 -  // The store of the length must be visible before is_conc_safe is
   21.54 -  // set to a safe state.
   21.55 -  // This should be done safely because _is_conc_safe has
   21.56 -  // been declared volatile.  If there are any problems, consider adding
   21.57 -  // OrderAccess::storestore();
   21.58 -  cache->set_is_conc_safe(methodOopDesc::IsSafeConc);
   21.59 -  cache->set_constant_pool(NULL);
   21.60 +  OrderAccess::storestore();
   21.61 +  obj->set_klass(klass());
   21.62 +  assert(cache->size() == size, "Incorrect cache->size()");
   21.63    return cache;
   21.64  }
   21.65  
   21.66 @@ -176,11 +164,6 @@
   21.67    return size;
   21.68  }
   21.69  
   21.70 -bool constantPoolCacheKlass::oop_is_conc_safe(oop obj) const {
   21.71 -  assert(obj->is_constantPoolCache(), "should be constant pool");
   21.72 -  return constantPoolCacheOop(obj)->is_conc_safe();
   21.73 -}
   21.74 -
   21.75  #ifndef SERIALGC
   21.76  void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm,
   21.77                                                 oop obj) {
   21.78 @@ -220,25 +203,6 @@
   21.79  
   21.80    return cache->object_size();
   21.81  }
   21.82 -
   21.83 -int
   21.84 -constantPoolCacheKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   21.85 -                                            HeapWord* beg_addr,
   21.86 -                                            HeapWord* end_addr) {
   21.87 -  assert(obj->is_constantPoolCache(), "obj must be constant pool cache");
   21.88 -  constantPoolCacheOop cache = (constantPoolCacheOop)obj;
   21.89 -
   21.90 -  // Iteration over constant pool cache instance variables
   21.91 -  oop* p;
   21.92 -  p = (oop*)cache->constant_pool_addr();
   21.93 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   21.94 -
   21.95 -  // Iteration over constant pool cache entries
   21.96 -  for (int i = 0; i < cache->length(); ++i) {
   21.97 -    cache->entry_at(i)->update_pointers(beg_addr, end_addr);
   21.98 -  }
   21.99 -  return cache->object_size();
  21.100 -}
  21.101  #endif // SERIALGC
  21.102  
  21.103  void constantPoolCacheKlass::oop_print_on(oop obj, outputStream* st) {
    22.1 --- a/src/share/vm/oops/cpCacheKlass.hpp	Fri Feb 11 15:32:03 2011 -0800
    22.2 +++ b/src/share/vm/oops/cpCacheKlass.hpp	Mon Feb 14 22:21:18 2011 -0500
    22.3 @@ -39,7 +39,7 @@
    22.4  
    22.5    // Allocation
    22.6    DEFINE_ALLOCATE_PERMANENT(constantPoolCacheKlass);
    22.7 -  constantPoolCacheOop allocate(int length, bool is_conc_safe, TRAPS);
    22.8 +  constantPoolCacheOop allocate(int length, TRAPS);
    22.9    static klassOop create_klass(TRAPS);
   22.10  
   22.11    // Casting from klassOop
   22.12 @@ -55,7 +55,6 @@
   22.13    // Garbage collection
   22.14    void oop_follow_contents(oop obj);
   22.15    int oop_adjust_pointers(oop obj);
   22.16 -  virtual bool oop_is_conc_safe(oop obj) const;
   22.17  
   22.18    // Parallel Scavenge and Parallel Old
   22.19    PARALLEL_GC_DECLS
    23.1 --- a/src/share/vm/oops/cpCacheOop.cpp	Fri Feb 11 15:32:03 2011 -0800
    23.2 +++ b/src/share/vm/oops/cpCacheOop.cpp	Mon Feb 14 22:21:18 2011 -0500
    23.3 @@ -1,5 +1,5 @@
    23.4  /*
    23.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    23.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
    23.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.8   *
    23.9   * This code is free software; you can redistribute it and/or modify it
   23.10 @@ -368,16 +368,6 @@
   23.11      PSParallelCompact::adjust_pointer((oop*)&_f2);
   23.12    }
   23.13  }
   23.14 -
   23.15 -void ConstantPoolCacheEntry::update_pointers(HeapWord* beg_addr,
   23.16 -                                             HeapWord* end_addr) {
   23.17 -  assert(in_words(size()) == 4, "check code below - may need adjustment");
   23.18 -  // field[1] is always oop or NULL
   23.19 -  PSParallelCompact::adjust_pointer((oop*)&_f1, beg_addr, end_addr);
   23.20 -  if (is_vfinal()) {
   23.21 -    PSParallelCompact::adjust_pointer((oop*)&_f2, beg_addr, end_addr);
   23.22 -  }
   23.23 -}
   23.24  #endif // SERIALGC
   23.25  
   23.26  // RedefineClasses() API support:
    24.1 --- a/src/share/vm/oops/cpCacheOop.hpp	Fri Feb 11 15:32:03 2011 -0800
    24.2 +++ b/src/share/vm/oops/cpCacheOop.hpp	Mon Feb 14 22:21:18 2011 -0500
    24.3 @@ -1,5 +1,5 @@
    24.4  /*
    24.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    24.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
    24.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    24.8   *
    24.9   * This code is free software; you can redistribute it and/or modify it
   24.10 @@ -287,7 +287,6 @@
   24.11  #endif // SERIALGC
   24.12  
   24.13    void update_pointers();
   24.14 -  void update_pointers(HeapWord* beg_addr, HeapWord* end_addr);
   24.15  
   24.16    // RedefineClasses() API support:
   24.17    // If this constantPoolCacheEntry refers to old_method then update it
   24.18 @@ -321,9 +320,6 @@
   24.19   private:
   24.20    int             _length;
   24.21    constantPoolOop _constant_pool;                // the corresponding constant pool
   24.22 -  // If true, safe for concurrent GC processing,
   24.23 -  // Set unconditionally in constantPoolCacheKlass::allocate()
   24.24 -  volatile bool        _is_conc_safe;
   24.25  
   24.26    // Sizing
   24.27    debug_only(friend class ClassVerifier;)
   24.28 @@ -390,12 +386,6 @@
   24.29      return entry_at(primary_index);
   24.30    }
   24.31  
   24.32 -  // GC support
   24.33 -  // If the _length field has not been set, the size of the
   24.34 -  // constantPoolCache cannot be correctly calculated.
   24.35 -  bool is_conc_safe()                            { return _is_conc_safe; }
   24.36 -  void set_is_conc_safe(bool v)                  { _is_conc_safe = v; }
   24.37 -
   24.38    // Code generation
   24.39    static ByteSize base_offset()                  { return in_ByteSize(sizeof(constantPoolCacheOopDesc)); }
   24.40    static ByteSize entry_offset(int raw_index) {
    25.1 --- a/src/share/vm/oops/instanceKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    25.2 +++ b/src/share/vm/oops/instanceKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    25.3 @@ -1,5 +1,5 @@
    25.4  /*
    25.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    25.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    25.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    25.8   *
    25.9   * This code is free software; you can redistribute it and/or modify it
   25.10 @@ -1736,14 +1736,6 @@
   25.11      PSParallelCompact::adjust_pointer(p), \
   25.12      assert_nothing)
   25.13  }
   25.14 -
   25.15 -void instanceKlass::update_static_fields(HeapWord* beg_addr, HeapWord* end_addr) {
   25.16 -  InstanceKlass_BOUNDED_OOP_ITERATE( \
   25.17 -    start_of_static_fields(), static_oop_field_size(), \
   25.18 -    beg_addr, end_addr, \
   25.19 -    PSParallelCompact::adjust_pointer(p), \
   25.20 -    assert_nothing )
   25.21 -}
   25.22  #endif // SERIALGC
   25.23  
   25.24  void instanceKlass::oop_follow_contents(oop obj) {
   25.25 @@ -1876,15 +1868,6 @@
   25.26    return size_helper();
   25.27  }
   25.28  
   25.29 -int instanceKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   25.30 -                                       HeapWord* beg_addr, HeapWord* end_addr) {
   25.31 -  InstanceKlass_BOUNDED_OOP_MAP_ITERATE( \
   25.32 -    obj, beg_addr, end_addr, \
   25.33 -    PSParallelCompact::adjust_pointer(p), \
   25.34 -    assert_nothing)
   25.35 -  return size_helper();
   25.36 -}
   25.37 -
   25.38  void instanceKlass::push_static_fields(PSPromotionManager* pm) {
   25.39    InstanceKlass_OOP_ITERATE( \
   25.40      start_of_static_fields(), static_oop_field_size(), \
    26.1 --- a/src/share/vm/oops/instanceKlass.hpp	Fri Feb 11 15:32:03 2011 -0800
    26.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Mon Feb 14 22:21:18 2011 -0500
    26.3 @@ -1,5 +1,5 @@
    26.4  /*
    26.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    26.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    26.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    26.8   *
    26.9   * This code is free software; you can redistribute it and/or modify it
   26.10 @@ -740,7 +740,6 @@
   26.11    void follow_static_fields(ParCompactionManager* cm);
   26.12    void copy_static_fields(ParCompactionManager* cm);
   26.13    void update_static_fields();
   26.14 -  void update_static_fields(HeapWord* beg_addr, HeapWord* end_addr);
   26.15  #endif // SERIALGC
   26.16  
   26.17    // Naming
    27.1 --- a/src/share/vm/oops/instanceKlassKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    27.2 +++ b/src/share/vm/oops/instanceKlassKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    27.3 @@ -1,5 +1,5 @@
    27.4  /*
    27.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    27.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    27.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    27.8   *
    27.9   * This code is free software; you can redistribute it and/or modify it
   27.10 @@ -353,35 +353,6 @@
   27.11    return ik->object_size();
   27.12  }
   27.13  
   27.14 -int instanceKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   27.15 -                                            HeapWord* beg_addr,
   27.16 -                                            HeapWord* end_addr) {
   27.17 -  assert(obj->is_klass(),"must be a klass");
   27.18 -  assert(klassOop(obj)->klass_part()->oop_is_instance_slow(),
   27.19 -         "must be instance klass");
   27.20 -
   27.21 -  instanceKlass* ik = instanceKlass::cast(klassOop(obj));
   27.22 -  ik->update_static_fields(beg_addr, end_addr);
   27.23 -  ik->vtable()->oop_update_pointers(cm, beg_addr, end_addr);
   27.24 -  ik->itable()->oop_update_pointers(cm, beg_addr, end_addr);
   27.25 -
   27.26 -  oop* const beg_oop = MAX2((oop*)beg_addr, ik->oop_block_beg());
   27.27 -  oop* const end_oop = MIN2((oop*)end_addr, ik->oop_block_end());
   27.28 -  for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
   27.29 -    PSParallelCompact::adjust_pointer(cur_oop);
   27.30 -  }
   27.31 -
   27.32 -  // The oop_map_cache, jni_ids and jni_id_map are allocated from the C heap,
   27.33 -  // and so don't lie within any 'Chunk' boundaries.  Update them when the
   27.34 -  // lowest addressed oop in the instanceKlass 'oop_block' is updated.
   27.35 -  if (beg_oop == ik->oop_block_beg()) {
   27.36 -    OopClosure* closure = PSParallelCompact::adjust_root_pointer_closure();
   27.37 -    iterate_c_heap_oops(ik, closure);
   27.38 -  }
   27.39 -
   27.40 -  klassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
   27.41 -  return ik->object_size();
   27.42 -}
   27.43  #endif // SERIALGC
   27.44  
   27.45  klassOop
    28.1 --- a/src/share/vm/oops/instanceRefKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    28.2 +++ b/src/share/vm/oops/instanceRefKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    28.3 @@ -1,5 +1,5 @@
    28.4  /*
    28.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    28.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    28.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    28.8   *
    28.9   * This code is free software; you can redistribute it and/or modify it
   28.10 @@ -344,33 +344,6 @@
   28.11    }
   28.12    return size_helper();
   28.13  }
   28.14 -
   28.15 -
   28.16 -template <class T> void
   28.17 -specialized_oop_update_pointers(ParCompactionManager* cm, oop obj,
   28.18 -                                HeapWord* beg_addr, HeapWord* end_addr) {
   28.19 -  T* p;
   28.20 -  T* referent_addr = p = (T*)java_lang_ref_Reference::referent_addr(obj);
   28.21 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   28.22 -  T* next_addr = p = (T*)java_lang_ref_Reference::next_addr(obj);
   28.23 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   28.24 -  T* discovered_addr = p = (T*)java_lang_ref_Reference::discovered_addr(obj);
   28.25 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   28.26 -  debug_only(trace_reference_gc("instanceRefKlass::oop_update_ptrs", obj,
   28.27 -                                referent_addr, next_addr, discovered_addr);)
   28.28 -}
   28.29 -
   28.30 -int
   28.31 -instanceRefKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   28.32 -                                      HeapWord* beg_addr, HeapWord* end_addr) {
   28.33 -  instanceKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
   28.34 -  if (UseCompressedOops) {
   28.35 -    specialized_oop_update_pointers<narrowOop>(cm, obj, beg_addr, end_addr);
   28.36 -  } else {
   28.37 -    specialized_oop_update_pointers<oop>(cm, obj, beg_addr, end_addr);
   28.38 -  }
   28.39 -  return size_helper();
   28.40 -}
   28.41  #endif // SERIALGC
   28.42  
   28.43  void instanceRefKlass::update_nonstatic_oop_maps(klassOop k) {
    29.1 --- a/src/share/vm/oops/klassKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    29.2 +++ b/src/share/vm/oops/klassKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    29.3 @@ -1,5 +1,5 @@
    29.4  /*
    29.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    29.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    29.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    29.8   *
    29.9   * This code is free software; you can redistribute it and/or modify it
   29.10 @@ -188,19 +188,6 @@
   29.11  
   29.12    return oop_size(obj);
   29.13  }
   29.14 -
   29.15 -int klassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   29.16 -                                    HeapWord* beg_addr, HeapWord* end_addr) {
   29.17 -  Klass* k = Klass::cast(klassOop(obj));
   29.18 -
   29.19 -  oop* const beg_oop = MAX2((oop*)beg_addr, k->oop_block_beg());
   29.20 -  oop* const end_oop = MIN2((oop*)end_addr, k->oop_block_end());
   29.21 -  for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
   29.22 -    PSParallelCompact::adjust_pointer(cur_oop);
   29.23 -  }
   29.24 -
   29.25 -  return oop_size(obj);
   29.26 -}
   29.27  #endif // SERIALGC
   29.28  
   29.29  
    30.1 --- a/src/share/vm/oops/klassPS.hpp	Fri Feb 11 15:32:03 2011 -0800
    30.2 +++ b/src/share/vm/oops/klassPS.hpp	Mon Feb 14 22:21:18 2011 -0500
    30.3 @@ -1,5 +1,5 @@
    30.4  /*
    30.5 - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
    30.6 + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
    30.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    30.8   *
    30.9   * This code is free software; you can redistribute it and/or modify it
   30.10 @@ -37,17 +37,13 @@
   30.11     objects that do (or may) cross chunk boundaries; it updates only those   \
   30.12     oops that are in the region [beg_addr, end_addr).  */                    \
   30.13    virtual void oop_follow_contents(ParCompactionManager* cm, oop obj);      \
   30.14 -  virtual int  oop_update_pointers(ParCompactionManager* cm, oop obj);      \
   30.15 -  virtual int  oop_update_pointers(ParCompactionManager* cm, oop obj,       \
   30.16 -                                   HeapWord* beg_addr, HeapWord* end_addr);
   30.17 +  virtual int  oop_update_pointers(ParCompactionManager* cm, oop obj);
   30.18  
   30.19  // Pure virtual version for klass.hpp
   30.20  #define PARALLEL_GC_DECLS_PV \
   30.21    virtual void oop_push_contents(PSPromotionManager* pm, oop obj) = 0;      \
   30.22    virtual void oop_follow_contents(ParCompactionManager* cm, oop obj) = 0;  \
   30.23 -  virtual int  oop_update_pointers(ParCompactionManager* cm, oop obj) = 0;  \
   30.24 -  virtual int  oop_update_pointers(ParCompactionManager* cm, oop obj,       \
   30.25 -                                   HeapWord* beg_addr, HeapWord* end_addr) = 0;
   30.26 +  virtual int  oop_update_pointers(ParCompactionManager* cm, oop obj) = 0;
   30.27  #else  // SERIALGC
   30.28  #define PARALLEL_GC_DECLS
   30.29  #define PARALLEL_GC_DECLS_PV
    31.1 --- a/src/share/vm/oops/klassVtable.cpp	Fri Feb 11 15:32:03 2011 -0800
    31.2 +++ b/src/share/vm/oops/klassVtable.cpp	Mon Feb 14 22:21:18 2011 -0500
    31.3 @@ -1,5 +1,5 @@
    31.4  /*
    31.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    31.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    31.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    31.8   *
    31.9   * This code is free software; you can redistribute it and/or modify it
   31.10 @@ -677,25 +677,6 @@
   31.11      PSParallelCompact::adjust_pointer(adr_method_at(i));
   31.12    }
   31.13  }
   31.14 -
   31.15 -void klassVtable::oop_update_pointers(ParCompactionManager* cm,
   31.16 -                                      HeapWord* beg_addr, HeapWord* end_addr) {
   31.17 -  const int n = length();
   31.18 -  const int entry_size = vtableEntry::size();
   31.19 -
   31.20 -  int beg_idx = 0;
   31.21 -  HeapWord* const method_0 = (HeapWord*)adr_method_at(0);
   31.22 -  if (beg_addr > method_0) {
   31.23 -    // it's safe to use cast, as we have guarantees on vtable size to be sane
   31.24 -    beg_idx = int((pointer_delta(beg_addr, method_0) + entry_size - 1) / entry_size);
   31.25 -  }
   31.26 -
   31.27 -  oop* const beg_oop = adr_method_at(beg_idx);
   31.28 -  oop* const end_oop = MIN2((oop*)end_addr, adr_method_at(n));
   31.29 -  for (oop* cur_oop = beg_oop; cur_oop < end_oop; cur_oop += entry_size) {
   31.30 -    PSParallelCompact::adjust_pointer(cur_oop);
   31.31 -  }
   31.32 -}
   31.33  #endif // SERIALGC
   31.34  
   31.35  // Iterators
   31.36 @@ -820,25 +801,6 @@
   31.37      ime++;
   31.38    }
   31.39  }
   31.40 -
   31.41 -void klassItable::oop_update_pointers(ParCompactionManager* cm,
   31.42 -                                      HeapWord* beg_addr, HeapWord* end_addr) {
   31.43 -  // offset table
   31.44 -  itableOffsetEntry* ioe = offset_entry(0);
   31.45 -  for(int i = 0; i < _size_offset_table; i++) {
   31.46 -    oop* p = (oop*)&ioe->_interface;
   31.47 -    PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   31.48 -    ioe++;
   31.49 -  }
   31.50 -
   31.51 -  // method table
   31.52 -  itableMethodEntry* ime = method_entry(0);
   31.53 -  for(int j = 0; j < _size_method_table; j++) {
   31.54 -    oop* p = (oop*)&ime->_method;
   31.55 -    PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   31.56 -    ime++;
   31.57 -  }
   31.58 -}
   31.59  #endif // SERIALGC
   31.60  
   31.61  // Iterators
    32.1 --- a/src/share/vm/oops/klassVtable.hpp	Fri Feb 11 15:32:03 2011 -0800
    32.2 +++ b/src/share/vm/oops/klassVtable.hpp	Mon Feb 14 22:21:18 2011 -0500
    32.3 @@ -1,5 +1,5 @@
    32.4  /*
    32.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    32.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    32.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    32.8   *
    32.9   * This code is free software; you can redistribute it and/or modify it
   32.10 @@ -99,8 +99,6 @@
   32.11    // Parallel Old
   32.12    void oop_follow_contents(ParCompactionManager* cm);
   32.13    void oop_update_pointers(ParCompactionManager* cm);
   32.14 -  void oop_update_pointers(ParCompactionManager* cm,
   32.15 -                           HeapWord* beg_addr, HeapWord* end_addr);
   32.16  #endif // SERIALGC
   32.17  
   32.18    // Iterators
   32.19 @@ -295,8 +293,6 @@
   32.20    // Parallel Old
   32.21    void oop_follow_contents(ParCompactionManager* cm);
   32.22    void oop_update_pointers(ParCompactionManager* cm);
   32.23 -  void oop_update_pointers(ParCompactionManager* cm,
   32.24 -                           HeapWord* beg_addr, HeapWord* end_addr);
   32.25  #endif // SERIALGC
   32.26  
   32.27    // Iterators
    33.1 --- a/src/share/vm/oops/methodDataKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    33.2 +++ b/src/share/vm/oops/methodDataKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    33.3 @@ -1,5 +1,5 @@
    33.4  /*
    33.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    33.6 + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    33.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    33.8   *
    33.9   * This code is free software; you can redistribute it and/or modify it
   33.10 @@ -188,25 +188,6 @@
   33.11    }
   33.12    return m->object_size();
   33.13  }
   33.14 -
   33.15 -int
   33.16 -methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   33.17 -                                     HeapWord* beg_addr, HeapWord* end_addr) {
   33.18 -  assert(obj->is_methodData(), "should be method data");
   33.19 -
   33.20 -  oop* p;
   33.21 -  methodDataOop m = methodDataOop(obj);
   33.22 -
   33.23 -  p = m->adr_method();
   33.24 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   33.25 -
   33.26 -  ResourceMark rm;
   33.27 -  ProfileData* data;
   33.28 -  for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
   33.29 -    data->update_pointers(beg_addr, end_addr);
   33.30 -  }
   33.31 -  return m->object_size();
   33.32 -}
   33.33  #endif // SERIALGC
   33.34  
   33.35  #ifndef PRODUCT
    34.1 --- a/src/share/vm/oops/methodDataOop.cpp	Fri Feb 11 15:32:03 2011 -0800
    34.2 +++ b/src/share/vm/oops/methodDataOop.cpp	Mon Feb 14 22:21:18 2011 -0500
    34.3 @@ -271,17 +271,6 @@
    34.4      }
    34.5    }
    34.6  }
    34.7 -
    34.8 -void ReceiverTypeData::update_pointers(HeapWord* beg_addr, HeapWord* end_addr) {
    34.9 -  // The loop bounds could be computed based on beg_addr/end_addr and the
   34.10 -  // boundary test hoisted outside the loop (see klassVTable for an example);
   34.11 -  // however, row_limit() is small enough (2) to make that less efficient.
   34.12 -  for (uint row = 0; row < row_limit(); row++) {
   34.13 -    if (receiver_unchecked(row) != NULL) {
   34.14 -      PSParallelCompact::adjust_pointer(adr_receiver(row), beg_addr, end_addr);
   34.15 -    }
   34.16 -  }
   34.17 -}
   34.18  #endif // SERIALGC
   34.19  
   34.20  #ifndef PRODUCT
    35.1 --- a/src/share/vm/oops/methodDataOop.hpp	Fri Feb 11 15:32:03 2011 -0800
    35.2 +++ b/src/share/vm/oops/methodDataOop.hpp	Mon Feb 14 22:21:18 2011 -0500
    35.3 @@ -1,5 +1,5 @@
    35.4  /*
    35.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    35.6 + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    35.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    35.8   *
    35.9   * This code is free software; you can redistribute it and/or modify it
   35.10 @@ -452,7 +452,6 @@
   35.11    // Parallel old support
   35.12    virtual void follow_contents(ParCompactionManager* cm) {}
   35.13    virtual void update_pointers() {}
   35.14 -  virtual void update_pointers(HeapWord* beg_addr, HeapWord* end_addr) {}
   35.15  #endif // SERIALGC
   35.16  
   35.17    // CI translation: ProfileData can represent both MethodDataOop data
   35.18 @@ -748,7 +747,6 @@
   35.19    // Parallel old support
   35.20    virtual void follow_contents(ParCompactionManager* cm);
   35.21    virtual void update_pointers();
   35.22 -  virtual void update_pointers(HeapWord* beg_addr, HeapWord* end_addr);
   35.23  #endif // SERIALGC
   35.24  
   35.25    oop* adr_receiver(uint row) {
    36.1 --- a/src/share/vm/oops/methodKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    36.2 +++ b/src/share/vm/oops/methodKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    36.3 @@ -1,5 +1,5 @@
    36.4  /*
    36.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    36.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    36.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    36.8   *
    36.9   * This code is free software; you can redistribute it and/or modify it
   36.10 @@ -214,27 +214,6 @@
   36.11  #endif // COMPILER2
   36.12    return m->object_size();
   36.13  }
   36.14 -
   36.15 -int methodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   36.16 -                                     HeapWord* beg_addr, HeapWord* end_addr) {
   36.17 -  assert(obj->is_method(), "should be method");
   36.18 -
   36.19 -  oop* p;
   36.20 -  methodOop m = methodOop(obj);
   36.21 -
   36.22 -  p = m->adr_constMethod();
   36.23 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   36.24 -  p = m->adr_constants();
   36.25 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   36.26 -
   36.27 -#ifdef COMPILER2
   36.28 -  if (m->method_data() != NULL) {
   36.29 -    p = m->adr_method_data();
   36.30 -    PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   36.31 -  }
   36.32 -#endif // COMPILER2
   36.33 -  return m->object_size();
   36.34 -}
   36.35  #endif // SERIALGC
   36.36  
   36.37  #ifndef PRODUCT
    37.1 --- a/src/share/vm/oops/methodOop.cpp	Fri Feb 11 15:32:03 2011 -0800
    37.2 +++ b/src/share/vm/oops/methodOop.cpp	Mon Feb 14 22:21:18 2011 -0500
    37.3 @@ -985,9 +985,11 @@
    37.4                                                IsUnsafeConc,
    37.5                                                CHECK_(methodHandle()));
    37.6    methodHandle newm (THREAD, newm_oop);
    37.7 +  NOT_PRODUCT(int nmsz = newm->is_parsable() ? newm->size() : -1;)
    37.8    int new_method_size = newm->method_size();
    37.9    // Create a shallow copy of methodOopDesc part, but be careful to preserve the new constMethodOop
   37.10    constMethodOop newcm = newm->constMethod();
   37.11 +  NOT_PRODUCT(int ncmsz = newcm->is_parsable() ? newcm->size() : -1;)
   37.12    int new_const_method_size = newm->constMethod()->object_size();
   37.13  
   37.14    memcpy(newm(), m(), sizeof(methodOopDesc));
   37.15 @@ -999,9 +1001,19 @@
   37.16    // or concurrent marking but those phases will be correct.  Setting and
   37.17    // resetting is done in preference to a careful copying into newcm to
   37.18    // avoid having to know the precise layout of a constMethodOop.
   37.19 -  m->constMethod()->set_is_conc_safe(false);
   37.20 +  m->constMethod()->set_is_conc_safe(oopDesc::IsUnsafeConc);
   37.21 +  assert(m->constMethod()->is_parsable(), "Should remain parsable");
   37.22 +
   37.23 +  // NOTE: this is a reachable object that transiently signals "conc_unsafe"
   37.24 +  // However, no allocations are done during this window
   37.25 +  // during which it is tagged conc_unsafe, so we are assured that any concurrent
   37.26 +  // thread will not wait forever for the object to revert to "conc_safe".
   37.27 +  // Further, any such conc_unsafe object will indicate a stable size
   37.28 +  // through the transition.
   37.29    memcpy(newcm, m->constMethod(), sizeof(constMethodOopDesc));
   37.30 -  m->constMethod()->set_is_conc_safe(true);
   37.31 +  m->constMethod()->set_is_conc_safe(oopDesc::IsSafeConc);
   37.32 +  assert(m->constMethod()->is_parsable(), "Should remain parsable");
   37.33 +
   37.34    // Reset correct method/const method, method size, and parameter info
   37.35    newcm->set_method(newm());
   37.36    newm->set_constMethod(newcm);
   37.37 @@ -1035,6 +1047,8 @@
   37.38  
   37.39    // Only set is_conc_safe to true when changes to newcm are
   37.40    // complete.
   37.41 +  assert(!newm->is_parsable()  || nmsz  < 0 || newm->size()  == nmsz,  "newm->size()  inconsistency");
   37.42 +  assert(!newcm->is_parsable() || ncmsz < 0 || newcm->size() == ncmsz, "newcm->size() inconsistency");
   37.43    newcm->set_is_conc_safe(true);
   37.44    return newm;
   37.45  }
    38.1 --- a/src/share/vm/oops/methodOop.hpp	Fri Feb 11 15:32:03 2011 -0800
    38.2 +++ b/src/share/vm/oops/methodOop.hpp	Mon Feb 14 22:21:18 2011 -0500
    38.3 @@ -144,9 +144,6 @@
    38.4  
    38.5   public:
    38.6  
    38.7 -  static const bool IsUnsafeConc         = false;
    38.8 -  static const bool IsSafeConc           = true;
    38.9 -
   38.10    // accessors for instance variables
   38.11    constMethodOop constMethod() const             { return _constMethod; }
   38.12    void set_constMethod(constMethodOop xconst)    { oop_store_without_check((oop*)&_constMethod, (oop)xconst); }
    39.1 --- a/src/share/vm/oops/objArrayKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    39.2 +++ b/src/share/vm/oops/objArrayKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    39.3 @@ -470,16 +470,6 @@
    39.4    ObjArrayKlass_OOP_ITERATE(a, p, PSParallelCompact::adjust_pointer(p))
    39.5    return a->object_size();
    39.6  }
    39.7 -
    39.8 -int objArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
    39.9 -                                       HeapWord* beg_addr, HeapWord* end_addr) {
   39.10 -  assert (obj->is_objArray(), "obj must be obj array");
   39.11 -  objArrayOop a = objArrayOop(obj);
   39.12 -  ObjArrayKlass_BOUNDED_OOP_ITERATE( \
   39.13 -     a, p, beg_addr, end_addr, \
   39.14 -     PSParallelCompact::adjust_pointer(p))
   39.15 -  return a->object_size();
   39.16 -}
   39.17  #endif // SERIALGC
   39.18  
   39.19  // JVM support
    40.1 --- a/src/share/vm/oops/objArrayKlassKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    40.2 +++ b/src/share/vm/oops/objArrayKlassKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    40.3 @@ -1,5 +1,5 @@
    40.4  /*
    40.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    40.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    40.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    40.8   *
    40.9   * This code is free software; you can redistribute it and/or modify it
   40.10 @@ -254,22 +254,6 @@
   40.11  
   40.12    return arrayKlassKlass::oop_update_pointers(cm, obj);
   40.13  }
   40.14 -
   40.15 -int objArrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   40.16 -                                            HeapWord* beg_addr,
   40.17 -                                            HeapWord* end_addr) {
   40.18 -  assert(obj->is_klass(), "must be klass");
   40.19 -  assert(klassOop(obj)->klass_part()->oop_is_objArray_slow(), "must be obj array");
   40.20 -
   40.21 -  oop* p;
   40.22 -  objArrayKlass* oak = objArrayKlass::cast((klassOop)obj);
   40.23 -  p = oak->element_klass_addr();
   40.24 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   40.25 -  p = oak->bottom_klass_addr();
   40.26 -  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
   40.27 -
   40.28 -  return arrayKlassKlass::oop_update_pointers(cm, obj, beg_addr, end_addr);
   40.29 -}
   40.30  #endif // SERIALGC
   40.31  
   40.32  #ifndef PRODUCT
    41.1 --- a/src/share/vm/oops/oop.hpp	Fri Feb 11 15:32:03 2011 -0800
    41.2 +++ b/src/share/vm/oops/oop.hpp	Mon Feb 14 22:21:18 2011 -0500
    41.3 @@ -1,5 +1,5 @@
    41.4  /*
    41.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    41.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    41.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    41.8   *
    41.9   * This code is free software; you can redistribute it and/or modify it
   41.10 @@ -71,6 +71,11 @@
   41.11    static BarrierSet* _bs;
   41.12  
   41.13   public:
   41.14 +  enum ConcSafeType {
   41.15 +    IsUnsafeConc = false,
   41.16 +    IsSafeConc   = true
   41.17 +  };
   41.18 +
   41.19    markOop  mark() const         { return _mark; }
   41.20    markOop* mark_addr() const    { return (markOop*) &_mark; }
   41.21  
   41.22 @@ -317,13 +322,6 @@
   41.23  
   41.24    // Parallel Old
   41.25    void update_contents(ParCompactionManager* cm);
   41.26 -  void update_contents(ParCompactionManager* cm,
   41.27 -                       HeapWord* begin_limit,
   41.28 -                       HeapWord* end_limit);
   41.29 -  void update_contents(ParCompactionManager* cm,
   41.30 -                       klassOop old_klass,
   41.31 -                       HeapWord* begin_limit,
   41.32 -                       HeapWord* end_limit);
   41.33  
   41.34    void follow_contents(ParCompactionManager* cm);
   41.35    void follow_header(ParCompactionManager* cm);
   41.36 @@ -364,7 +362,6 @@
   41.37  #ifndef SERIALGC
   41.38    // Parallel old
   41.39    void update_header();
   41.40 -  void update_header(HeapWord* beg_addr, HeapWord* end_addr);
   41.41  #endif // SERIALGC
   41.42  
   41.43    // mark-sweep support
    42.1 --- a/src/share/vm/oops/oop.pcgc.inline.hpp	Fri Feb 11 15:32:03 2011 -0800
    42.2 +++ b/src/share/vm/oops/oop.pcgc.inline.hpp	Mon Feb 14 22:21:18 2011 -0500
    42.3 @@ -1,5 +1,5 @@
    42.4  /*
    42.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    42.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    42.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    42.8   *
    42.9   * This code is free software; you can redistribute it and/or modify it
   42.10 @@ -57,41 +57,6 @@
   42.11    // Else skip it.  The typeArrayKlass in the header never needs scavenging.
   42.12  }
   42.13  
   42.14 -inline void oopDesc::update_contents(ParCompactionManager* cm,
   42.15 -                                     HeapWord* begin_limit,
   42.16 -                                     HeapWord* end_limit) {
   42.17 -  // The klass field must be updated before anything else
   42.18 -  // can be done.
   42.19 -  debug_only(klassOopDesc* original_klass = klass());
   42.20 -
   42.21 -  update_contents(cm, klass(), begin_limit, end_limit);
   42.22 -}
   42.23 -
   42.24 -inline void oopDesc::update_contents(ParCompactionManager* cm,
   42.25 -                                     klassOop old_klass,
   42.26 -                                     HeapWord* begin_limit,
   42.27 -                                     HeapWord* end_limit) {
   42.28 -
   42.29 -  klassOop updated_klass =
   42.30 -    PSParallelCompact::summary_data().calc_new_klass(old_klass);
   42.31 -
   42.32 -  // Needs to be boundary aware for the 64 bit case
   42.33 -  // update_header();
   42.34 -  // The klass has moved.  Is the location of the klass
   42.35 -  // within the limits?
   42.36 -  if ((((HeapWord*)&_metadata._klass) >= begin_limit) &&
   42.37 -      (((HeapWord*)&_metadata._klass) < end_limit)) {
   42.38 -    set_klass(updated_klass);
   42.39 -  }
   42.40 -
   42.41 -  Klass* klass = updated_klass->klass_part();
   42.42 -  if (!klass->oop_is_typeArray()) {
   42.43 -    // It might contain oops beyond the header, so take the virtual call.
   42.44 -    klass->oop_update_pointers(cm, this, begin_limit, end_limit);
   42.45 -  }
   42.46 -  // Else skip it.  The typeArrayKlass in the header never needs scavenging.
   42.47 -}
   42.48 -
   42.49  inline void oopDesc::follow_contents(ParCompactionManager* cm) {
   42.50    assert (PSParallelCompact::mark_bitmap()->is_marked(this),
   42.51      "should be marked");
   42.52 @@ -140,13 +105,4 @@
   42.53    }
   42.54  }
   42.55  
   42.56 -inline void oopDesc::update_header(HeapWord* beg_addr, HeapWord* end_addr) {
   42.57 -  if (UseCompressedOops) {
   42.58 -    PSParallelCompact::adjust_pointer(compressed_klass_addr(),
   42.59 -                                      beg_addr, end_addr);
   42.60 -  } else {
   42.61 -    PSParallelCompact::adjust_pointer(klass_addr(), beg_addr, end_addr);
   42.62 -  }
   42.63 -}
   42.64 -
   42.65  #endif // SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP
    43.1 --- a/src/share/vm/oops/typeArrayKlass.cpp	Fri Feb 11 15:32:03 2011 -0800
    43.2 +++ b/src/share/vm/oops/typeArrayKlass.cpp	Mon Feb 14 22:21:18 2011 -0500
    43.3 @@ -250,13 +250,6 @@
    43.4    assert(obj->is_typeArray(),"must be a type array");
    43.5    return typeArrayOop(obj)->object_size();
    43.6  }
    43.7 -
    43.8 -int
    43.9 -typeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
   43.10 -                                    HeapWord* beg_addr, HeapWord* end_addr) {
   43.11 -  assert(obj->is_typeArray(),"must be a type array");
   43.12 -  return typeArrayOop(obj)->object_size();
   43.13 -}
   43.14  #endif // SERIALGC
   43.15  
   43.16  void typeArrayKlass::initialize(TRAPS) {
    44.1 --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp	Fri Feb 11 15:32:03 2011 -0800
    44.2 +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp	Mon Feb 14 22:21:18 2011 -0500
    44.3 @@ -1247,12 +1247,12 @@
    44.4    // Constant pools are not easily reused so we allocate a new one
    44.5    // each time.
    44.6    // merge_cp is created unsafe for concurrent GC processing.  It
    44.7 -  // should be marked safe before discarding it because, even if
    44.8 -  // garbage.  If it crosses a card boundary, it may be scanned
    44.9 +  // should be marked safe before discarding it. Even though
   44.10 +  // garbage,  if it crosses a card boundary, it may be scanned
   44.11    // in order to find the start of the first complete object on the card.
   44.12    constantPoolHandle merge_cp(THREAD,
   44.13      oopFactory::new_constantPool(merge_cp_length,
   44.14 -                                 methodOopDesc::IsUnsafeConc,
   44.15 +                                 oopDesc::IsUnsafeConc,
   44.16                                   THREAD));
   44.17    int orig_length = old_cp->orig_length();
   44.18    if (orig_length == 0) {
   44.19 @@ -2343,7 +2343,7 @@
   44.20      // sized constant pool with the klass to save space.
   44.21      constantPoolHandle smaller_cp(THREAD,
   44.22        oopFactory::new_constantPool(scratch_cp_length,
   44.23 -                                   methodOopDesc::IsUnsafeConc,
   44.24 +                                   oopDesc::IsUnsafeConc,
   44.25                                     THREAD));
   44.26      // preserve orig_length() value in the smaller copy
   44.27      int orig_length = scratch_cp->orig_length();
    45.1 --- a/src/share/vm/prims/methodHandleWalk.cpp	Fri Feb 11 15:32:03 2011 -0800
    45.2 +++ b/src/share/vm/prims/methodHandleWalk.cpp	Mon Feb 14 22:21:18 2011 -0500
    45.3 @@ -1134,8 +1134,9 @@
    45.4  
    45.5  constantPoolHandle MethodHandleCompiler::get_constant_pool(TRAPS) const {
    45.6    constantPoolHandle nullHandle;
    45.7 -  bool is_conc_safe = true;
    45.8 -  constantPoolOop cpool_oop = oopFactory::new_constantPool(_constants.length(), is_conc_safe, CHECK_(nullHandle));
    45.9 +  constantPoolOop cpool_oop = oopFactory::new_constantPool(_constants.length(),
   45.10 +                                                           oopDesc::IsSafeConc,
   45.11 +                                                           CHECK_(nullHandle));
   45.12    constantPoolHandle cpool(THREAD, cpool_oop);
   45.13  
   45.14    // Fill the real constant pool skipping the zero element.
   45.15 @@ -1180,10 +1181,9 @@
   45.16    else
   45.17      flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL | JVM_ACC_SYNTHETIC);
   45.18  
   45.19 -  bool is_conc_safe = true;
   45.20    methodOop m_oop = oopFactory::new_method(bytecode_length(),
   45.21                                             accessFlags_from(flags_bits),
   45.22 -                                           0, 0, 0, is_conc_safe, CHECK_(nullHandle));
   45.23 +                                           0, 0, 0, oopDesc::IsSafeConc, CHECK_(nullHandle));
   45.24    methodHandle m(THREAD, m_oop);
   45.25    m_oop = NULL;  // oop not GC safe
   45.26  
    46.1 --- a/src/share/vm/runtime/arguments.cpp	Fri Feb 11 15:32:03 2011 -0800
    46.2 +++ b/src/share/vm/runtime/arguments.cpp	Mon Feb 14 22:21:18 2011 -0500
    46.3 @@ -1410,7 +1410,7 @@
    46.4    // by ergonomics.
    46.5    if (MaxHeapSize <= max_heap_for_compressed_oops()) {
    46.6  #if !defined(COMPILER1) || defined(TIERED)
    46.7 -    if (FLAG_IS_DEFAULT(UseCompressedOops) && !UseG1GC) {
    46.8 +    if (FLAG_IS_DEFAULT(UseCompressedOops)) {
    46.9        FLAG_SET_ERGO(bool, UseCompressedOops, true);
   46.10      }
   46.11  #endif
    47.1 --- a/src/share/vm/services/heapDumper.cpp	Fri Feb 11 15:32:03 2011 -0800
    47.2 +++ b/src/share/vm/services/heapDumper.cpp	Mon Feb 14 22:21:18 2011 -0500
    47.3 @@ -1,5 +1,5 @@
    47.4  /*
    47.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    47.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    47.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    47.8   *
    47.9   * This code is free software; you can redistribute it and/or modify it
   47.10 @@ -1397,6 +1397,7 @@
   47.11   public:
   47.12    VM_HeapDumper(DumpWriter* writer, bool gc_before_heap_dump, bool oome) :
   47.13      VM_GC_Operation(0 /* total collections,      dummy, ignored */,
   47.14 +                    GCCause::_heap_dump /* GC Cause */,
   47.15                      0 /* total full collections, dummy, ignored */,
   47.16                      gc_before_heap_dump) {
   47.17      _local_writer = writer;
    48.1 --- a/src/share/vm/services/management.cpp	Fri Feb 11 15:32:03 2011 -0800
    48.2 +++ b/src/share/vm/services/management.cpp	Mon Feb 14 22:21:18 2011 -0500
    48.3 @@ -1311,7 +1311,7 @@
    48.4      if (locked_monitors) {
    48.5        // Constructs Object[] and int[] to contain the object monitor and the stack depth
    48.6        // where the thread locked it
    48.7 -      objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, CHECK_NULL);
    48.8 +      objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, false, CHECK_NULL);
    48.9        objArrayHandle mh(THREAD, array);
   48.10        monitors_array = mh;
   48.11  
   48.12 @@ -1353,7 +1353,7 @@
   48.13        GrowableArray<instanceOop>* locks = (tcl != NULL ? tcl->owned_locks() : NULL);
   48.14        int num_locked_synchronizers = (locks != NULL ? locks->length() : 0);
   48.15  
   48.16 -      objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, CHECK_NULL);
   48.17 +      objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, false, CHECK_NULL);
   48.18        objArrayHandle sh(THREAD, array);
   48.19        synchronizers_array = sh;
   48.20  

mercurial