Skip to content

Commit 2c36f5f

Browse files
author
J. Duke
committed
Merge
2 parents ac462ed + f66300e commit 2c36f5f

File tree

633 files changed

+11349
-4034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

633 files changed

+11349
-4034
lines changed

.hgtags-top-repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,4 @@ a24702d4d5ab0015a5c553ed57f66fce7d85155e jdk-9+132
378378
be1218f792a450dfb5d4b1f82616b9d95a6a732e jdk-9+133
379379
065724348690eda41fc69112278d8da6dcde548c jdk-9+134
380380
82b94cb5f342319d2cda77f9fa59703ad7fde576 jdk-9+135
381+
3ec350f5f32af249b59620d7e37b54bdcd77b233 jdk-9+136

corba/.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,4 @@ f7e1d5337c2e550fe553df7a3886bbed80292ecd jdk-9+131
378378
2021bfedf1c478a4808a7711a6090682a12f4c0e jdk-9+133
379379
1a497f5ca0cfd88115cc7daa8af8a62b8741caf2 jdk-9+134
380380
094d0db606db976045f594dba47d4593b715cc81 jdk-9+135
381+
aa053a3faf266c12b4fd5272da431a3e08e4a3e3 jdk-9+136

hotspot/.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,3 +538,4 @@ e96b34b76d863ed1fa04e0eeb3f297ac17b490fd jdk-9+129
538538
a25e0fb6033245ab075136e744d362ce765464cd jdk-9+133
539539
b8b694c6b4d2ab0939aed7adaf0eec1ac321a085 jdk-9+134
540540
3b1c4562953db47e36b237a500f368d5c9746d47 jdk-9+135
541+
a20da289f646ee44440695b81abc0548330e4ca7 jdk-9+136

hotspot/make/symbols/symbols-unix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ JVM_FindSignal
6767
JVM_FreeMemory
6868
JVM_GC
6969
JVM_GetAllThreads
70+
JVM_GetAndClearReferencePendingList
7071
JVM_GetArrayElement
7172
JVM_GetArrayLength
7273
JVM_GetCallerClass
@@ -130,6 +131,7 @@ JVM_GetSystemPackages
130131
JVM_GetTemporaryDirectory
131132
JVM_GetVmArguments
132133
JVM_Halt
134+
JVM_HasReferencePendingList
133135
JVM_HoldsLock
134136
JVM_IHashCode
135137
JVM_InitProperties
@@ -179,6 +181,7 @@ JVM_SuspendThread
179181
JVM_ToStackTraceElement
180182
JVM_TotalMemory
181183
JVM_UnloadLibrary
184+
JVM_WaitForReferencePendingList
182185
JVM_Yield
183186

184187
# Module related API's

hotspot/src/cpu/x86/vm/globals_x86.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ define_pd_global(intx, InlineSmallCode, 1000);
6565
#ifdef AMD64
6666
// Very large C++ stack frames using solaris-amd64 optimized builds
6767
// due to lack of optimization caused by C++ compiler bugs
68-
#define DEFAULT_STACK_SHADOW_PAGES (NOT_WIN64(20) WIN64_ONLY(6) DEBUG_ONLY(+2))
68+
#define DEFAULT_STACK_SHADOW_PAGES (NOT_WIN64(20) WIN64_ONLY(7) DEBUG_ONLY(+2))
6969
// For those clients that do not use write socket, we allow
7070
// the min range value to be below that of the default
71-
#define MIN_STACK_SHADOW_PAGES (NOT_WIN64(10) WIN64_ONLY(6) DEBUG_ONLY(+2))
71+
#define MIN_STACK_SHADOW_PAGES (NOT_WIN64(10) WIN64_ONLY(7) DEBUG_ONLY(+2))
7272
#else
7373
#define DEFAULT_STACK_SHADOW_PAGES (4 DEBUG_ONLY(+5))
7474
#define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES

hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
package sun.jvm.hotspot.gc.g1;
2626

27+
import java.io.PrintStream;
2728
import java.util.Iterator;
2829
import java.util.Observable;
2930
import java.util.Observer;
@@ -125,6 +126,15 @@ public CollectedHeapName kind() {
125126
return CollectedHeapName.G1_COLLECTED_HEAP;
126127
}
127128

