8217325: Enable inlining of java_lang_Class::oop_size_raw

Reviewed-by: shade, coleenp, rehn, stefank
This commit is contained in:
Claes Redestad 2019-01-18 08:00:05 +01:00
parent ef3336ec27
commit e86a7eea79
3 changed files with 8 additions and 7 deletions

View File

@ -1257,12 +1257,6 @@ int java_lang_Class::oop_size(oop java_class) {
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");

View File

@ -190,6 +190,13 @@ inline bool java_lang_Class::is_primitive(oop java_class) {
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());
}

View File

@ -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"