Clean up patches and spec file.
This commit is contained in:
parent
93ac890550
commit
43a65df630
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
/jdk9-jdk9-jdk-9+181-CPU4.tar.xz
|
||||
/jdk-updates-jdk9u-jdk-9.0.1+11.tar.xz
|
||||
/jdk-updates-jdk9u-jdk-9.0.4+11.tar.xz
|
||||
/jdk-updates-jdk9u-jdk-9.0.4+12.tar.xz
|
||||
|
@ -1,297 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User aph
|
||||
# Date 1516971866 -3600
|
||||
# Fri Jan 26 14:04:26 2018 +0100
|
||||
# Node ID a8b7d1fd5884bcfe816df11f16dd71aec7bdacdb
|
||||
# Parent f6418daf023ea194db63519e3d13ca6c252028ed
|
||||
8195685: AArch64: AArch64 cannot build with JDK-8174962
|
||||
Reviewed-by: adinn, njian
|
||||
|
||||
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
@@ -927,8 +927,12 @@
|
||||
RegisterOrConstant itable_index,
|
||||
Register method_result,
|
||||
Register scan_temp,
|
||||
- Label& L_no_such_interface) {
|
||||
- assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
|
||||
+ Label& L_no_such_interface,
|
||||
+ bool return_method) {
|
||||
+ assert_different_registers(recv_klass, intf_klass, scan_temp);
|
||||
+ assert_different_registers(method_result, intf_klass, scan_temp);
|
||||
+ assert(recv_klass != method_result || !return_method,
|
||||
+ "recv_klass can be destroyed when method isn't needed");
|
||||
assert(itable_index.is_constant() || itable_index.as_register() == method_result,
|
||||
"caller must use same register for non-constant itable index as for method");
|
||||
|
||||
@@ -946,12 +950,14 @@
|
||||
lea(scan_temp, Address(recv_klass, scan_temp, Address::lsl(3)));
|
||||
add(scan_temp, scan_temp, vtable_base);
|
||||
|
||||
- // Adjust recv_klass by scaled itable_index, so we can free itable_index.
|
||||
- assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
|
||||
- // lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
|
||||
- lea(recv_klass, Address(recv_klass, itable_index, Address::lsl(3)));
|
||||
- if (itentry_off)
|
||||
- add(recv_klass, recv_klass, itentry_off);
|
||||
+ if (return_method) {
|
||||
+ // Adjust recv_klass by scaled itable_index, so we can free itable_index.
|
||||
+ assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
|
||||
+ // lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
|
||||
+ lea(recv_klass, Address(recv_klass, itable_index, Address::lsl(3)));
|
||||
+ if (itentry_off)
|
||||
+ add(recv_klass, recv_klass, itentry_off);
|
||||
+ }
|
||||
|
||||
// for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
|
||||
// if (scan->interface() == intf) {
|
||||
@@ -985,8 +991,10 @@
|
||||
bind(found_method);
|
||||
|
||||
// Got a hit.
|
||||
- ldr(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
|
||||
- ldr(method_result, Address(recv_klass, scan_temp));
|
||||
+ if (return_method) {
|
||||
+ ldrw(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
|
||||
+ ldr(method_result, Address(recv_klass, scan_temp, Address::uxtw(0)));
|
||||
+ }
|
||||
}
|
||||
|
||||
// virtual method calling
|
||||
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
|
||||
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
|
||||
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
|
||||
@@ -870,7 +870,8 @@
|
||||
RegisterOrConstant itable_index,
|
||||
Register method_result,
|
||||
Register scan_temp,
|
||||
- Label& no_such_interface);
|
||||
+ Label& no_such_interface,
|
||||
+ bool return_method = true);
|
||||
|
||||
// virtual method calling
|
||||
// n.b. x86 allows RegisterOrConstant for vtable_index
|
||||
diff --git a/src/cpu/aarch64/vm/templateTable_aarch64.cpp b/src/cpu/aarch64/vm/templateTable_aarch64.cpp
|
||||
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp
|
||||
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp
|
||||
@@ -3279,11 +3279,11 @@
|
||||
transition(vtos, vtos);
|
||||
assert(byte_no == f1_byte, "use this argument");
|
||||
|
||||
- prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 itable index
|
||||
+ prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 Method*
|
||||
r2, r3); // recv, flags
|
||||
|
||||
// r0: interface klass (from f1)
|
||||
- // rmethod: itable index (from f2)
|
||||
+ // rmethod: method (from f2)
|
||||
// r2: receiver
|
||||
// r3: flags
|
||||
|
||||
@@ -3302,11 +3302,28 @@
|
||||
__ null_check(r2, oopDesc::klass_offset_in_bytes());
|
||||
__ load_klass(r3, r2);
|
||||
|
||||
+ Label no_such_interface, no_such_method;
|
||||
+
|
||||
+ // Receiver subtype check against REFC.
|
||||
+ // Superklass in r0. Subklass in r3. Blows rscratch2, r13
|
||||
+ __ lookup_interface_method(// inputs: rec. class, interface, itable index
|
||||
+ r3, r0, noreg,
|
||||
+ // outputs: scan temp. reg, scan temp. reg
|
||||
+ rscratch2, r13,
|
||||
+ no_such_interface,
|
||||
+ /*return_method=*/false);
|
||||
+
|
||||
// profile this call
|
||||
__ profile_virtual_call(r3, r13, r19);
|
||||
|
||||
- Label no_such_interface, no_such_method;
|
||||
-
|
||||
+ // Get declaring interface class from method, and itable index
|
||||
+ __ ldr(r0, Address(rmethod, Method::const_offset()));
|
||||
+ __ ldr(r0, Address(r0, ConstMethod::constants_offset()));
|
||||
+ __ ldr(r0, Address(r0, ConstantPool::pool_holder_offset_in_bytes()));
|
||||
+ __ ldrw(rmethod, Address(rmethod, Method::itable_index_offset()));
|
||||
+ __ subw(rmethod, rmethod, Method::itable_index_max);
|
||||
+ __ negw(rmethod, rmethod);
|
||||
+
|
||||
__ lookup_interface_method(// inputs: rec. class, interface, itable index
|
||||
r3, r0, rmethod,
|
||||
// outputs: method, scan temp. reg
|
||||
diff --git a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||
--- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||
+++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "code/vtableStubs.hpp"
|
||||
#include "interp_masm_aarch64.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
+#include "oops/compiledICHolder.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/klassVtable.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
@@ -140,28 +141,44 @@
|
||||
#endif
|
||||
|
||||
// Entry arguments:
|
||||
- // rscratch2: Interface
|
||||
+ // rscratch2: CompiledICHolder
|
||||
// j_rarg0: Receiver
|
||||
|
||||
- // Free registers (non-args) are r0 (interface), rmethod
|
||||
|
||||
+ // Most registers are in use; we'll use r0, rmethod, r10, r11
|
||||
+ const Register recv_klass_reg = r10;
|
||||
+ const Register holder_klass_reg = r0; // declaring interface klass (DECC)
|
||||
+ const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
|
||||
+ const Register temp_reg = r11;
|
||||
+ const Register icholder_reg = rscratch2;
|
||||
+
|
||||
+ Label L_no_such_interface;
|
||||
+
|
||||
+ __ ldr(resolved_klass_reg, Address(icholder_reg, CompiledICHolder::holder_klass_offset()));
|
||||
+ __ ldr(holder_klass_reg, Address(icholder_reg, CompiledICHolder::holder_metadata_offset()));
|
||||
+
|
||||
// get receiver (need to skip return address on top of stack)
|
||||
-
|
||||
assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver expected in j_rarg0");
|
||||
// get receiver klass (also an implicit null-check)
|
||||
address npe_addr = __ pc();
|
||||
-
|
||||
- // Most registers are in use; we'll use r0, rmethod, r10, r11
|
||||
- __ load_klass(r10, j_rarg0);
|
||||
-
|
||||
- Label throw_icce;
|
||||
+ __ load_klass(recv_klass_reg, j_rarg0);
|
||||
|
||||
- // Get Method* and entrypoint for compiler
|
||||
+ // Receiver subtype check against REFC.
|
||||
+ // Destroys recv_klass_reg value.
|
||||
+ __ lookup_interface_method(// inputs: rec. class, interface
|
||||
+ recv_klass_reg, resolved_klass_reg, noreg,
|
||||
+ // outputs: scan temp. reg1, scan temp. reg2
|
||||
+ recv_klass_reg, temp_reg,
|
||||
+ L_no_such_interface,
|
||||
+ /*return_method=*/false);
|
||||
+
|
||||
+ // Get selected method from declaring class and itable index
|
||||
+ __ load_klass(recv_klass_reg, j_rarg0); // restore recv_klass_reg
|
||||
__ lookup_interface_method(// inputs: rec. class, interface, itable index
|
||||
- r10, rscratch2, itable_index,
|
||||
- // outputs: method, scan temp. reg
|
||||
- rmethod, r11,
|
||||
- throw_icce);
|
||||
+ recv_klass_reg, holder_klass_reg, itable_index,
|
||||
+ // outputs: method, scan temp. reg
|
||||
+ rmethod, temp_reg,
|
||||
+ L_no_such_interface);
|
||||
|
||||
// method (rmethod): Method*
|
||||
// j_rarg0: receiver
|
||||
@@ -183,7 +200,7 @@
|
||||
__ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
|
||||
__ br(rscratch1);
|
||||
|
||||
- __ bind(throw_icce);
|
||||
+ __ bind(L_no_such_interface);
|
||||
__ far_jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
|
||||
|
||||
__ flush();
|
||||
@@ -205,11 +222,11 @@
|
||||
int size = DebugVtables ? 216 : 0;
|
||||
if (CountCompiledCalls)
|
||||
size += 6 * 4;
|
||||
- // FIXME
|
||||
+ // FIXME: vtable stubs only need 36 bytes
|
||||
if (is_vtable_stub)
|
||||
size += 52;
|
||||
else
|
||||
- size += 104;
|
||||
+ size += 176;
|
||||
return size;
|
||||
|
||||
// In order to tune these parameters, run the JVM with VM options
|
||||
@@ -217,33 +234,58 @@
|
||||
// actual itable stubs. Run it with -Xmx31G -XX:+UseCompressedOops.
|
||||
//
|
||||
// If Universe::narrow_klass_base is nonzero, decoding a compressed
|
||||
- // class can take zeveral instructions. Run it with -Xmx31G
|
||||
- // -XX:+UseCompressedOops.
|
||||
+ // class can take zeveral instructions.
|
||||
//
|
||||
// The JVM98 app. _202_jess has a megamorphic interface call.
|
||||
// The itable code looks like this:
|
||||
- // Decoding VtableStub itbl[1]@12
|
||||
- // ldr w10, [x1,#8]
|
||||
- // lsl x10, x10, #3
|
||||
- // ldr w11, [x10,#280]
|
||||
- // add x11, x10, x11, uxtx #3
|
||||
- // add x11, x11, #0x1b8
|
||||
- // ldr x12, [x11]
|
||||
- // cmp x9, x12
|
||||
- // b.eq success
|
||||
- // loop:
|
||||
- // cbz x12, throw_icce
|
||||
- // add x11, x11, #0x10
|
||||
- // ldr x12, [x11]
|
||||
- // cmp x9, x12
|
||||
- // b.ne loop
|
||||
- // success:
|
||||
- // ldr x11, [x11,#8]
|
||||
- // ldr x12, [x10,x11]
|
||||
- // ldr x8, [x12,#72]
|
||||
- // br x8
|
||||
- // throw_icce:
|
||||
- // b throw_ICCE_entry
|
||||
+
|
||||
+ // ldr xmethod, [xscratch2,#CompiledICHolder::holder_klass_offset]
|
||||
+ // ldr x0, [xscratch2]
|
||||
+ // ldr w10, [x1,#oopDesc::klass_offset_in_bytes]
|
||||
+ // mov xheapbase, #0x3c000000 // #narrow_klass_base
|
||||
+ // movk xheapbase, #0x3f7, lsl #32
|
||||
+ // add x10, xheapbase, x10
|
||||
+ // mov xheapbase, #0xe7ff0000 // #heapbase
|
||||
+ // movk xheapbase, #0x3f7, lsl #32
|
||||
+ // ldr w11, [x10,#vtable_length_offset]
|
||||
+ // add x11, x10, x11, uxtx #3
|
||||
+ // add x11, x11, #itableMethodEntry::method_offset_in_bytes
|
||||
+ // ldr x10, [x11]
|
||||
+ // cmp xmethod, x10
|
||||
+ // b.eq found_method
|
||||
+ // search:
|
||||
+ // cbz x10, no_such_interface
|
||||
+ // add x11, x11, #0x10
|
||||
+ // ldr x10, [x11]
|
||||
+ // cmp xmethod, x10
|
||||
+ // b.ne search
|
||||
+ // found_method:
|
||||
+ // ldr w10, [x1,#oopDesc::klass_offset_in_bytes]
|
||||
+ // mov xheapbase, #0x3c000000 // #narrow_klass_base
|
||||
+ // movk xheapbase, #0x3f7, lsl #32
|
||||
+ // add x10, xheapbase, x10
|
||||
+ // mov xheapbase, #0xe7ff0000 // #heapbase
|
||||
+ // movk xheapbase, #0x3f7, lsl #32
|
||||
+ // ldr w11, [x10,#vtable_length_offset]
|
||||
+ // add x11, x10, x11, uxtx #3
|
||||
+ // add x11, x11, #itableMethodEntry::method_offset_in_bytes
|
||||
+ // add x10, x10, #itentry_off
|
||||
+ // ldr xmethod, [x11]
|
||||
+ // cmp x0, xmethod
|
||||
+ // b.eq found_method2
|
||||
+ // search2:
|
||||
+ // cbz xmethod, 0x000003ffa872e6cc
|
||||
+ // add x11, x11, #0x10
|
||||
+ // ldr xmethod, [x11]
|
||||
+ // cmp x0, xmethod
|
||||
+ // b.ne search2
|
||||
+ // found_method2:
|
||||
+ // ldr w11, [x11,#itableOffsetEntry::offset_offset_in_bytes]
|
||||
+ // ldr xmethod, [x10,w11,uxtw]
|
||||
+ // ldr xscratch1, [xmethod,#Method::from_compiled_offset]
|
||||
+ // br xscratch1
|
||||
+ // no_such_interface:
|
||||
+ // b throw_ICCE_entry
|
||||
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User adinn
|
||||
# Date 1516891647 0
|
||||
# Thu Jan 25 14:47:27 2018 +0000
|
||||
# Node ID e321560ac819c05274c59f46f5cc28ccfd4b38ec
|
||||
# Parent 77baeab90732e7cfb6eb1b754a768a197bca1ab5
|
||||
8195859: AArch64: vtableStubs gtest fails after 8174962
|
||||
Summary: gtest vtableStubs introduced by 8174962 fails on AArch64 with an invalid insn encoding
|
||||
Reviewed-by: duke
|
||||
|
||||
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
@@ -1049,7 +1049,8 @@
|
||||
ldr(method_result, Address(method_result, vtable_offset_in_bytes));
|
||||
} else {
|
||||
vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
|
||||
- ldr(method_result, Address(recv_klass, vtable_offset_in_bytes));
|
||||
+ ldr(method_result,
|
||||
+ form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
|
||||
}
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User adinn
|
||||
# Date 1516881392 0
|
||||
# Thu Jan 25 11:56:32 2018 +0000
|
||||
# Node ID 51d97ee431ff04f126c436b25dc75de7e0d2d4dd
|
||||
# Parent 2da4a52715d837b639edcfe37c66e5428c023abd
|
||||
8196136: AArch64: Correct register use in patch for JDK-8195685
|
||||
Summary: itable stubs must not use java argument registers as scratch registers
|
||||
Reviewed-by: aph
|
||||
|
||||
diff --git a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||
--- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||
+++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||
@@ -63,8 +63,8 @@
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (CountCompiledCalls) {
|
||||
- __ lea(r19, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
|
||||
- __ incrementw(Address(r19));
|
||||
+ __ lea(r16, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
|
||||
+ __ incrementw(Address(r16));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
|
||||
// get receiver klass
|
||||
address npe_addr = __ pc();
|
||||
- __ load_klass(r19, j_rarg0);
|
||||
+ __ load_klass(r16, j_rarg0);
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (DebugVtables) {
|
||||
Label L;
|
||||
// check offset vs vtable length
|
||||
- __ ldrw(rscratch1, Address(r19, Klass::vtable_length_offset()));
|
||||
+ __ ldrw(rscratch1, Address(r16, Klass::vtable_length_offset()));
|
||||
__ cmpw(rscratch1, vtable_index * vtableEntry::size());
|
||||
__ br(Assembler::GT, L);
|
||||
__ enter();
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
- __ lookup_virtual_method(r19, vtable_index, rmethod);
|
||||
+ __ lookup_virtual_method(r16, vtable_index, rmethod);
|
||||
|
||||
if (DebugVtables) {
|
||||
Label L;
|
||||
@@ -145,9 +145,9 @@
|
||||
// j_rarg0: Receiver
|
||||
|
||||
|
||||
- // Most registers are in use; we'll use r0, rmethod, r10, r11
|
||||
+ // Most registers are in use; we'll use r16, rmethod, r10, r11
|
||||
const Register recv_klass_reg = r10;
|
||||
- const Register holder_klass_reg = r0; // declaring interface klass (DECC)
|
||||
+ const Register holder_klass_reg = r16; // declaring interface klass (DECC)
|
||||
const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
|
||||
const Register temp_reg = r11;
|
||||
const Register icholder_reg = rscratch2;
|
@ -1,22 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User adinn
|
||||
# Date 1516984701 0
|
||||
# Fri Jan 26 16:38:21 2018 +0000
|
||||
# Node ID 2c35f60ad26425a6d1dd1071e8a5adde79154fe3
|
||||
# Parent e2a7856edfbaccebd36bf02674e39b1a53867241
|
||||
8196221: AArch64: Mistake in committed patch for JDK-8195859
|
||||
Summary: The wrong patch was committed for JDK-8195859
|
||||
Reviewed-by: duke
|
||||
|
||||
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||
@@ -1050,7 +1050,7 @@
|
||||
} else {
|
||||
vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
|
||||
ldr(method_result,
|
||||
- form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
|
||||
+ form_address(rscratch1, recv_klass, vtable_offset_in_bytes, 0));
|
||||
}
|
||||
}
|
||||
|
12
JDK-8201495-s390-java-opts.patch
Normal file
12
JDK-8201495-s390-java-opts.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up jdk9/common/autoconf/boot-jdk.m4 jdk9/common/autoconf/boot-jdk.m4
|
||||
--- jdk9/common/autoconf/boot-jdk.m4 16:01:27.000000000 -0400
|
||||
+++ jdk9/common/autoconf/boot-jdk.m4 2014-05-21 11:50:36.507890197 -0400
|
||||
@@ -405,7 +405,7 @@
|
||||
BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
|
||||
|
||||
# Maximum amount of heap memory and stack size.
|
||||
- JVM_HEAP_LIMIT_32="1024"
|
||||
+ JVM_HEAP_LIMIT_32="768"
|
||||
# Running a 64 bit JVM allows for and requires a bigger heap
|
||||
JVM_HEAP_LIMIT_64="1600"
|
||||
STACK_SIZE_32=768
|
@ -1,40 +0,0 @@
|
||||
--- jdk9/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:33.322164601 +0200
|
||||
+++ jdk9/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:57.958514071 +0200
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2012, Red Hat Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -84,7 +85,8 @@
|
||||
out.print("----------------- ");
|
||||
out.print(th);
|
||||
out.println(" -----------------");
|
||||
- while (f != null) {
|
||||
+ int maxStack = 256;
|
||||
+ while (f != null && maxStack-- > 0) {
|
||||
ClosestSymbol sym = f.closestSymbolToPC();
|
||||
Address pc = f.pc();
|
||||
out.print(pc + "\t");
|
||||
@@ -158,10 +160,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ Address oldPC = f.pc();
|
||||
+ Address oldFP = f.localVariableBase();
|
||||
f = f.sender(th);
|
||||
+ if (f != null
|
||||
+ && oldPC.equals(f.pc())
|
||||
+ && oldFP.equals(f.localVariableBase())) {
|
||||
+ // We didn't make any progress
|
||||
+ f = null;
|
||||
+ }
|
||||
}
|
||||
} catch (Exception exp) {
|
||||
- exp.printStackTrace();
|
||||
+ // exp.printStackTrace();
|
||||
+ out.println("bad stack: " + exp);
|
||||
// continue, may be we can do a better job for other threads
|
||||
}
|
||||
if (concurrentLocks) {
|
@ -1,14 +0,0 @@
|
||||
diff -r b515beb3b4ad jdk9/hotspot/src/share/vm/utilities/globalDefinitions.hpp
|
||||
--- jdk9/hotspot/src/share/vm/utilities/globalDefinitions.hpp Thu Jul 07 18:40:53 2016 +0100
|
||||
+++ jdk9/hotspot/src/share/vm/utilities/globalDefinitions.hpp Tue Jul 12 19:13:51 2016 +0100
|
||||
@@ -1163,8 +1163,10 @@
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
+#ifndef _GLIBCXX_STDLIB_H
|
||||
#define max(a,b) Do_not_use_max_use_MAX2_instead
|
||||
#define min(a,b) Do_not_use_min_use_MIN2_instead
|
||||
+#endif
|
||||
|
||||
// It is necessary to use templates here. Having normal overloaded
|
||||
// functions does not work because it is necessary to provide both 32-
|
@ -1,19 +0,0 @@
|
||||
diff -up jdk9/common/autoconf/boot-jdk.m4 jdk9/common/autoconf/boot-jdk.m4
|
||||
--- jdk9/common/autoconf/boot-jdk.m4 16:01:27.000000000 -0400
|
||||
+++ jdk9/common/autoconf/boot-jdk.m4 2014-05-21 11:50:36.507890197 -0400
|
||||
@@ -315,12 +315,12 @@
|
||||
fi
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
- ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
+ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs,[$JAVA])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
- ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
+ ADD_JVM_ARG_IF_OK([-Xmx768M],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
|
||||
|
@ -1,307 +0,0 @@
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-09-04 22:47:14.059845388 -0400
|
||||
@@ -2686,7 +2686,7 @@
|
||||
if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
|
||||
size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
|
||||
n_blks += CMSOldPLABReactivityFactor*multiple*n_blks;
|
||||
- n_blks = MIN2(n_blks, CMSOldPLABMax);
|
||||
+ n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax);
|
||||
}
|
||||
assert(n_blks > 0, "Error");
|
||||
_cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2014-09-04 22:47:14.061845394 -0400
|
||||
@@ -950,7 +950,7 @@
|
||||
if (free_percentage < desired_free_percentage) {
|
||||
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
|
||||
assert(desired_capacity >= capacity(), "invalid expansion size");
|
||||
- size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
|
||||
+ size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t)MinHeapDeltaBytes);
|
||||
if (PrintGCDetails && Verbose) {
|
||||
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
|
||||
gclog_or_tty->print_cr("\nFrom compute_new_size: ");
|
||||
@@ -6559,7 +6559,7 @@
|
||||
HeapWord* curAddr = _markBitMap.startWord();
|
||||
while (curAddr < _markBitMap.endWord()) {
|
||||
size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr);
|
||||
- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
|
||||
+ MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining));
|
||||
_markBitMap.clear_large_range(chunk);
|
||||
if (ConcurrentMarkSweepThread::should_yield() &&
|
||||
!foregroundGCIsActive() &&
|
||||
@@ -6858,7 +6858,7 @@
|
||||
return;
|
||||
}
|
||||
// Double capacity if possible
|
||||
- size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
|
||||
+ size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax);
|
||||
// Do not give up existing stack until we have managed to
|
||||
// get the double capacity that we desired.
|
||||
ReservedSpace rs(ReservedSpace::allocation_align_size_up(
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2014-09-04 22:47:14.063845410 -0400
|
||||
@@ -3767,7 +3767,7 @@
|
||||
// of things to do) or totally (at the very end).
|
||||
size_t target_size;
|
||||
if (partially) {
|
||||
- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
|
||||
+ target_size = MIN2((size_t)(_task_queue->max_elems()/3), (size_t) GCDrainStackTargetSize);
|
||||
} else {
|
||||
target_size = 0;
|
||||
}
|
||||
@@ -4605,7 +4605,7 @@
|
||||
// The > 0 check is to deal with the prev and next live bytes which
|
||||
// could be 0.
|
||||
if (*hum_bytes > 0) {
|
||||
- bytes = MIN2(HeapRegion::GrainBytes, *hum_bytes);
|
||||
+ bytes = MIN2(HeapRegion::GrainBytes, (size_t)*hum_bytes);
|
||||
*hum_bytes -= bytes;
|
||||
}
|
||||
return bytes;
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-09-04 22:47:14.065845427 -0400
|
||||
@@ -1730,7 +1730,7 @@
|
||||
|
||||
verify_region_sets_optional();
|
||||
|
||||
- size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
|
||||
+ size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes);
|
||||
ergo_verbose1(ErgoHeapSizing,
|
||||
"attempt heap expansion",
|
||||
ergo_format_reason("allocation request failed")
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2014-09-04 22:47:14.065845427 -0400
|
||||
@@ -160,7 +160,7 @@
|
||||
if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
|
||||
size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
|
||||
region_size = MAX2(average_heap_size / TARGET_REGION_NUMBER,
|
||||
- (uintx) MIN_REGION_SIZE);
|
||||
+ (size_t) MIN_REGION_SIZE);
|
||||
}
|
||||
|
||||
int region_size_log = log2_long((jlong) region_size);
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2014-09-04 22:47:14.067845443 -0400
|
||||
@@ -71,7 +71,7 @@
|
||||
if (_virtual_space != NULL && _virtual_space->expand_by(_reserved_byte_size)) {
|
||||
_region_start = covered_region.start();
|
||||
_region_size = covered_region.word_size();
|
||||
- idx_t* map = (idx_t*)_virtual_space->reserved_low_addr();
|
||||
+ BitMap::bm_word_t* map = (BitMap::bm_word_t*)_virtual_space->reserved_low_addr();
|
||||
_beg_bits.set_map(map);
|
||||
_beg_bits.set_size(bits / 2);
|
||||
_end_bits.set_map(map + words / 2);
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2014-09-04 22:47:14.068845451 -0400
|
||||
@@ -910,8 +910,8 @@
|
||||
void PSParallelCompact::initialize_dead_wood_limiter()
|
||||
{
|
||||
const size_t max = 100;
|
||||
- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
|
||||
- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
|
||||
+ _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
|
||||
+ _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
|
||||
_dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
|
||||
DEBUG_ONLY(_dwl_initialized = true;)
|
||||
_dwl_adjustment = normal_distribution(1.0);
|
||||
diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-09-04 22:47:14.068845451 -0400
|
||||
@@ -194,7 +194,7 @@
|
||||
const size_t num_overflow_elems = of_stack->size();
|
||||
const size_t space_available = queue->max_elems() - queue->size();
|
||||
const size_t num_take_elems = MIN3(space_available / 4,
|
||||
- ParGCDesiredObjsFromOverflowList,
|
||||
+ (size_t)ParGCDesiredObjsFromOverflowList,
|
||||
num_overflow_elems);
|
||||
// Transfer the most recent num_take_elems from the overflow
|
||||
// stack to our work queue.
|
||||
diff -ruN jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2014-09-04 22:55:49.271922585 -0400
|
||||
@@ -389,7 +389,7 @@
|
||||
uintx calculated_size = NewSize + OldSize;
|
||||
double shrink_factor = (double) MaxHeapSize / calculated_size;
|
||||
uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor), _gen_alignment);
|
||||
- FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), smaller_new_size));
|
||||
+ FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), (size_t)smaller_new_size));
|
||||
_initial_gen0_size = NewSize;
|
||||
|
||||
// OldSize is already aligned because above we aligned MaxHeapSize to
|
||||
@@ -437,7 +437,7 @@
|
||||
// yield a size that is too small) and bound it by MaxNewSize above.
|
||||
// Ergonomics plays here by previously calculating the desired
|
||||
// NewSize and MaxNewSize.
|
||||
- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
|
||||
+ max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
|
||||
}
|
||||
assert(max_new_size > 0, "All paths should set max_new_size");
|
||||
|
||||
@@ -459,23 +459,23 @@
|
||||
// lower limit.
|
||||
_min_gen0_size = NewSize;
|
||||
desired_new_size = NewSize;
|
||||
- max_new_size = MAX2(max_new_size, NewSize);
|
||||
+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
|
||||
} else if (FLAG_IS_ERGO(NewSize)) {
|
||||
// If NewSize is set ergonomically, we should use it as a lower
|
||||
// limit, but use NewRatio to calculate the initial size.
|
||||
_min_gen0_size = NewSize;
|
||||
desired_new_size =
|
||||
- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
|
||||
- max_new_size = MAX2(max_new_size, NewSize);
|
||||
+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
|
||||
+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
|
||||
} else {
|
||||
// For the case where NewSize is the default, use NewRatio
|
||||
// to size the minimum and initial generation sizes.
|
||||
// Use the default NewSize as the floor for these values. If
|
||||
// NewRatio is overly large, the resulting sizes can be too
|
||||
// small.
|
||||
- _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
|
||||
+ _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), (size_t)NewSize);
|
||||
desired_new_size =
|
||||
- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
|
||||
+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
|
||||
}
|
||||
|
||||
assert(_min_gen0_size > 0, "Sanity check");
|
||||
@@ -577,7 +577,7 @@
|
||||
} else {
|
||||
// It's been explicitly set on the command line. Use the
|
||||
// OldSize and then determine the consequences.
|
||||
- _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
|
||||
+ _min_gen1_size = MIN2((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
|
||||
_initial_gen1_size = OldSize;
|
||||
|
||||
// If the user has explicitly set an OldSize that is inconsistent
|
||||
diff -ruN jdk8/hotspot/src/share/vm/memory/metaspace.cpp jdk8/hotspot/src/share/vm/memory/metaspace.cpp
|
||||
--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2014-09-04 22:47:14.071845475 -0400
|
||||
@@ -1431,7 +1431,7 @@
|
||||
|
||||
void MetaspaceGC::post_initialize() {
|
||||
// Reset the high-water mark once the VM initialization is done.
|
||||
- _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
|
||||
+ _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
|
||||
}
|
||||
|
||||
bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
|
||||
@@ -1491,7 +1491,7 @@
|
||||
(size_t)MIN2(min_tmp, double(max_uintx));
|
||||
// Don't shrink less than the initial generation size
|
||||
minimum_desired_capacity = MAX2(minimum_desired_capacity,
|
||||
- MetaspaceSize);
|
||||
+ (size_t)MetaspaceSize);
|
||||
|
||||
if (PrintGCDetails && Verbose) {
|
||||
gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
|
||||
@@ -1546,7 +1546,7 @@
|
||||
const double max_tmp = used_after_gc / minimum_used_percentage;
|
||||
size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
|
||||
maximum_desired_capacity = MAX2(maximum_desired_capacity,
|
||||
- MetaspaceSize);
|
||||
+ (size_t)MetaspaceSize);
|
||||
if (PrintGCDetails && Verbose) {
|
||||
gclog_or_tty->print_cr(" "
|
||||
" maximum_free_percentage: %6.2f"
|
||||
@@ -3197,7 +3197,7 @@
|
||||
// on the medium chunk list. The next chunk will be small and progress
|
||||
// from there. This size calculated by -version.
|
||||
_first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
|
||||
- (CompressedClassSpaceSize/BytesPerWord)*2);
|
||||
+ (size_t)(CompressedClassSpaceSize/BytesPerWord)*2);
|
||||
_first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
|
||||
// Arbitrarily set the initial virtual space to a multiple
|
||||
// of the boot class loader size.
|
||||
diff -ruN jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
--- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2014-09-04 22:47:14.071845475 -0400
|
||||
@@ -48,7 +48,7 @@
|
||||
const size_t beg_index = size_t(index);
|
||||
assert(beg_index < len || len == 0, "index too large");
|
||||
|
||||
- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
|
||||
+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
|
||||
const size_t end_index = beg_index + stride;
|
||||
T* const base = (T*)a->base();
|
||||
T* const beg = base + beg_index;
|
||||
@@ -82,7 +82,7 @@
|
||||
const size_t beg_index = size_t(index);
|
||||
assert(beg_index < len || len == 0, "index too large");
|
||||
|
||||
- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
|
||||
+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
|
||||
const size_t end_index = beg_index + stride;
|
||||
T* const base = (T*)a->base();
|
||||
T* const beg = base + beg_index;
|
||||
diff -ruN jdk8/hotspot/src/share/vm/runtime/arguments.cpp jdk8/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2014-07-30 06:51:43.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2014-09-04 22:47:14.072845483 -0400
|
||||
@@ -1244,7 +1244,7 @@
|
||||
// NewSize was set on the command line and it is larger than
|
||||
// preferred_max_new_size.
|
||||
if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
|
||||
- FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
|
||||
+ FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t)NewSize, preferred_max_new_size));
|
||||
} else {
|
||||
FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
|
||||
}
|
||||
@@ -1269,8 +1269,8 @@
|
||||
// Unless explicitly requested otherwise, make young gen
|
||||
// at least min_new, and at most preferred_max_new_size.
|
||||
if (FLAG_IS_DEFAULT(NewSize)) {
|
||||
- FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
|
||||
- FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
|
||||
+ FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t)NewSize, min_new));
|
||||
+ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
|
||||
@@ -1280,7 +1280,7 @@
|
||||
// so it's NewRatio x of NewSize.
|
||||
if (FLAG_IS_DEFAULT(OldSize)) {
|
||||
if (max_heap > NewSize) {
|
||||
- FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
|
||||
+ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
|
||||
@@ -1401,7 +1401,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
-uintx Arguments::max_heap_for_compressed_oops() {
|
||||
+size_t Arguments::max_heap_for_compressed_oops() {
|
||||
// Avoid sign flip.
|
||||
assert(OopEncodingHeapMax > (uint64_t)os::vm_page_size(), "Unusual page size");
|
||||
// We need to fit both the NULL page and the heap into the memory budget, while
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp 2014-06-12 03:58:35.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp 2014-06-12 03:58:35.000000000 -0400
|
||||
@@ -38,7 +38,7 @@
|
||||
_cancel(false),
|
||||
_empty(true),
|
||||
_dropped(0) {
|
||||
- _nqueues = MAX2(ParallelGCThreads, (size_t)1);
|
||||
+ _nqueues = MAX2(ParallelGCThreads, (uintx)1);
|
||||
_queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
|
||||
for (size_t i = 0; i < _nqueues; i++) {
|
||||
new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2014-06-12 03:58:35.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2014-06-12 03:58:35.000000000 -0400
|
||||
@@ -110,7 +110,7 @@
|
||||
};
|
||||
|
||||
G1StringDedupEntryCache::G1StringDedupEntryCache() {
|
||||
- _nlists = MAX2(ParallelGCThreads, (size_t)1);
|
||||
+ _nlists = MAX2(ParallelGCThreads, (uintx)1);
|
||||
_lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
|
||||
}
|
||||
|
143
java-9-openjdk-size_t.patch
Normal file
143
java-9-openjdk-size_t.patch
Normal file
@ -0,0 +1,143 @@
|
||||
diff --git openjdk/hotspot/src/share/vm/code/codeCache.cpp openjdk/hotspot/src/share/vm/code/codeCache.cpp
|
||||
--- openjdk/hotspot/src/share/vm/code/codeCache.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp
|
||||
@@ -318,7 +318,7 @@ size_t CodeCache::heap_alignment() {
|
||||
ReservedCodeSpace CodeCache::reserve_heap_memory(size_t size) {
|
||||
// Determine alignment
|
||||
const size_t page_size = os::can_execute_large_page_memory() ?
|
||||
- MIN2(os::page_size_for_region_aligned(InitialCodeCacheSize, 8),
|
||||
+ MIN2(os::page_size_for_region_aligned((size_t)InitialCodeCacheSize, 8),
|
||||
os::page_size_for_region_aligned(size, 8)) :
|
||||
os::vm_page_size();
|
||||
const size_t granularity = os::vm_allocation_granularity();
|
||||
@@ -410,7 +410,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type)
|
||||
add_heap(heap);
|
||||
|
||||
// Reserve Space
|
||||
- size_t size_initial = MIN2(InitialCodeCacheSize, rs.size());
|
||||
+ size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size());
|
||||
size_initial = round_to(size_initial, os::vm_page_size());
|
||||
if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) {
|
||||
vm_exit_during_initialization("Could not reserve enough space for code cache");
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
|
||||
@@ -197,7 +197,7 @@ bool ParScanThreadState::take_from_overflow_stack() {
|
||||
const size_t num_overflow_elems = of_stack->size();
|
||||
const size_t space_available = queue->max_elems() - queue->size();
|
||||
const size_t num_take_elems = MIN3(space_available / 4,
|
||||
- ParGCDesiredObjsFromOverflowList,
|
||||
+ (size_t)ParGCDesiredObjsFromOverflowList,
|
||||
num_overflow_elems);
|
||||
// Transfer the most recent num_take_elems from the overflow
|
||||
// stack to our work queue.
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
|
||||
@@ -2458,7 +2458,7 @@ void G1CMTask::drain_local_queue(bool partially) {
|
||||
// of things to do) or totally (at the very end).
|
||||
size_t target_size;
|
||||
if (partially) {
|
||||
- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
|
||||
+ target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
|
||||
} else {
|
||||
target_size = 0;
|
||||
}
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp
|
||||
@@ -41,7 +41,7 @@ void G1CMObjArrayProcessor::push_array_slice(HeapWord* what) {
|
||||
}
|
||||
|
||||
size_t G1CMObjArrayProcessor::process_array_slice(objArrayOop obj, HeapWord* start_from, size_t remaining) {
|
||||
- size_t words_to_scan = MIN2(remaining, ObjArrayMarkingStride);
|
||||
+ size_t words_to_scan = MIN2(remaining, (size_t)ObjArrayMarkingStride);
|
||||
|
||||
if (remaining > ObjArrayMarkingStride) {
|
||||
push_array_slice(start_from + ObjArrayMarkingStride);
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/g1/g1PageBasedVirtualSpace.cpp
|
||||
@@ -99,7 +99,7 @@ size_t G1PageBasedVirtualSpace::uncommitted_size() const {
|
||||
return reserved_size() - committed_size();
|
||||
}
|
||||
|
||||
-size_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
|
||||
+uintptr_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
|
||||
return (addr - _low_boundary) / _page_size;
|
||||
}
|
||||
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/parallel/psCompactionManager.inline.hpp
|
||||
@@ -119,7 +119,7 @@ inline void oop_pc_follow_contents_specialized(objArrayOop obj, int index, ParCo
|
||||
const size_t beg_index = size_t(index);
|
||||
assert(beg_index < len || len == 0, "index too large");
|
||||
|
||||
- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
|
||||
+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
|
||||
const size_t end_index = beg_index + stride;
|
||||
T* const base = (T*)obj->base();
|
||||
T* const beg = base + beg_index;
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
|
||||
@@ -905,8 +905,8 @@ void PSParallelCompact::initialize_space_info()
|
||||
void PSParallelCompact::initialize_dead_wood_limiter()
|
||||
{
|
||||
const size_t max = 100;
|
||||
- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
|
||||
- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
|
||||
+ _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
|
||||
+ _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
|
||||
_dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
|
||||
DEBUG_ONLY(_dwl_initialized = true;)
|
||||
_dwl_adjustment = normal_distribution(1.0);
|
||||
diff --git openjdk/hotspot/src/share/vm/gc/shared/plab.cpp openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc/shared/plab.cpp
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
size_t PLAB::min_size() {
|
||||
// Make sure that we return something that is larger than AlignmentReserve
|
||||
- return align_object_size(MAX2(MinTLABSize / HeapWordSize, (uintx)oopDesc::header_size())) + AlignmentReserve;
|
||||
+ return align_object_size(MAX2(MinTLABSize / HeapWordSize, (size_t)oopDesc::header_size())) + AlignmentReserve;
|
||||
}
|
||||
|
||||
size_t PLAB::max_size() {
|
||||
diff --git openjdk/hotspot/src/share/vm/prims/whitebox.cpp openjdk/hotspot/src/share/vm/prims/whitebox.cpp
|
||||
--- openjdk/hotspot/src/share/vm/prims/whitebox.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/prims/whitebox.cpp
|
||||
@@ -1022,7 +1022,7 @@ WB_ENTRY(jobject, WB_GetUint64VMFlag(JNIEnv* env, jobject o, jstring name))
|
||||
WB_END
|
||||
|
||||
WB_ENTRY(jobject, WB_GetSizeTVMFlag(JNIEnv* env, jobject o, jstring name))
|
||||
- uintx result;
|
||||
+ size_t result;
|
||||
if (GetVMFlag <size_t> (thread, env, name, &result, &CommandLineFlags::size_tAt)) {
|
||||
ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI
|
||||
return longBox(thread, env, result);
|
||||
diff --git openjdk/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
@@ -1489,7 +1489,7 @@ void Arguments::set_tiered_flags() {
|
||||
// Increase the code cache size - tiered compiles a lot more.
|
||||
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
|
||||
FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
|
||||
- MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
|
||||
+ MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)(ReservedCodeCacheSize * 5)));
|
||||
}
|
||||
// Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
|
||||
if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
|
||||
diff --git openjdk/hotspot/src/share/vm/runtime/arguments.hpp openjdk/hotspot/src/share/vm/runtime/arguments.hpp
|
||||
--- openjdk/hotspot/src/share/vm/runtime/arguments.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/arguments.hpp
|
||||
@@ -416,7 +416,7 @@ class Arguments : AllStatic {
|
||||
// Value of the conservative maximum heap alignment needed
|
||||
static size_t _conservative_max_heap_alignment;
|
||||
|
||||
- static uintx _min_heap_size;
|
||||
+ static size_t _min_heap_size;
|
||||
|
||||
// -Xrun arguments
|
||||
static AgentLibraryList _libraryList;
|
@ -146,7 +146,7 @@
|
||||
# Standard JPackage naming and versioning defines.
|
||||
%global origin openjdk
|
||||
%global minorver 0
|
||||
%global buildver 11
|
||||
%global buildver 12
|
||||
# priority must be 7 digits in total
|
||||
#setting to 1, so debug ones can have 0
|
||||
%global priority 00000%{minorver}1
|
||||
@ -854,7 +854,7 @@ Provides: java-%{javaver}-%{origin}-accessiblity = %{epoch}:%{version}-%{release
|
||||
|
||||
Name: java-%{majorver}-%{origin}
|
||||
Version: %{newjavaver}.%{buildver}
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
|
||||
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
||||
# also included the epoch in their virtual provides. This created a
|
||||
@ -904,49 +904,32 @@ Source13: TestCryptoLevel.java
|
||||
# Ensure ECDSA is working
|
||||
Source14: TestECDSA.java
|
||||
|
||||
#
|
||||
# RPM/distribution specific patches
|
||||
#
|
||||
|
||||
Patch1000: enableCommentedOutSystemNss.patch
|
||||
|
||||
# Ignore AWTError when assistive technologies are loaded
|
||||
Patch1: accessible-toolkit.patch
|
||||
Patch1: accessible-toolkit.patch
|
||||
# Restrict access to java-atk-wrapper classes
|
||||
Patch3: java-atk-wrapper-security.patch
|
||||
# RHBZ 808293
|
||||
Patch4: PStack-808293.patch
|
||||
# Allow multiple initialization of PKCS11 libraries
|
||||
Patch5: multiple-pkcs11-library-init.patch
|
||||
Patch12: system-nss-ec-rh1537049.patch
|
||||
Patch13: libjpeg-turbo-1.4-compat.patch
|
||||
Patch2: java-atk-wrapper-security.patch
|
||||
Patch3: system-nss-ec-rh1537049.patch
|
||||
Patch4: libjpeg-turbo-1.4-compat.patch
|
||||
|
||||
#
|
||||
# OpenJDK specific patches
|
||||
#
|
||||
|
||||
# JVM heap size changes for s390 (thanks to aph)
|
||||
Patch100: java-1.9.0-openjdk-s390-java-opts.patch
|
||||
Patch100: JDK-8201495-s390-java-opts.patch
|
||||
# See JDK-8198844. This won't be needed any more in
|
||||
# JDK 11+
|
||||
Patch101: sorted-diff.patch
|
||||
# Type fixing for s390
|
||||
Patch102: java-1.9.0-openjdk-size_t.patch
|
||||
Patch103: hotspot-min-max-macros.patch
|
||||
Patch104: bootcycle_jobs.patch
|
||||
Patch102: java-9-openjdk-size_t.patch
|
||||
Patch103: bootcycle_jobs.patch
|
||||
|
||||
#Patch300: jstack-pr1845.patch
|
||||
|
||||
Patch400: ppc_stack_overflow_fix.patch
|
||||
Patch401: aarch64BuildFailure.patch
|
||||
|
||||
# Fix AArch64 build issues which got introduced with 9.0.4+11 (January 2018 CPU)
|
||||
#
|
||||
# JDK-8195685 AArch64 cannot build with JDK-8174962
|
||||
# JDK-8196136 AArch64: Correct register use in patch for JDK-8195685
|
||||
# JDK-8195859 AArch64: vtableStubs gtest fails after 8174962
|
||||
# JDK-8196221 AArch64: Mistake in committed patch for JDK-8195859
|
||||
Patch402: JDK-8195685-cannot-build-with-8174962.patch
|
||||
Patch403: JDK-8196136-correct-register-use-8195685.patch
|
||||
Patch404: JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
|
||||
Patch405: JDK-8196221-mistake-in-8195859.patch
|
||||
|
||||
# Non-OpenJDK fixes
|
||||
Patch1000: enableCommentedOutSystemNss.patch
|
||||
Patch400: aarch64BuildFailure.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -1231,34 +1214,16 @@ cp %{SOURCE2} .
|
||||
pushd openjdk
|
||||
sh %{SOURCE12}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
# s390 build fixes
|
||||
%ifarch s390
|
||||
%patch100 -p1
|
||||
%patch102 -p1
|
||||
%endif
|
||||
|
||||
%patch101 -p1
|
||||
#%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
|
||||
# Zero PPC fixes.
|
||||
# TODO: propose them upstream
|
||||
%patch400 -p1
|
||||
|
||||
%patch401 -p1
|
||||
pushd hotspot
|
||||
%patch402 -p1
|
||||
%patch403 -p1
|
||||
%patch404 -p1
|
||||
%patch405 -p1
|
||||
popd
|
||||
|
||||
popd # openjdk
|
||||
|
||||
%patch1000
|
||||
@ -1842,7 +1807,17 @@ require "copy_jdk_configs.lua"
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Apr 10 2018 MArtin Balao <mbalao@redhat.com> - 1:9.0.4.11-6
|
||||
* Tue Apr 17 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:9.0.4.11-7
|
||||
- Remove JDK-8195685, JDK-8196136, JDK-8195859, JDK-8196221
|
||||
now upstream.
|
||||
- Replace java-1.9.0-openjdk-s390-java-opts.patch with
|
||||
version from upstream. See JDK-8201495.
|
||||
- Remove multiple-pkcs11-library-init.patch, PStack-808293.patch
|
||||
hotspot-min-max-macros.patch, jstack-pr1845.patch,
|
||||
ppc_stack_overflow_fix.patch (see JDK-8201639) as they are
|
||||
no longer needed.
|
||||
|
||||
* Tue Apr 10 2018 Martin Balao <mbalao@redhat.com> - 1:9.0.4.11-6
|
||||
- deleted: removeSunEcProvider-RH1154143.patch
|
||||
- added: system-nss-ec-rh1537049.patch
|
||||
|
||||
|
@ -1,274 +0,0 @@
|
||||
diff -r c728621e76f2 tapset/jstack.stp.in
|
||||
--- tapset/jstack-9.stp.in Mon Jun 02 18:41:24 2014 +0100
|
||||
+++ tapset/jstack-9.stp.in Sat Jun 14 00:21:14 2014 +0900
|
||||
@@ -45,11 +45,7 @@
|
||||
semantic error: failed to retrieve location attribute for local
|
||||
*/
|
||||
|
||||
-global Universe_methodKlassObj;
|
||||
-global Universe_collectedHeap;
|
||||
-global HeapWordSize;
|
||||
global CodeCache_heap;
|
||||
-global NarrowOopStruct;
|
||||
|
||||
global sp_register;
|
||||
global fp_register;
|
||||
@@ -57,9 +53,8 @@
|
||||
global ptr_size;
|
||||
global ptr_mask;
|
||||
|
||||
-global constantPoolOopDesc_size;
|
||||
+global constantPool_size;
|
||||
global HeapBlock_Header_size;
|
||||
-global oopDesc_size;
|
||||
|
||||
global vm_inited;
|
||||
|
||||
@@ -67,26 +62,6 @@
|
||||
in a bare function and vm_init_end seems a good place to use. */
|
||||
probe hotspot.vm_init_end
|
||||
{
|
||||
- // The parent/type oop for a methodOop.
|
||||
- Universe_methodKlassObj[pid()] = %( systemtap_v >= "1.8"
|
||||
- %? @var("_methodKlassObj@universe.cpp")
|
||||
- %: $_methodKlassObj %);
|
||||
-
|
||||
- /**
|
||||
- * The Universe class holds some of the interesting statics for
|
||||
- * introspection into HotSpot. The CollectedHeap
|
||||
- * (Universe::_collectedHeap) is an abstraction of a java heap for Hotspot
|
||||
- * it contains a _reserved MemRegion which represents a contigous
|
||||
- * region of the address space consisting of HeapWords (which just
|
||||
- * have one field member char *i).
|
||||
- *
|
||||
- * Note that we access it through its "short name" _collectedHeap.
|
||||
- */
|
||||
- Universe_collectedHeap[pid()] = %( systemtap_v >= "1.8"
|
||||
- %? @var("_collectedHeap@universe.cpp")
|
||||
- %: $_collectedHeap %);
|
||||
- HeapWordSize[pid()] = $HeapWordSize;
|
||||
-
|
||||
/**
|
||||
* The CodeCache class contains the static CodeHeap _heap that
|
||||
* is malloced at the start of the vm run and holds all generated
|
||||
@@ -107,17 +82,6 @@
|
||||
%? @var("_heap@codeCache.cpp")
|
||||
%: $_heap %);
|
||||
|
||||
- /**
|
||||
- * Does target process use CompressedOops ?
|
||||
- */
|
||||
- NarrowOopStruct[pid()] = 0;
|
||||
- %( systemtap_v >= "1.8"
|
||||
- %? if (@var("UseCompressedOops@globals.cpp"))
|
||||
- NarrowOopStruct[pid()] = &@var("_narrow_oop@universe.cpp");
|
||||
- %: if($UseCompressedOops)
|
||||
- NarrowOopStruct[pid()] = $_narrow_oop;
|
||||
- %)
|
||||
-
|
||||
// Should really check arch of user space (for 32bit jvm on 64bit kernel).
|
||||
%( arch == "i386" %?
|
||||
sp_register = "esp";
|
||||
@@ -136,22 +100,17 @@
|
||||
|
||||
// Pretend we have an array at address zero and take address of second
|
||||
// element and we have the size.
|
||||
- constantPoolOopDesc_size = &@cast(0, "constantPoolOopDesc")[1];
|
||||
+ constantPool_size = &@cast(0, "ConstantPool")[1];
|
||||
|
||||
// Really should get from dwarf: @size("HeapBlock::Header"), @size("oopDesc")
|
||||
HeapBlock_Header_size = 2 * ptr_size;
|
||||
- oopDesc_size = 2 * ptr_size;
|
||||
|
||||
vm_inited[pid()] = 1;
|
||||
}
|
||||
|
||||
probe hotspot.vm_shutdown
|
||||
{
|
||||
- delete(Universe_methodKlassObj[pid()]);
|
||||
- delete(Universe_collectedHeap[pid()]);
|
||||
- delete(HeapWordSize[pid()]);
|
||||
delete(CodeCache_heap[pid()]);
|
||||
- delete(NarrowOopStruct[pid()]);
|
||||
delete(vm_inited[pid()]);
|
||||
}
|
||||
|
||||
@@ -262,15 +221,7 @@
|
||||
return frame;
|
||||
}
|
||||
|
||||
- // Extract heap and code bounds.
|
||||
- heap_start = @cast(Universe_collectedHeap[pid()],
|
||||
- "CollectedHeap",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_reserved->_start;
|
||||
- heap_size = HeapWordSize[pid()] * @cast(Universe_collectedHeap[pid()],
|
||||
- "CollectedHeap",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_reserved->_word_size;
|
||||
- heap_end = heap_start + heap_size;
|
||||
-
|
||||
+ // Extract code bounds.
|
||||
CodeCache_low = @cast(CodeCache_heap[pid()], "CodeHeap",
|
||||
"@ABS_SERVER_LIBJVM_SO@")->_memory->_low;
|
||||
CodeCache_high = @cast(CodeCache_heap[pid()], "CodeHeap",
|
||||
@@ -351,105 +302,69 @@
|
||||
// For the interpreter (and other code blobs) it is on the
|
||||
// stack relative to the frame pointer.
|
||||
if (blob_name == "nmethod")
|
||||
- methodOopPtr = @cast(blob, "nmethod",
|
||||
+ methodPtr = @cast(blob, "nmethod",
|
||||
"@ABS_SERVER_LIBJVM_SO@")->_method
|
||||
else
|
||||
- methodOopPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
|
||||
-
|
||||
- // Start optimistic. A methodOop is only valid if it was
|
||||
- // heap allocated. And if the "type class" oop equals the
|
||||
- // Universe::methodKlassObj.
|
||||
- if (heap_start > methodOopPtr || methodOopPtr >= heap_end)
|
||||
- isMethodOop = 0
|
||||
- else
|
||||
- {
|
||||
- if (NarrowOopStruct[pid()])
|
||||
- {
|
||||
- methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_metadata->_compressed_klass;
|
||||
- methodOopKlass = (@cast(NarrowOopStruct[pid()],
|
||||
- "NarrowOopStruct",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_base
|
||||
- + (methodOopKlass
|
||||
- << @cast(NarrowOopStruct[pid()],
|
||||
- "NarrowOopStruct",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_shift));
|
||||
- }
|
||||
- else
|
||||
- methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_metadata->_klass;
|
||||
+ methodPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
|
||||
|
||||
- isMethodOop = (methodOopKlass == Universe_methodKlassObj[pid()]);
|
||||
- }
|
||||
+ // The java class is the holder of the constants (strings)
|
||||
+ // that describe the method and signature. This constant pool
|
||||
+ // contains symbolic information that describe the properties
|
||||
+ // of the class. The indexes for methods and signaturates in
|
||||
+ // the constant pool are Symbols that contain utf8
|
||||
+ // strings (plus lenghts). (We could also sanity check that
|
||||
+ // the tag value is correct [CONSTANT_String = 8]).
|
||||
+ // Note that the class name uses '/' instead of '.' as
|
||||
+ // package name separator and that the method signature is
|
||||
+ // encoded as a method descriptor string. Both of which we
|
||||
+ // don't demangle here.
|
||||
+ constMethod = @cast(methodPtr, "Method",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_constMethod;
|
||||
+ constantPool = @cast(constMethod, "ConstMethod",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_constants;
|
||||
+ constantPool_base = constantPool + constantPool_size;
|
||||
+
|
||||
+ klass = @cast(constantPool, "ConstantPool",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
|
||||
+ klassSymbol = @cast(klass, "Klass",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_name;
|
||||
+ klassName = &@cast(klassSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
+ klassLength = @cast(klassSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
+
|
||||
+ methodIndex = @cast(constMethod, "ConstMethod",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_name_index;
|
||||
+ methodSymbol = user_long(constantPool_base + (methodIndex * ptr_size));
|
||||
+ methodName = &@cast(methodSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
+ methodLength = @cast(methodSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
|
||||
- if (isMethodOop)
|
||||
+ if (log_sig)
|
||||
{
|
||||
- // The java class is the holder of the constants (strings)
|
||||
- // that describe the method and signature. This constant pool
|
||||
- // contains symbolic information that describe the properties
|
||||
- // of the class. The indexes for methods and signaturates in
|
||||
- // the constant pool are Symbols that contain utf8
|
||||
- // strings (plus lenghts). (We could also sanity check that
|
||||
- // the tag value is correct [CONSTANT_String = 8]).
|
||||
- // Note that the class name uses '/' instead of '.' as
|
||||
- // package name separator and that the method signature is
|
||||
- // encoded as a method descriptor string. Both of which we
|
||||
- // don't demangle here.
|
||||
- constantPoolOopDesc = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_constants;
|
||||
- constantPoolOop_base = constantPoolOopDesc + constantPoolOopDesc_size;
|
||||
-
|
||||
- klassPtr = @cast(constantPoolOopDesc, "constantPoolOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
|
||||
- klassSymbol = @cast(klassPtr + oopDesc_size, "Klass",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_name;
|
||||
- klassName = &@cast(klassSymbol, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
- klassLength = @cast(klassSymbol, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
-
|
||||
- methodIndex = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_constMethod->_name_index;
|
||||
- methodOopDesc = user_long(constantPoolOop_base + (methodIndex * ptr_size)) - 1;
|
||||
- methodName = &@cast(methodOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
- methodLength = @cast(methodOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
-
|
||||
- if (log_sig)
|
||||
- {
|
||||
- sigIndex = @cast(methodOopPtr, "methodOopDesc",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_constMethod->_signature_index;
|
||||
- sigOopDesc = user_long(constantPoolOop_base
|
||||
- + (sigIndex * ptr_size)) - 1;
|
||||
- sigName = &@cast(sigOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
- sigLength = @cast(sigOopDesc, "Symbol",
|
||||
- "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
- sig = user_string_n(sigName, sigLength);
|
||||
- }
|
||||
- else
|
||||
- sig = "";
|
||||
-
|
||||
- code_name = (log_native
|
||||
- ? sprintf("<%s@0x%x>",
|
||||
- str_replace(blob_name, " ", "_"), pc)
|
||||
- : "");
|
||||
-
|
||||
- frame = sprintf("%s.%s%s%s",
|
||||
- user_string_n(klassName, klassLength),
|
||||
- user_string_n(methodName, methodLength),
|
||||
- sig, code_name);
|
||||
+ sigIndex = @cast(constMethod, "ConstMethod",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_signature_index;
|
||||
+ sigSymbol = user_long(constantPool_base
|
||||
+ + (sigIndex * ptr_size));
|
||||
+ sigName = &@cast(sigSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_body[0];
|
||||
+ sigLength = @cast(sigSymbol, "Symbol",
|
||||
+ "@ABS_SERVER_LIBJVM_SO@")->_length;
|
||||
+ sig = user_string_n(sigName, sigLength);
|
||||
}
|
||||
else
|
||||
- {
|
||||
- // This is probably just an internal function, not a java
|
||||
- // method, just print the blob_name and continue.
|
||||
- // fp is probably still trusted.
|
||||
- if (log_native)
|
||||
- frame = sprintf("<%s@0x%x>",
|
||||
- str_replace(blob_name, " ", "_"), pc);
|
||||
- }
|
||||
+ sig = "";
|
||||
+
|
||||
+ code_name = (log_native
|
||||
+ ? sprintf("<%s@0x%x>",
|
||||
+ str_replace(blob_name, " ", "_"), pc)
|
||||
+ : "");
|
||||
+
|
||||
+ frame = sprintf("%s.%s%s%s",
|
||||
+ user_string_n(klassName, klassLength),
|
||||
+ user_string_n(methodName, methodLength),
|
||||
+ sig, code_name);
|
||||
|
||||
// We cannot trust the frame pointer of compiled methods.
|
||||
// The server (c2) jit compiler uses the fp register.
|
@ -1,74 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1352129932 0
|
||||
# Node ID e9c857dcb964dbfa5eef3a3590244cb4d999cf7a
|
||||
# Parent 1406789608b76d0906881979335d685855f44190
|
||||
Allow multiple PKCS11 library initialisation to be a non-critical error.
|
||||
|
||||
diff -r 1406789608b7 -r e9c857dcb964 src/share/classes/sun/security/pkcs11/Config.java
|
||||
--- jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java Tue Oct 30 13:05:14 2012 +0000
|
||||
+++ jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java Mon Nov 05 15:38:52 2012 +0000
|
||||
@@ -52,6 +52,7 @@
|
||||
static final int ERR_HALT = 1;
|
||||
static final int ERR_IGNORE_ALL = 2;
|
||||
static final int ERR_IGNORE_LIB = 3;
|
||||
+ static final int ERR_IGNORE_MULTI_INIT = 4;
|
||||
|
||||
// same as allowSingleThreadedModules but controlled via a system property
|
||||
// and applied to all providers. if set to false, no SunPKCS11 instances
|
||||
@@ -980,6 +981,8 @@
|
||||
handleStartupErrors = ERR_IGNORE_LIB;
|
||||
} else if (val.equals("halt")) {
|
||||
handleStartupErrors = ERR_HALT;
|
||||
+ } else if (val.equals("ignoreMultipleInitialisation")) {
|
||||
+ handleStartupErrors = ERR_IGNORE_MULTI_INIT;
|
||||
} else {
|
||||
throw excToken("Invalid value for handleStartupErrors:");
|
||||
}
|
||||
diff -r 1406789608b7 -r e9c857dcb964 src/share/classes/sun/security/pkcs11/SunPKCS11.java
|
||||
--- jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java Tue Oct 30 13:05:14 2012 +0000
|
||||
+++ jdk9/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java Mon Nov 05 15:38:52 2012 +0000
|
||||
@@ -168,26 +168,37 @@
|
||||
String nssLibraryDirectory = config.getNssLibraryDirectory();
|
||||
String nssSecmodDirectory = config.getNssSecmodDirectory();
|
||||
boolean nssOptimizeSpace = config.getNssOptimizeSpace();
|
||||
+ int errorHandling = config.getHandleStartupErrors();
|
||||
|
||||
if (secmod.isInitialized()) {
|
||||
if (nssSecmodDirectory != null) {
|
||||
String s = secmod.getConfigDir();
|
||||
if ((s != null) &&
|
||||
(s.equals(nssSecmodDirectory) == false)) {
|
||||
- throw new ProviderException("Secmod directory "
|
||||
- + nssSecmodDirectory
|
||||
- + " invalid, NSS already initialized with "
|
||||
- + s);
|
||||
+ String msg = "Secmod directory " + nssSecmodDirectory
|
||||
+ + " invalid, NSS already initialized with " + s;
|
||||
+ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
|
||||
+ errorHandling == Config.ERR_IGNORE_ALL) {
|
||||
+ throw new UnsupportedOperationException(msg);
|
||||
+ } else {
|
||||
+ throw new ProviderException(msg);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
if (nssLibraryDirectory != null) {
|
||||
String s = secmod.getLibDir();
|
||||
if ((s != null) &&
|
||||
(s.equals(nssLibraryDirectory) == false)) {
|
||||
- throw new ProviderException("NSS library directory "
|
||||
+ String msg = "NSS library directory "
|
||||
+ nssLibraryDirectory
|
||||
+ " invalid, NSS already initialized with "
|
||||
- + s);
|
||||
+ + s;
|
||||
+ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
|
||||
+ errorHandling == Config.ERR_IGNORE_ALL) {
|
||||
+ throw new UnsupportedOperationException(msg);
|
||||
+ } else {
|
||||
+ throw new ProviderException(msg);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
} else {
|
@ -1,48 +0,0 @@
|
||||
diff --git a/src/cpu/zero/vm/stack_zero.hpp b/src/cpu/zero/vm/stack_zero.hpp
|
||||
--- jdk9/hotspot/src/cpu/zero/vm/stack_zero.hpp
|
||||
+++ jdk9/hotspot/src/cpu/zero/vm/stack_zero.hpp
|
||||
@@ -99,7 +99,7 @@
|
||||
int shadow_pages_size() const {
|
||||
return _shadow_pages_size;
|
||||
}
|
||||
- int abi_stack_available(Thread *thread) const;
|
||||
+ ssize_t abi_stack_available(Thread *thread) const;
|
||||
|
||||
public:
|
||||
void overflow_check(int required_words, TRAPS);
|
||||
diff --git a/src/cpu/zero/vm/stack_zero.inline.hpp b/src/cpu/zero/vm/stack_zero.inline.hpp
|
||||
--- jdk9/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
|
||||
+++ jdk9/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
|
||||
@@ -47,12 +47,12 @@
|
||||
// This method returns the amount of ABI stack available for us
|
||||
// to use under normal circumstances. Note that the returned
|
||||
// value can be negative.
|
||||
-inline int ZeroStack::abi_stack_available(Thread *thread) const {
|
||||
+inline ssize_t ZeroStack::abi_stack_available(Thread *thread) const {
|
||||
guarantee(Thread::current() == thread, "should run in the same thread");
|
||||
- int stack_used = thread->stack_base() - (address) &stack_used
|
||||
+ ssize_t stack_used = thread->stack_base() - (address) &stack_used
|
||||
+ (JavaThread::stack_guard_zone_size() + JavaThread::stack_shadow_zone_size());
|
||||
- int stack_free = thread->stack_size() - stack_used;
|
||||
+ ssize_t stack_free = thread->stack_size() - stack_used;
|
||||
return stack_free;
|
||||
}
|
||||
|
||||
#endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
|
||||
diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
|
||||
--- jdk9/hotspot/src/os/posix/vm/os_posix.cpp
|
||||
+++ jdk9/hotspot/src/os/posix/vm/os_posix.cpp
|
||||
@@ -4791,6 +4791,13 @@
|
||||
JavaThread::stack_shadow_zone_size();
|
||||
|
||||
_java_thread_min_stack_allowed = align_size_up(_java_thread_min_stack_allowed, vm_page_size());
|
||||
+#ifdef ZERO
|
||||
+ // If this is Zero, allow at the very minimum one page each for the
|
||||
+ // Zero stack and the native stack. This won't make any difference
|
||||
+ // for 4k pages, but is significant for large pages.
|
||||
+ _java_thread_min_stack_allowed = MAX2(_java_thread_min_stack_allowed,
|
||||
+ align_size_up((size_t)(JavaThread::stack_guard_zone_size()+JavaThread::stack_shadow_zone_size()+2) * vm_page_size(), vm_page_size());
|
||||
+#endif
|
||||
|
||||
size_t stack_size_in_bytes = ThreadStackSize * K;
|
||||
if (stack_size_in_bytes != 0 &&
|
2
sources
2
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (jdk-updates-jdk9u-jdk-9.0.4+11.tar.xz) = 88e07166a2b0b447489b0b33ae45da1184f57ee8ca108e2b9d2d356e00003111512f5b7af2d364219c6478ecede9e8bd5f9ee51669e8a73a7572b5451d075634
|
||||
SHA512 (jdk-updates-jdk9u-jdk-9.0.4+12.tar.xz) = 73e1d2a40e47bc4856d07b198e81b1215867f83fa74eb471eb77fd8fe5f8c133c12cf9b1c588e02e8845e0d5480c56c4f26ce0aef666557a04aca7c3200628ca
|
||||
SHA512 (systemtap-tapset-3.6.0pre02.tar.xz) = 848f42ef7ca751e723fd50e3a6da14c0965ad4da37ea3331568658e27497b7a7e4b9aad3dedd264ad0bb5566c37a92302b905f10258a4e2c89dc4ba609e55481
|
||||
|
Loading…
Reference in New Issue
Block a user