129+
@Override
130+
public void printOn(PrintStream tty) {
131+
MemRegion mr = reservedRegion();
132+
133+
tty.print("garbage-first heap");
134+
tty.print(" [" + mr.start() + ", " + mr.end() + "]");
135+
tty.println(" region size " + (HeapRegion.grainBytes() / 1024) + "K");
136+
}
137+
128138
public G1CollectedHeap(Address addr) {
129139
super(addr);
130140
}

hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
public class MethodData extends Metadata implements MethodDataInterface<Klass,Method> {
3737
static int TypeProfileWidth = 2;
3838
static int BciProfileWidth = 2;
39+
static int MethodProfileWidth = 0;
3940
static int CompileThreshold;
4041

4142
static int Reason_many; // indicates presence of several reasons
@@ -142,6 +143,8 @@ private static synchronized void initialize(TypeDataBase db) throws WrongTypeExc
142143
TypeProfileWidth = (int)flag.getIntx();
143144
} else if (flag.getName().equals("BciProfileWidth")) {
144145
BciProfileWidth = (int)flag.getIntx();
146+
} else if (flag.getName().equals("MethodProfileWidth")) {
147+
MethodProfileWidth = (int)flag.getIntx();
145148
} else if (flag.getName().equals("CompileThreshold")) {
146149
CompileThreshold = (int)flag.getIntx();
147150
}
@@ -154,7 +157,7 @@ private static synchronized void initialize(TypeDataBase db) throws WrongTypeExc
154157

155158
parametersTypeDataDi = new CIntField(type.getCIntegerField("_parameters_type_data_di"), 0);
156159

157-
sizeofMethodDataOopDesc = (int)type.getSize();;
160+
sizeofMethodDataOopDesc = (int)type.getSize();
158161

