8217325: Enable inlining of java_lang_Class::oop_size_raw
authorredestad
Fri, 18 Jan 2019 08:00:05 +0100
changeset 53380 c8208421a860
parent 53379 e47074d2d8cc
child 53381 e1da82072c79
8217325: Enable inlining of java_lang_Class::oop_size_raw Reviewed-by: shade, coleenp, rehn, stefank
src/hotspot/share/classfile/javaClasses.cpp
src/hotspot/share/classfile/javaClasses.inline.hpp
src/hotspot/share/oops/instanceMirrorKlass.cpp
--- a/src/hotspot/share/classfile/javaClasses.cpp	Fri Jan 18 14:43:25 2019 +0900
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Fri Jan 18 08:00:05 2019 +0100
@@ -1257,12 +1257,6 @@
   return size;
 }
 
-int  java_lang_Class::oop_size_raw(oop java_class) {
-  assert(_oop_size_offset != 0, "must be set");
-  int size = java_class->int_field_raw(_oop_size_offset);
-  assert(size > 0, "Oop size must be greater than zero, not %d", size);
-  return size;
-}
 
 void java_lang_Class::set_oop_size(HeapWord* java_class, int size) {
   assert(_oop_size_offset != 0, "must be set");
--- a/src/hotspot/share/classfile/javaClasses.inline.hpp	Fri Jan 18 14:43:25 2019 +0900
+++ b/src/hotspot/share/classfile/javaClasses.inline.hpp	Fri Jan 18 08:00:05 2019 +0100
@@ -190,6 +190,13 @@
   return is_primitive;
 }
 
+inline int java_lang_Class::oop_size_raw(oop java_class) {
+  assert(_oop_size_offset != 0, "must be set");
+  int size = java_class->int_field_raw(_oop_size_offset);
+  assert(size > 0, "Oop size must be greater than zero, not %d", size);
+  return size;
+}
+
 inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
   return obj != NULL && is_subclass(obj->klass());
 }
--- a/src/hotspot/share/oops/instanceMirrorKlass.cpp	Fri Jan 18 14:43:25 2019 +0900
+++ b/src/hotspot/share/oops/instanceMirrorKlass.cpp	Fri Jan 18 08:00:05 2019 +0100
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/javaClasses.hpp"
+#include "classfile/javaClasses.inline.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "gc/shared/collectedHeap.inline.hpp"
 #include "memory/iterator.inline.hpp"