changeset 49784:b73c1abcad3d

8198430: Remove G1Allocator extension point Reviewed-by: ehelin, tschatzl
author sjohanss
date Fri, 02 Mar 2018 10:09:01 +0100
parents f5954447b0bd
children 0e79ce03b7a2
files src/hotspot/share/gc/g1/g1Allocator.hpp src/hotspot/share/gc/g1/g1Allocator_ext.cpp src/hotspot/share/gc/g1/g1CollectedHeap.cpp src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
diffstat 4 files changed, 2 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/g1/g1Allocator.hpp	Fri Mar 02 09:20:16 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1Allocator.hpp	Fri Mar 02 10:09:01 2018 +0100
@@ -67,8 +67,6 @@
   G1Allocator(G1CollectedHeap* heap) : _g1h(heap) { }
   virtual ~G1Allocator() { }
 
-  static G1Allocator* create_allocator(G1CollectedHeap* g1h);
-
 #ifdef ASSERT
   // Do we currently have an active mutator region to allocate into?
   bool has_mutator_alloc_region(AllocationContext_t context) { return mutator_alloc_region(context)->get() != NULL; }
@@ -223,8 +221,6 @@
   G1PLABAllocator(G1Allocator* allocator);
   virtual ~G1PLABAllocator() { }
 
-  static G1PLABAllocator* create_allocator(G1Allocator* allocator);
-
   virtual void waste(size_t& wasted, size_t& undo_wasted) = 0;
 
   // Allocate word_sz words in dest, either directly into the regions or by
--- a/src/hotspot/share/gc/g1/g1Allocator_ext.cpp	Fri Mar 02 09:20:16 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2014, 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/g1Allocator.inline.hpp"
-#include "gc/g1/g1CollectedHeap.hpp"
-
-G1Allocator* G1Allocator::create_allocator(G1CollectedHeap* g1h) {
-  return new G1DefaultAllocator(g1h);
-}
-
-G1PLABAllocator* G1PLABAllocator::create_allocator(G1Allocator* allocator) {
-  return new G1DefaultPLABAllocator(allocator);
-}
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Mar 02 09:20:16 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Mar 02 10:09:01 2018 +0100
@@ -1509,7 +1509,7 @@
   _workers->initialize_workers();
   _verifier = new G1HeapVerifier(this);
 
-  _allocator = G1Allocator::create_allocator(this);
+  _allocator = new G1DefaultAllocator(this);
 
   _heap_sizing_policy = G1HeapSizingPolicy::create(this, _g1_policy->analytics());
 
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp	Fri Mar 02 09:20:16 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp	Fri Mar 02 10:09:01 2018 +0100
@@ -65,7 +65,7 @@
   _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM;
   memset(_surviving_young_words, 0, real_length * sizeof(size_t));
 
-  _plab_allocator = G1PLABAllocator::create_allocator(_g1h->allocator());
+  _plab_allocator = new G1DefaultPLABAllocator(_g1h->allocator());
 
   _dest[InCSetState::NotInCSet]    = InCSetState::NotInCSet;
   // The dest for Young is used when the objects are aged enough to