8197847: Remove unused file g1ParScanThreadState_ext.cpp
authorehelin
Mon, 05 Mar 2018 11:32:17 +0100
changeset 49337 e4fdca451542
parent 49336 4b7dae855f23
child 49338 41e7a68fbf45
8197847: Remove unused file g1ParScanThreadState_ext.cpp Reviewed-by: sjohanss, eosterlund
src/hotspot/share/gc/g1/g1CollectedHeap.hpp
src/hotspot/share/gc/g1/g1InCSetState.hpp
src/hotspot/share/gc/g1/g1OopClosures.hpp
src/hotspot/share/gc/g1/g1OopClosures.inline.hpp
src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp
src/hotspot/share/gc/g1/g1ParScanThreadState_ext.cpp
src/hotspot/share/gc/g1/g1SharedClosures.hpp
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Mon Mar 05 11:32:17 2018 +0100
@@ -595,9 +595,6 @@
   void register_old_region_with_cset(HeapRegion* r) {
     _in_cset_fast_test.set_in_old(r->hrm_index());
   }
-  inline void register_ext_region_with_cset(HeapRegion* r) {
-    _in_cset_fast_test.set_ext(r->hrm_index());
-  }
   void clear_in_cset(const HeapRegion* hr) {
     _in_cset_fast_test.clear(hr);
   }
--- a/src/hotspot/share/gc/g1/g1InCSetState.hpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1InCSetState.hpp	Mon Mar 05 11:32:17 2018 +0100
@@ -58,7 +58,6 @@
     // used to index into arrays.
     // The negative values are used for objects requiring various special cases,
     // for example eager reclamation of humongous objects.
-    Ext          = -2,    // Extension point
     Humongous    = -1,    // The region is humongous
     NotInCSet    =  0,    // The region is not in the collection set.
     Young        =  1,    // The region is in the collection set and a young region.
@@ -80,11 +79,10 @@
   bool is_humongous() const            { return _value == Humongous; }
   bool is_young() const                { return _value == Young; }
   bool is_old() const                  { return _value == Old; }
-  bool is_ext() const                  { return _value == Ext; }
 
 #ifdef ASSERT
   bool is_default() const              { return _value == NotInCSet; }
-  bool is_valid() const                { return (_value >= Ext) && (_value < Num); }
+  bool is_valid() const                { return (_value >= Humongous) && (_value < Num); }
   bool is_valid_gen() const            { return (_value >= Young && _value <= Old); }
 #endif
 };
@@ -110,12 +108,6 @@
     set_by_index(index, InCSetState::Humongous);
   }
 
-  void set_ext(uintptr_t index) {
-    assert(get_by_index(index).is_default(),
-           "State at index " INTPTR_FORMAT " should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value());
-    set_by_index(index, InCSetState::Ext);
-  }
-
   void clear_humongous(uintptr_t index) {
     set_by_index(index, InCSetState::NotInCSet);
   }
--- a/src/hotspot/share/gc/g1/g1OopClosures.hpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1OopClosures.hpp	Mon Mar 05 11:32:17 2018 +0100
@@ -139,7 +139,7 @@
   G1MarkPromotedFromRoot
 };
 
-template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
+template <G1Barrier barrier, G1Mark do_mark_object>
 class G1ParCopyClosure : public G1ParCopyHelper {
 public:
   G1ParCopyClosure(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
--- a/src/hotspot/share/gc/g1/g1OopClosures.inline.hpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1OopClosures.inline.hpp	Mon Mar 05 11:32:17 2018 +0100
@@ -61,8 +61,6 @@
 inline void G1ScanClosureBase::handle_non_cset_obj_common(InCSetState const state, T* p, oop const obj) {
   if (state.is_humongous()) {
     _g1->set_humongous_is_live(obj);
-  } else if (state.is_ext()) {
-    _par_scan_state->do_oop_ext(p);
   }
 }
 
@@ -218,9 +216,9 @@
   _cm->mark_in_next_bitmap(to_obj);
 }
 
-template <G1Barrier barrier, G1Mark do_mark_object, bool use_ext>
+template <G1Barrier barrier, G1Mark do_mark_object>
 template <class T>
-void G1ParCopyClosure<barrier, do_mark_object, use_ext>::do_oop_work(T* p) {
+void G1ParCopyClosure<barrier, do_mark_object>::do_oop_work(T* p) {
   T heap_oop = oopDesc::load_heap_oop(p);
 
   if (oopDesc::is_null(heap_oop)) {
@@ -256,9 +254,6 @@
       _g1->set_humongous_is_live(obj);
     }
 
-    if (use_ext && state.is_ext()) {
-      _par_scan_state->do_oop_ext(p);
-    }
     // The object is not in collection set. If we're a root scanning
     // closure during an initial mark pause then attempt to mark the object.
     if (do_mark_object == G1MarkFromRoot) {
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp	Mon Mar 05 11:32:17 2018 +0100
@@ -329,7 +329,7 @@
 G1ParScanThreadState* G1ParScanThreadStateSet::state_for_worker(uint worker_id) {
   assert(worker_id < _n_workers, "out of bounds access");
   if (_states[worker_id] == NULL) {
-    _states[worker_id] = new_par_scan_state(worker_id, _young_cset_length);
+    _states[worker_id] = new G1ParScanThreadState(_g1h, worker_id, _young_cset_length);
   }
   return _states[worker_id];
 }
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp	Mon Mar 05 11:32:17 2018 +0100
@@ -50,8 +50,8 @@
   } else if (in_cset_state.is_humongous()) {
     _g1h->set_humongous_is_live(obj);
   } else {
-    assert(in_cset_state.is_default() || in_cset_state.is_ext(),
-         "In_cset_state must be NotInCSet or Ext here, but is " CSETSTATE_FORMAT, in_cset_state.value());
+    assert(in_cset_state.is_default(),
+         "In_cset_state must be NotInCSet here, but is " CSETSTATE_FORMAT, in_cset_state.value());
   }
 
   assert(obj != NULL, "Must be");
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState_ext.cpp	Mon Mar 05 11:16:23 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-
-#include "gc/g1/g1ParScanThreadState.hpp"
-
-G1ParScanThreadState* G1ParScanThreadStateSet::new_par_scan_state(uint worker_id, size_t young_cset_length) {
-  return new G1ParScanThreadState(_g1h, worker_id, young_cset_length);
-}
-
-template <typename T>
-void G1ParScanThreadState::do_oop_ext(T* ref) {
-}
-
-template void G1ParScanThreadState::do_oop_ext<oop>(oop* ref);
-template void G1ParScanThreadState::do_oop_ext<narrowOop>(narrowOop* ref);
--- a/src/hotspot/share/gc/g1/g1SharedClosures.hpp	Mon Mar 05 11:16:23 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1SharedClosures.hpp	Mon Mar 05 11:32:17 2018 +0100
@@ -31,11 +31,11 @@
 class G1ParScanThreadState;
 
 // Simple holder object for a complete set of closures used by the G1 evacuation code.
-template <G1Mark Mark, bool use_ext = false>
+template <G1Mark Mark>
 class G1SharedClosures VALUE_OBJ_CLASS_SPEC {
 public:
-  G1ParCopyClosure<G1BarrierNone, Mark, use_ext> _oops;
-  G1ParCopyClosure<G1BarrierCLD,  Mark, use_ext> _oops_in_cld;
+  G1ParCopyClosure<G1BarrierNone, Mark> _oops;
+  G1ParCopyClosure<G1BarrierCLD,  Mark> _oops_in_cld;
 
   G1CLDScanClosure                _clds;
   G1CodeBlobClosure               _codeblobs;