src/share/vm/classfile/javaClasses.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/classfile/javaClasses.cpp
src/share/vm/classfile/javaClasses.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2012, 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.
--- 1,7 ----
/*
! * Copyright (c) 1997, 2013, 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.
*** 2784,2793 ****
--- 2784,2794 ----
// Support for java_lang_ClassLoader
bool java_lang_ClassLoader::offsets_computed = false;
int java_lang_ClassLoader::_loader_data_offset = -1;
int java_lang_ClassLoader::parallelCapable_offset = -1;
+ int java_lang_ClassLoader::fullyConcurrent_offset = -1;
ClassLoaderData** java_lang_ClassLoader::loader_data_addr(oop loader) {
assert(loader != NULL && loader->is_oop(), "loader must be oop");
return (ClassLoaderData**) loader->address_field_addr(_loader_data_offset);
}
*** 2803,2812 ****
--- 2804,2817 ----
// The field indicating parallelCapable (parallelLockMap) is only present starting in 7,
Klass* k1 = SystemDictionary::ClassLoader_klass();
compute_optional_offset(parallelCapable_offset,
k1, vmSymbols::parallelCapable_name(), vmSymbols::concurrenthashmap_signature());
+ // The field indicating fullyConcurrent is only present starting in 8
+ compute_optional_offset(fullyConcurrent_offset,
+ k1, vmSymbols::fullyConcurrent_name(), vmSymbols::bool_signature());
+
CLASSLOADER_INJECTED_FIELDS(INJECTED_FIELD_COMPUTE_OFFSET);
}
oop java_lang_ClassLoader::parent(oop loader) {
assert(is_instance(loader), "loader must be oop");
*** 2840,2849 ****
--- 2845,2865 ----
return false;
}
return (class_loader->obj_field(parallelCapable_offset) != NULL);
}
+ // For class loader classes, fullyConcurrent defined as boolean field
+ // Written to by java.lang.ClassLoader, vm only reads this field, doesn't set it
+ bool java_lang_ClassLoader::fullyConcurrent(oop class_loader) {
+ if (!JDK_Version::is_gte_jdk18x_version()
+ || fullyConcurrent_offset == -1) {
+ // Default for backward compatibility is false
+ return false;
+ }
+ return (class_loader->bool_field(fullyConcurrent_offset) == 1);
+ }
+
bool java_lang_ClassLoader::is_trusted_loader(oop loader) {
// Fix for 4474172; see evaluation for more details
loader = non_reflection_class_loader(loader);
oop cl = SystemDictionary::java_system_loader();
src/share/vm/classfile/javaClasses.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File