7112997: Remove obsolete code ResetObjectsClosure and VerifyUpdateClosure

Tue, 22 Nov 2011 14:59:34 -0800

author
jmasa
date
Tue, 22 Nov 2011 14:59:34 -0800
changeset 3298
7913e93dca52
parent 3297
ea640b5e949a
child 3299
1bbf5b6fb7b0
child 3322
4406629aa157

7112997: Remove obsolete code ResetObjectsClosure and VerifyUpdateClosure
Summary: Remove obsolete code.
Reviewed-by: brutisso, ysr, jcoomes

src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/shared/markSweep.hpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/shared/markSweep.inline.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Tue Nov 22 14:18:39 2011 -0800
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Tue Nov 22 14:59:34 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2005, 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 @@ -159,16 +159,6 @@
    1.11           (action() == ParCompactionManager::UpdateAndCopy);
    1.12  }
    1.13  
    1.14 -bool ParCompactionManager::should_verify_only() {
    1.15 -  assert(action() != NotValid, "Action is not set");
    1.16 -  return action() == ParCompactionManager::VerifyUpdate;
    1.17 -}
    1.18 -
    1.19 -bool ParCompactionManager::should_reset_only() {
    1.20 -  assert(action() != NotValid, "Action is not set");
    1.21 -  return action() == ParCompactionManager::ResetObjects;
    1.22 -}
    1.23 -
    1.24  void ParCompactionManager::region_list_push(uint list_index,
    1.25                                              size_t region_index) {
    1.26    region_list(list_index)->push(region_index);
     2.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp	Tue Nov 22 14:18:39 2011 -0800
     2.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp	Tue Nov 22 14:59:34 2011 -0800
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -59,8 +59,6 @@
    2.11      Copy,
    2.12      UpdateAndCopy,
    2.13      CopyAndUpdate,
    2.14 -    VerifyUpdate,
    2.15 -    ResetObjects,
    2.16      NotValid
    2.17    };
    2.18  // ------------------------  End don't putback if not needed
    2.19 @@ -176,8 +174,6 @@
    2.20  
    2.21    bool should_update();
    2.22    bool should_copy();
    2.23 -  bool should_verify_only();
    2.24 -  bool should_reset_only();
    2.25  
    2.26    Stack<Klass*>* revisit_klass_stack() { return &_revisit_klass_stack; }
    2.27    Stack<DataLayout*>* revisit_mdo_stack() { return &_revisit_mdo_stack; }
     3.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Tue Nov 22 14:18:39 2011 -0800
     3.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Tue Nov 22 14:59:34 2011 -0800
     3.3 @@ -3370,20 +3370,7 @@
     3.4    HeapWord* beg_addr = sp->bottom();
     3.5    HeapWord* end_addr = sp->top();
     3.6  
     3.7 -#ifdef ASSERT
     3.8    assert(beg_addr <= dp_addr && dp_addr <= end_addr, "bad dense prefix");
     3.9 -  if (cm->should_verify_only()) {
    3.10 -    VerifyUpdateClosure verify_update(cm, sp);
    3.11 -    bitmap->iterate(&verify_update, beg_addr, end_addr);
    3.12 -    return;
    3.13 -  }
    3.14 -
    3.15 -  if (cm->should_reset_only()) {
    3.16 -    ResetObjectsClosure reset_objects(cm);
    3.17 -    bitmap->iterate(&reset_objects, beg_addr, end_addr);
    3.18 -    return;
    3.19 -  }
    3.20 -#endif
    3.21  
    3.22    const size_t beg_region = sd.addr_to_region_idx(beg_addr);
    3.23    const size_t dp_region = sd.addr_to_region_idx(dp_addr);
    3.24 @@ -3502,35 +3489,6 @@
    3.25    return ParMarkBitMap::incomplete;
    3.26  }
    3.27  
    3.28 -// Verify the new location using the forwarding pointer
    3.29 -// from MarkSweep::mark_sweep_phase2().  Set the mark_word
    3.30 -// to the initial value.
    3.31 -ParMarkBitMapClosure::IterationStatus
    3.32 -PSParallelCompact::VerifyUpdateClosure::do_addr(HeapWord* addr, size_t words) {
    3.33 -  // The second arg (words) is not used.
    3.34 -  oop obj = (oop) addr;
    3.35 -  HeapWord* forwarding_ptr = (HeapWord*) obj->mark()->decode_pointer();
    3.36 -  HeapWord* new_pointer = summary_data().calc_new_pointer(obj);
    3.37 -  if (forwarding_ptr == NULL) {
    3.38 -    // The object is dead or not moving.
    3.39 -    assert(bitmap()->is_unmarked(obj) || (new_pointer == (HeapWord*) obj),
    3.40 -           "Object liveness is wrong.");
    3.41 -    return ParMarkBitMap::incomplete;
    3.42 -  }
    3.43 -  assert(HeapMaximumCompactionInterval > 1 || MarkSweepAlwaysCompactCount > 1 ||
    3.44 -         forwarding_ptr == new_pointer, "new location is incorrect");
    3.45 -  return ParMarkBitMap::incomplete;
    3.46 -}
    3.47 -
    3.48 -// Reset objects modified for debug checking.
    3.49 -ParMarkBitMapClosure::IterationStatus
    3.50 -PSParallelCompact::ResetObjectsClosure::do_addr(HeapWord* addr, size_t words) {
    3.51 -  // The second arg (words) is not used.
    3.52 -  oop obj = (oop) addr;
    3.53 -  obj->init_mark();
    3.54 -  return ParMarkBitMap::incomplete;
    3.55 -}
    3.56 -
    3.57  // Prepare for compaction.  This method is executed once
    3.58  // (i.e., by a single thread) before compaction.
    3.59  // Save the updated location of the intArrayKlassObj for
     4.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Tue Nov 22 14:18:39 2011 -0800
     4.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp	Tue Nov 22 14:59:34 2011 -0800
     4.3 @@ -832,31 +832,6 @@
     4.4      virtual void do_code_blob(CodeBlob* cb) const { }
     4.5    };
     4.6  
     4.7 -  // Closure for verifying update of pointers.  Does not
     4.8 -  // have any side effects.
     4.9 -  class VerifyUpdateClosure: public ParMarkBitMapClosure {
    4.10 -    const MutableSpace* _space; // Is this ever used?
    4.11 -
    4.12 -   public:
    4.13 -    VerifyUpdateClosure(ParCompactionManager* cm, const MutableSpace* sp) :
    4.14 -      ParMarkBitMapClosure(PSParallelCompact::mark_bitmap(), cm), _space(sp)
    4.15 -    { }
    4.16 -
    4.17 -    virtual IterationStatus do_addr(HeapWord* addr, size_t words);
    4.18 -
    4.19 -    const MutableSpace* space() { return _space; }
    4.20 -  };
    4.21 -
    4.22 -  // Closure for updating objects altered for debug checking
    4.23 -  class ResetObjectsClosure: public ParMarkBitMapClosure {
    4.24 -   public:
    4.25 -    ResetObjectsClosure(ParCompactionManager* cm):
    4.26 -      ParMarkBitMapClosure(PSParallelCompact::mark_bitmap(), cm)
    4.27 -    { }
    4.28 -
    4.29 -    virtual IterationStatus do_addr(HeapWord* addr, size_t words);
    4.30 -  };
    4.31 -
    4.32    friend class KeepAliveClosure;
    4.33    friend class FollowStackClosure;
    4.34    friend class AdjustPointerClosure;
    4.35 @@ -1183,10 +1158,6 @@
    4.36    // Update the deferred objects in the space.
    4.37    static void update_deferred_objects(ParCompactionManager* cm, SpaceId id);
    4.38  
    4.39 -  // Mark pointer and follow contents.
    4.40 -  template <class T>
    4.41 -  static inline void mark_and_follow(ParCompactionManager* cm, T* p);
    4.42 -
    4.43    static ParMarkBitMap* mark_bitmap() { return &_mark_bitmap; }
    4.44    static ParallelCompactData& summary_data() { return _summary_data; }
    4.45  
    4.46 @@ -1283,20 +1254,6 @@
    4.47  }
    4.48  
    4.49  template <class T>
    4.50 -inline void PSParallelCompact::mark_and_follow(ParCompactionManager* cm,
    4.51 -                                               T* p) {
    4.52 -  T heap_oop = oopDesc::load_heap_oop(p);
    4.53 -  if (!oopDesc::is_null(heap_oop)) {
    4.54 -    oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
    4.55 -    if (mark_bitmap()->is_unmarked(obj)) {
    4.56 -      if (mark_obj(obj)) {
    4.57 -        obj->follow_contents(cm);
    4.58 -      }
    4.59 -    }
    4.60 -  }
    4.61 -}
    4.62 -
    4.63 -template <class T>
    4.64  inline void PSParallelCompact::mark_and_push(ParCompactionManager* cm, T* p) {
    4.65    T heap_oop = oopDesc::load_heap_oop(p);
    4.66    if (!oopDesc::is_null(heap_oop)) {
     5.1 --- a/src/share/vm/gc_implementation/shared/markSweep.hpp	Tue Nov 22 14:18:39 2011 -0800
     5.2 +++ b/src/share/vm/gc_implementation/shared/markSweep.hpp	Tue Nov 22 14:59:34 2011 -0800
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 1997, 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 @@ -196,8 +196,6 @@
    5.11    static void mark_object(oop obj);
    5.12    // Mark pointer and follow contents.  Empty marking stack afterwards.
    5.13    template <class T> static inline void follow_root(T* p);
    5.14 -  // Mark pointer and follow contents.
    5.15 -  template <class T> static inline void mark_and_follow(T* p);
    5.16    // Check mark and maybe push on marking stack
    5.17    template <class T> static inline void mark_and_push(T* p);
    5.18    static inline void push_objarray(oop obj, size_t index);
     6.1 --- a/src/share/vm/gc_implementation/shared/markSweep.inline.hpp	Tue Nov 22 14:18:39 2011 -0800
     6.2 +++ b/src/share/vm/gc_implementation/shared/markSweep.inline.hpp	Tue Nov 22 14:59:34 2011 -0800
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2000, 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 @@ -63,18 +63,6 @@
    6.11    follow_stack();
    6.12  }
    6.13  
    6.14 -template <class T> inline void MarkSweep::mark_and_follow(T* p) {
    6.15 -//  assert(Universe::heap()->is_in_reserved(p), "should be in object space");
    6.16 -  T heap_oop = oopDesc::load_heap_oop(p);
    6.17 -  if (!oopDesc::is_null(heap_oop)) {
    6.18 -    oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
    6.19 -    if (!obj->mark()->is_marked()) {
    6.20 -      mark_object(obj);
    6.21 -      obj->follow_contents();
    6.22 -    }
    6.23 -  }
    6.24 -}
    6.25 -
    6.26  template <class T> inline void MarkSweep::mark_and_push(T* p) {
    6.27  //  assert(Universe::heap()->is_in_reserved(p), "should be in object space");
    6.28    T heap_oop = oopDesc::load_heap_oop(p);

mercurial