159162
Reason_many = db.lookupIntConstant("Deoptimization::Reason_many").intValue();
160163
Reason_none = db.lookupIntConstant("Deoptimization::Reason_none").intValue();
@@ -257,7 +260,7 @@ int size() {
257260

258261
ParametersTypeData<Klass,Method> parametersTypeData() {
259262
int di = (int)parametersTypeDataDi.getValue(getAddress());
260-
if (di == -1) {
263+
if (di == -1 || di == -2) {
261264
return null;
262265
}
263266
DataLayout dataLayout = new DataLayout(this, di + (int)data.getOffset());

hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ReceiverTypeData.java

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -38,9 +38,21 @@
3838
// that the check is reached, and a series of (Klass, count) pairs
3939
// which are used to store a type profile for the receiver of the check.
4040
public class ReceiverTypeData<K,M> extends CounterData {
41-
static final int receiver0Offset = counterCellCount;
42-
static final int count0Offset = receiver0Offset + 1;
43-
static final int receiverTypeRowCellCount = (count0Offset + 1) - receiver0Offset;
41+
static final int INCLUDE_JVMCI;
42+
static final int nonProfiledCountOffset = counterCellCount;
43+
static final int receiver0Offset;
44+
static final int count0Offset;
45+
static final int receiverTypeRowCellCount;
46+
static {
47+
INCLUDE_JVMCI = VM.getVM().getTypeDataBase().lookupIntConstant("INCLUDE_JVMCI");
48+
if (INCLUDE_JVMCI == 1) {
49+
receiver0Offset = nonProfiledCountOffset + 1;
50+
} else {
51+
receiver0Offset = counterCellCount;
52+
}
53+
count0Offset = receiver0Offset + 1;
54+
receiverTypeRowCellCount = (count0Offset + 1) - receiver0Offset;
55+
}
4456
final MethodDataInterface<K,M> methodData;
4557

4658
public ReceiverTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
@@ -53,7 +65,11 @@ public ReceiverTypeData(MethodDataInterface<K,M> methodData, DataLayout layout)
5365
boolean isReceivertypedata() { return true; }
5466

5567
static int staticCellCount() {
56-
return counterCellCount + MethodData.TypeProfileWidth * receiverTypeRowCellCount;
68+
int cellCount = counterCellCount + MethodData.TypeProfileWidth * receiverTypeRowCellCount;
69+
if (INCLUDE_JVMCI == 1) {
70+
cellCount += 1;
71+
}
72+
return cellCount;
5773
}
5874

5975
public int cellCount() {

hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/VirtualCallData.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,11 @@ public VirtualCallData(MethodDataInterface<K,M> methodData, DataLayout layout) {
4444
static int staticCellCount() {
4545
// At this point we could add more profile state, e.g., for arguments.
4646
// But for now it's the same size as the base record type.
47-
return ReceiverTypeData.staticCellCount();
47+
int cellCount = ReceiverTypeData.staticCellCount();
48+
if (INCLUDE_JVMCI == 1) {
49+
cellCount += MethodData.MethodProfileWidth * receiverTypeRowCellCount;
50+
}
51+
return cellCount;
4852
}
4953

5054
public int cellCount() {

hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ private static synchronized void initialize(TypeDataBase db) {
129129
virtualConstructor.addMapping("CompilerThread", CompilerThread.class);
130130
virtualConstructor.addMapping("CodeCacheSweeperThread", CodeCacheSweeperThread.class);
131131
}
132-
// for now, use JavaThread itself. fix it later with appropriate class if needed
133-
virtualConstructor.addMapping("ReferencePendingListLockerThread", JavaThread.class);
134132
virtualConstructor.addMapping("JvmtiAgentThread", JvmtiAgentThread.class);
135133
virtualConstructor.addMapping("ServiceThread", ServiceThread.class);
136134
}
@@ -172,7 +170,7 @@ public JavaThread createJavaThreadWrapper(Address threadAddr) {
172170
return thread;
173171
} catch (Exception e) {
174172
throw new RuntimeException("Unable to deduce type of thread from address " + threadAddr +
175-
" (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, ReferencePendingListLockerThread, or CodeCacheSweeperThread)", e);
173+
" (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread or CodeCacheSweeperThread)", e);
176174
}
177175
}
178176

hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/sa.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,6 @@ vmType2Class["InterpreterCodelet"] = sapkg.interpreter.InterpreterCodelet;
837837
vmType2Class["JavaThread"] = sapkg.runtime.JavaThread;
838838
vmType2Class["CompilerThread"] = sapkg.runtime.CompilerThread;
839839
vmType2Class["CodeCacheSweeperThread"] = sapkg.runtime.CodeCacheSweeperThread;
840-
vmType2Class["ReferencePendingListLockerThread"] = sapkg.runtime.JavaThread;
841840
vmType2Class["DebuggerThread"] = sapkg.runtime.DebuggerThread;
842841

843842
// gc

hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,20 @@ public static CompilerToVM compilerToVM() {
244244
native void resolveInvokeDynamicInPool(HotSpotConstantPool constantPool, int cpi);
245245

246246
/**
247-
* Ensures that the type referenced by the entry for a
247+
* If {@code cpi} denotes an entry representing a
248248
* <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.9">signature
249-
* polymorphic</a> method at index {@code cpi} in {@code constantPool} is loaded and
250-
* initialized.
251-
*
252-
* The behavior of this method is undefined if {@code cpi} does not denote an entry representing
253-
* a signature polymorphic method.
249+
* polymorphic</a> method, this method ensures that the type referenced by the entry is loaded
250+
* and initialized. It {@code cpi} does not denote a signature polymorphic method, this method
251+
* does nothing.
254252
*/
255253
native void resolveInvokeHandleInPool(HotSpotConstantPool constantPool, int cpi);
256254

255+
/**
256+
* Gets the list of type names (in the format of {@link JavaType#getName()}) denoting the
257+
* classes that define signature polymorphic methods.
258+
*/
259+
native String[] getSignaturePolymorphicHolders();
260+
257261
/**
258262
* Gets the resolved type denoted by the entry at index {@code cpi} in {@code constantPool}.
259263
*
@@ -348,6 +352,7 @@ public static CompilerToVM compilerToVM() {
348352
* [String name, Long value, ...] vmConstants,
349353
* [String name, Long value, ...] vmAddresses,
350354
* VMFlag[] vmFlags
355+
* VMIntrinsicMethod[] vmIntrinsics
351356
* ]
352357
* </pre>
353358
*
@@ -610,4 +615,5 @@ public static CompilerToVM compilerToVM() {
610615
* @return the number of bytes required for deoptimization of this frame state
611616
*/
612617
native int interpreterFrameSize(BytecodeFrame frame);
618+
613619
}

0 commit comments

Comments
 (0)