src/hotspot/share/gc/shared/barrierSet.inline.hpp
changeset 47658 c2b7fb8e5144
parent 47216 71c04702a3d5
child 47998 fb0275c320a0
--- a/src/hotspot/share/gc/shared/barrierSet.inline.hpp	Wed Oct 18 19:36:17 2017 -0700
+++ b/src/hotspot/share/gc/shared/barrierSet.inline.hpp	Thu Oct 19 11:25:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, 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
@@ -26,37 +26,15 @@
 #define SHARE_VM_GC_SHARED_BARRIERSET_INLINE_HPP
 
 #include "gc/shared/barrierSet.hpp"
-#include "gc/shared/cardTableModRefBS.inline.hpp"
 #include "utilities/align.hpp"
 
-// Inline functions of BarrierSet, which de-virtualize certain
-// performance-critical calls when the barrier is the most common
-// card-table kind.
-
-inline bool BarrierSet::devirtualize_reference_writes() const {
-  switch (kind()) {
-  case CardTableForRS:
-  case CardTableExtension:
-    return true;
-  default:
-    return false;
-  }
-}
 
 template <class T> void BarrierSet::write_ref_field_pre(T* field, oop new_val) {
-  if (devirtualize_reference_writes()) {
-    barrier_set_cast<CardTableModRefBS>(this)->inline_write_ref_field_pre(field, new_val);
-  } else {
-    write_ref_field_pre_work(field, new_val);
-  }
+  write_ref_field_pre_work(field, new_val);
 }
 
 void BarrierSet::write_ref_field(void* field, oop new_val, bool release) {
-  if (devirtualize_reference_writes()) {
-    barrier_set_cast<CardTableModRefBS>(this)->inline_write_ref_field(field, new_val, release);
-  } else {
-    write_ref_field_work(field, new_val, release);
-  }
+  write_ref_field_work(field, new_val, release);
 }
 
 // count is number of array elements being written
@@ -84,11 +62,7 @@
 
 
 inline void BarrierSet::write_region(MemRegion mr) {
-  if (devirtualize_reference_writes()) {
-    barrier_set_cast<CardTableModRefBS>(this)->inline_write_region(mr);
-  } else {
-    write_region_work(mr);
-  }
+  write_region_work(mr);
 }
 
 #endif // SHARE_VM_GC_SHARED_BARRIERSET_INLINE_HPP