forked from pool/java-1_8_0-openjdk
This commit is contained in:
parent
2956f57012
commit
99b0d6c5e5
27
aarch64-8035938.patch
Normal file
27
aarch64-8035938.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User kevinw
|
||||||
|
# Date 1422481386 0
|
||||||
|
# Node ID 62c4bd276cbe409c0cbc7632df1ed7eb33048fb3
|
||||||
|
# Parent 9773891321c4267baf5fa067b6df4e83ff21b3a5
|
||||||
|
8035938: Memory leak in JvmtiEnv::GetConstantPool
|
||||||
|
Reviewed-by: sspitsyn, dcubed
|
||||||
|
|
||||||
|
diff -r 9773891321c4 -r 62c4bd276cbe src/share/vm/prims/jvmtiClassFileReconstituter.hpp
|
||||||
|
--- jdk8/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp Thu Apr 23 09:10:15 2015 -0700
|
||||||
|
+++ jdk8/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp Wed Jan 28 21:43:06 2015 +0000
|
||||||
|
@@ -68,11 +68,11 @@
|
||||||
|
|
||||||
|
~JvmtiConstantPoolReconstituter() {
|
||||||
|
if (_symmap != NULL) {
|
||||||
|
- os::free(_symmap, mtClass);
|
||||||
|
+ delete _symmap;
|
||||||
|
_symmap = NULL;
|
||||||
|
}
|
||||||
|
if (_classmap != NULL) {
|
||||||
|
- os::free(_classmap, mtClass);
|
||||||
|
+ delete _classmap;
|
||||||
|
_classmap = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
30
aarch64-8071731.patch
Normal file
30
aarch64-8071731.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User roland
|
||||||
|
# Date 1425891593 -3600
|
||||||
|
# Node ID 3816de51b5e7d6050584057fae5f2262dae53d7e
|
||||||
|
# Parent 23bf458e359fed77978ec165b729527180904cd5
|
||||||
|
8071731: Better scaling for C1
|
||||||
|
Reviewed-by: kvn, iveresov
|
||||||
|
|
||||||
|
diff -r 23bf458e359f -r 3816de51b5e7 src/share/vm/c1/c1_LIRGenerator.cpp
|
||||||
|
--- jdk8/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Mon Mar 23 11:15:48 2015 -0700
|
||||||
|
+++ jdk8/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Mon Mar 09 09:59:53 2015 +0100
|
||||||
|
@@ -2204,7 +2204,15 @@
|
||||||
|
if (log2_scale != 0) {
|
||||||
|
// temporary fix (platform dependent code without shift on Intel would be better)
|
||||||
|
// TODO: ARM also allows embedded shift in the address
|
||||||
|
- __ shift_left(index_op, log2_scale, index_op);
|
||||||
|
+ LIR_Opr tmp = new_pointer_register();
|
||||||
|
+ if (TwoOperandLIRForm) {
|
||||||
|
+ __ move(index_op, tmp);
|
||||||
|
+ index_op = tmp;
|
||||||
|
+ }
|
||||||
|
+ __ shift_left(index_op, log2_scale, tmp);
|
||||||
|
+ if (!TwoOperandLIRForm) {
|
||||||
|
+ index_op = tmp;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type());
|
||||||
|
|
104
aarch64-8075838.patch
Normal file
104
aarch64-8075838.patch
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User vlivanov
|
||||||
|
# Date 1429027828 -10800
|
||||||
|
# Node ID 928e1994ad43272f808ca22b9cc1b08a7ce2824f
|
||||||
|
# Parent 62c4bd276cbe409c0cbc7632df1ed7eb33048fb3
|
||||||
|
8075838: Method for typing MethodTypes
|
||||||
|
Reviewed-by: jrose, ahgross, alanb, bmoloden
|
||||||
|
|
||||||
|
diff -r 62c4bd276cbe -r 928e1994ad43 src/share/vm/classfile/systemDictionary.cpp
|
||||||
|
--- jdk8/hotspot/src/share/vm/classfile/systemDictionary.cpp Wed Jan 28 21:43:06 2015 +0000
|
||||||
|
+++ jdk8/hotspot/src/share/vm/classfile/systemDictionary.cpp Tue Apr 14 19:10:28 2015 +0300
|
||||||
|
@@ -2349,9 +2349,6 @@
|
||||||
|
assert(!THREAD->is_Compiler_thread(), "");
|
||||||
|
Handle method_type =
|
||||||
|
SystemDictionary::find_method_handle_type(signature, accessing_klass, CHECK_(empty));
|
||||||
|
- if (false) { // FIXME: Decide if the Java upcall should resolve signatures.
|
||||||
|
- method_type = java_lang_String::create_from_symbol(signature, CHECK_(empty));
|
||||||
|
- }
|
||||||
|
|
||||||
|
KlassHandle mh_klass = SystemDictionary::MethodHandle_klass();
|
||||||
|
int ref_kind = JVM_REF_invokeVirtual;
|
||||||
|
@@ -2383,6 +2380,24 @@
|
||||||
|
return unpack_method_and_appendix(mname, accessing_klass, appendix_box, appendix_result, THREAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
+// Decide if we can globally cache a lookup of this class, to be returned to any client that asks.
|
||||||
|
+// We must ensure that all class loaders everywhere will reach this class, for any client.
|
||||||
|
+// This is a safe bet for public classes in java.lang, such as Object and String.
|
||||||
|
+// We also include public classes in java.lang.invoke, because they appear frequently in system-level method types.
|
||||||
|
+// Out of an abundance of caution, we do not include any other classes, not even for packages like java.util.
|
||||||
|
+static bool is_always_visible_class(oop mirror) {
|
||||||
|
+ Klass* klass = java_lang_Class::as_Klass(mirror);
|
||||||
|
+ if (klass->oop_is_objArray()) {
|
||||||
|
+ klass = ObjArrayKlass::cast(klass)->bottom_klass(); // check element type
|
||||||
|
+ }
|
||||||
|
+ if (klass->oop_is_typeArray()) {
|
||||||
|
+ return true; // primitive array
|
||||||
|
+ }
|
||||||
|
+ assert(klass->oop_is_instance(), klass->external_name());
|
||||||
|
+ return klass->is_public() &&
|
||||||
|
+ (InstanceKlass::cast(klass)->is_same_class_package(SystemDictionary::Object_klass()) || // java.lang
|
||||||
|
+ InstanceKlass::cast(klass)->is_same_class_package(SystemDictionary::MethodHandle_klass())); // java.lang.invoke
|
||||||
|
+}
|
||||||
|
|
||||||
|
// Ask Java code to find or construct a java.lang.invoke.MethodType for the given
|
||||||
|
// signature, as interpreted relative to the given class loader.
|
||||||
|
@@ -2405,32 +2420,33 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle class_loader, protection_domain;
|
||||||
|
- bool is_on_bcp = true; // keep this true as long as we can materialize from the boot classloader
|
||||||
|
+ if (accessing_klass.not_null()) {
|
||||||
|
+ class_loader = Handle(THREAD, InstanceKlass::cast(accessing_klass())->class_loader());
|
||||||
|
+ protection_domain = Handle(THREAD, InstanceKlass::cast(accessing_klass())->protection_domain());
|
||||||
|
+ }
|
||||||
|
+ bool can_be_cached = true;
|
||||||
|
int npts = ArgumentCount(signature).size();
|
||||||
|
objArrayHandle pts = oopFactory::new_objArray(SystemDictionary::Class_klass(), npts, CHECK_(empty));
|
||||||
|
int arg = 0;
|
||||||
|
- Handle rt; // the return type from the signature
|
||||||
|
+ Handle rt; // the return type from the signature
|
||||||
|
ResourceMark rm(THREAD);
|
||||||
|
for (SignatureStream ss(signature); !ss.is_done(); ss.next()) {
|
||||||
|
oop mirror = NULL;
|
||||||
|
- if (is_on_bcp) {
|
||||||
|
- // Note: class_loader & protection_domain are both null at this point.
|
||||||
|
- mirror = ss.as_java_mirror(class_loader, protection_domain,
|
||||||
|
+ if (can_be_cached) {
|
||||||
|
+ // Use neutral class loader to lookup candidate classes to be placed in the cache.
|
||||||
|
+ mirror = ss.as_java_mirror(Handle(), Handle(),
|
||||||
|
SignatureStream::ReturnNull, CHECK_(empty));
|
||||||
|
- if (mirror == NULL) {
|
||||||
|
- // fall back from BCP to accessing_klass
|
||||||
|
- if (accessing_klass.not_null()) {
|
||||||
|
- class_loader = Handle(THREAD, InstanceKlass::cast(accessing_klass())->class_loader());
|
||||||
|
- protection_domain = Handle(THREAD, InstanceKlass::cast(accessing_klass())->protection_domain());
|
||||||
|
- }
|
||||||
|
- is_on_bcp = false;
|
||||||
|
+ if (mirror == NULL || (ss.is_object() && !is_always_visible_class(mirror))) {
|
||||||
|
+ // Fall back to accessing_klass context.
|
||||||
|
+ can_be_cached = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- if (!is_on_bcp) {
|
||||||
|
+ if (!can_be_cached) {
|
||||||
|
// Resolve, throwing a real error if it doesn't work.
|
||||||
|
mirror = ss.as_java_mirror(class_loader, protection_domain,
|
||||||
|
SignatureStream::NCDFError, CHECK_(empty));
|
||||||
|
}
|
||||||
|
+ assert(!oopDesc::is_null(mirror), ss.as_symbol(THREAD)->as_C_string());
|
||||||
|
if (ss.at_return_type())
|
||||||
|
rt = Handle(THREAD, mirror);
|
||||||
|
else
|
||||||
|
@@ -2462,7 +2478,7 @@
|
||||||
|
&args, CHECK_(empty));
|
||||||
|
Handle method_type(THREAD, (oop) result.get_jobject());
|
||||||
|
|
||||||
|
- if (is_on_bcp) {
|
||||||
|
+ if (can_be_cached) {
|
||||||
|
// We can cache this MethodType inside the JVM.
|
||||||
|
MutexLocker ml(SystemDictionary_lock, THREAD);
|
||||||
|
spe = invoke_method_table()->find_entry(index, hash, signature, null_iid);
|
||||||
|
|
@ -227,6 +227,13 @@ Patch14: zero-javadoc-verbose.patch
|
|||||||
Patch15: cplusplus-interpreter.patch
|
Patch15: cplusplus-interpreter.patch
|
||||||
# Fix crash on zero virtual machine built with gcc5
|
# Fix crash on zero virtual machine built with gcc5
|
||||||
Patch16: zero-dummy.patch
|
Patch16: zero-dummy.patch
|
||||||
|
# July 2015 security fixes backported to aarch64 hotspot
|
||||||
|
# 8071731: Better scaling for C1
|
||||||
|
Patch20: aarch64-8071731.patch
|
||||||
|
# 8035938: Memory leak in JvmtiEnv::GetConstantPool
|
||||||
|
Patch21: aarch64-8035938.patch
|
||||||
|
# 8075838: Method for typing MethodTypes
|
||||||
|
Patch22: aarch64-8075838.patch
|
||||||
#
|
#
|
||||||
# OpenJDK specific patches
|
# OpenJDK specific patches
|
||||||
#
|
#
|
||||||
@ -530,6 +537,12 @@ rm -rvf jdk/src/share/native/sun/java2d/cmm/lcms/lcms2*
|
|||||||
%patch15 -p1
|
%patch15 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifarch %aarch64
|
||||||
|
%patch20 -p1
|
||||||
|
%patch21 -p1
|
||||||
|
%patch22 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%patch99 -p1
|
%patch99 -p1
|
||||||
|
|
||||||
# s390 build fixes
|
# s390 build fixes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user