mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 06:29:37 +00:00
Merge
This commit is contained in:
commit
08c8e0bd31
1
.hgtags
1
.hgtags
@ -287,3 +287,4 @@ b409bc51bc23cfd51f2bd04ea919ec83535af9d0 jdk9-b37
|
||||
3107be2ba9c6e208a0b86bc7100a141abbc5b5fb jdk9-b42
|
||||
6494b13f88a867026ee316b444d9a4fa589dd6bd jdk9-b43
|
||||
abbfccd659b91a7bb815d5e36fed635dcdd40f31 jdk9-b44
|
||||
bfc24ae2b900187585079bb11e66e459d1e525fe jdk9-b45
|
||||
|
||||
@ -287,3 +287,4 @@ cf136458ee747e151a27aa9ea0c1492ea55ef3e7 jdk9-b40
|
||||
f7c11da0b0481d49cc7a65a453336c108191e821 jdk9-b42
|
||||
02ee8c65622e8bd97496d584e22fc7dcf0edc4ae jdk9-b43
|
||||
8994f5d87b3bb5e8d317d4e8ccb326da1a73684a jdk9-b44
|
||||
3dd628fde2086218d548841022ee8436b6b88185 jdk9-b45
|
||||
|
||||
7
Makefile
7
Makefile
@ -54,8 +54,11 @@ ifneq ($(findstring qp,$(MAKEFLAGS)),)
|
||||
# Duplication of global targets, needed before ParseConfAndSpec in case we have
|
||||
# no configurations.
|
||||
help:
|
||||
# If CONF is not set, look for all available configurations
|
||||
CONF?=
|
||||
# If both CONF and SPEC are unset, look for all available configurations by
|
||||
# setting CONF to the empty string.
|
||||
ifeq ($(SPEC), )
|
||||
CONF?=
|
||||
endif
|
||||
endif
|
||||
|
||||
# ... and then we can include our helper functions
|
||||
|
||||
@ -4329,7 +4329,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1418395009
|
||||
DATE_WHEN_GENERATED=1420811523
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -27408,8 +27408,8 @@ $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
|
||||
# The trailing space for everyone except PATH is no typo, but is needed due
|
||||
# to trailing \ in the Windows paths. These will be stripped later.
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
|
||||
@ -690,10 +690,15 @@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@
|
||||
# Images directory definitions
|
||||
JDK_IMAGE_SUBDIR:=jdk
|
||||
JRE_IMAGE_SUBDIR:=jre
|
||||
|
||||
# Colon left out to be able to override output dir for bootcycle-images
|
||||
JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
|
||||
JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
|
||||
|
||||
# Test image, as above
|
||||
TEST_IMAGE_SUBDIR:=test
|
||||
TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
|
||||
|
||||
# Macosx bundles directory definitions
|
||||
JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
|
||||
JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
|
||||
|
||||
@ -173,8 +173,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
# The trailing space for everyone except PATH is no typo, but is needed due
|
||||
# to trailing \ in the Windows paths. These will be stripped later.
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
|
||||
@ -26,10 +26,8 @@ corba/src/java.corba/share/classes/com/sun/org/omg : corba/src/share/classes/com
|
||||
corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl : corba/src/share/classes/com/sun/tools/corba/se/idl
|
||||
corba/src/java.corba/share/classes/javax/activity : corba/src/share/classes/javax/activity
|
||||
corba/src/java.corba/share/classes/javax/rmi : corba/src/share/classes/javax/rmi
|
||||
corba/src/java.corba/share/classes/javax/transaction : corba/src/share/classes/javax/transaction
|
||||
corba/src/java.corba/share/classes/org/omg : corba/src/share/classes/org/omg
|
||||
corba/src/java.corba/share/classes/sun/corba : corba/src/share/classes/sun/corba
|
||||
corba/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa
|
||||
corba/src/jdk.rmic/share/classes/sun/rmi/rmic/iiop : corba/src/share/classes/sun/rmi/rmic/iiop
|
||||
jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime : jaxp/src/com/sun/java_cup/internal/runtime
|
||||
jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal : jaxp/src/com/sun/org/apache/bcel/internal
|
||||
@ -66,8 +64,8 @@ jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/fastinfoset : jaxws/s
|
||||
jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org : jaxws/src/share/jaxws_classes/com/sun/xml/internal/org
|
||||
jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2 : jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2
|
||||
jaxws/src/java.xml.bind/share/classes/javax/xml/bind : jaxws/src/share/jaxws_classes/javax/xml/bind
|
||||
jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging
|
||||
jaxws/src/java.xml.soap/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap
|
||||
jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging
|
||||
jaxws/src/java.xml.ws/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap
|
||||
jaxws/src/java.xml.ws/share/classes/com/oracle/webservices/internal : jaxws/src/share/jaxws_classes/com/oracle/webservices/internal
|
||||
jaxws/src/java.xml.ws/share/classes/com/oracle/xmlns/internal : jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal
|
||||
jaxws/src/java.xml.ws/share/classes/com/sun/org/glassfish : jaxws/src/share/jaxws_classes/com/sun/org/glassfish
|
||||
@ -1245,6 +1243,8 @@ jdk/src/java.sql.rowset/share/classes/com/sun/rowset : jdk/src/share/classes/com
|
||||
jdk/src/java.sql.rowset/share/classes/javax/sql/rowset : jdk/src/share/classes/javax/sql/rowset
|
||||
jdk/src/java.sql/share/classes/java/sql : jdk/src/share/classes/java/sql
|
||||
jdk/src/java.sql/share/classes/javax/sql : jdk/src/share/classes/javax/sql
|
||||
jdk/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa
|
||||
jdk/src/java.transaction/share/classes/javax/transaction : corba/src/share/classes/javax/transaction
|
||||
jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security : jdk/src/share/classes/com/sun/org/apache/xml/internal/security
|
||||
jdk/src/java.xml.crypto/share/classes/javax/xml/crypto : jdk/src/share/classes/javax/xml/crypto
|
||||
jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal : jdk/src/share/classes/org/jcp/xml/dsig/internal
|
||||
|
||||
@ -287,3 +287,4 @@ e27c725d6c9d155667b35255f442d4ceb8c3c084 jdk9-b40
|
||||
078bb11af876fe528d4b516f33ad4dd9bb60549e jdk9-b42
|
||||
9645e35616b60c5c07b4fdf11a132afc8081dfa8 jdk9-b43
|
||||
1f57bd728c9e6865ccb9d43ccd80a1c11230a32f jdk9-b44
|
||||
9e3f2bed80c0e5a84a256ce41f1d10c5ade48466 jdk9-b45
|
||||
|
||||
@ -1,314 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package javax.transaction.xa;
|
||||
|
||||
/** <p>The XAResource interface is a Java mapping of the industry standard
|
||||
* XA interface based on the X/Open CAE Specification (Distributed
|
||||
* Transaction Processing: The XA Specification).
|
||||
*
|
||||
* <p>The XA interface defines the contract between a Resource Manager
|
||||
* and a Transaction Manager in a distributed transaction processing
|
||||
* (DTP) environment. A JDBC driver or a JMS provider implements
|
||||
* this interface to support the association between a global transaction
|
||||
* and a database or message service connection.
|
||||
*
|
||||
* <p>The XAResource interface can be supported by any transactional
|
||||
* resource that is intended to be used by application programs in an
|
||||
* environment where transactions are controlled by an external
|
||||
* transaction manager. An example of such a resource is a database
|
||||
* management system. An application may access data through multiple
|
||||
* database connections. Each database connection is enlisted with
|
||||
* the transaction manager as a transactional resource. The transaction
|
||||
* manager obtains an XAResource for each connection participating
|
||||
* in a global transaction. The transaction manager uses the
|
||||
* <code>start</code> method
|
||||
* to associate the global transaction with the resource, and it uses the
|
||||
* <code>end</code> method to disassociate the transaction from
|
||||
* the resource. The resource
|
||||
* manager is responsible for associating the global transaction to all
|
||||
* work performed on its data between the start and end method invocations.
|
||||
*
|
||||
* <p>At transaction commit time, the resource managers are informed by
|
||||
* the transaction manager to prepare, commit, or rollback a transaction
|
||||
* according to the two-phase commit protocol.</p>
|
||||
*
|
||||
*/
|
||||
|
||||
public interface XAResource
|
||||
{
|
||||
/** Commits the global transaction specified by xid.
|
||||
*
|
||||
* @param xid A global transaction identifier
|
||||
*
|
||||
* @param onePhase If true, the resource manager should use a one-phase
|
||||
* commit protocol to commit the work done on behalf of xid.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible XAExceptions
|
||||
* are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR,
|
||||
* XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
|
||||
*
|
||||
* <P>If the resource manager did not commit the transaction and the
|
||||
* paramether onePhase is set to true, the resource manager may throw
|
||||
* one of the XA_RB* exceptions. Upon return, the resource manager has
|
||||
* rolled back the branch's work and has released all held resources.
|
||||
*/
|
||||
|
||||
void commit(Xid xid, boolean onePhase) throws XAException;
|
||||
|
||||
|
||||
/** Ends the work performed on behalf of a transaction branch.
|
||||
* The resource manager disassociates the XA resource from the
|
||||
* transaction branch specified and lets the transaction
|
||||
* complete.
|
||||
*
|
||||
* <p>If TMSUSPEND is specified in the flags, the transaction branch
|
||||
* is temporarily suspended in an incomplete state. The transaction
|
||||
* context is in a suspended state and must be resumed via the
|
||||
* <code>start</code> method with TMRESUME specified.</p>
|
||||
*
|
||||
* <p>If TMFAIL is specified, the portion of work has failed.
|
||||
* The resource manager may mark the transaction as rollback-only</p>
|
||||
*
|
||||
* <p>If TMSUCCESS is specified, the portion of work has completed
|
||||
* successfully.</p>
|
||||
*
|
||||
* @param xid A global transaction identifier that is the same as
|
||||
* the identifier used previously in the <code>start</code> method.
|
||||
*
|
||||
* @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible XAException
|
||||
* values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
|
||||
* XAER_PROTO, or XA_RB*.
|
||||
*/
|
||||
|
||||
void end(Xid xid, int flags) throws XAException;
|
||||
|
||||
|
||||
/** Tells the resource manager to forget about a heuristically
|
||||
* completed transaction branch.
|
||||
*
|
||||
* @param xid A global transaction identifier.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible exception
|
||||
* values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
|
||||
* XAER_PROTO.
|
||||
*/
|
||||
|
||||
void forget(Xid xid) throws XAException;
|
||||
|
||||
/** Obtains the current transaction timeout value set for this
|
||||
* XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE>
|
||||
* was not used prior to invoking this method, the return value
|
||||
* is the default timeout set for the resource manager; otherwise,
|
||||
* the value used in the previous <CODE>setTransactionTimeout</CODE>
|
||||
* call is returned.
|
||||
*
|
||||
* @return the transaction timeout value in seconds.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible exception
|
||||
* values are XAER_RMERR and XAER_RMFAIL.
|
||||
*/
|
||||
int getTransactionTimeout() throws XAException;
|
||||
|
||||
/** This method is called to determine if the resource manager
|
||||
* instance represented by the target object is the same as the
|
||||
* resouce manager instance represented by the parameter <i>xares</i>.
|
||||
*
|
||||
* @param xares An XAResource object whose resource manager instance
|
||||
* is to be compared with the resource manager instance of the
|
||||
* target object.
|
||||
*
|
||||
* @return <i>true</i> if it's the same RM instance; otherwise
|
||||
* <i>false</i>.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible exception
|
||||
* values are XAER_RMERR and XAER_RMFAIL.
|
||||
*
|
||||
*/
|
||||
boolean isSameRM(XAResource xares) throws XAException;
|
||||
|
||||
/** Ask the resource manager to prepare for a transaction commit
|
||||
* of the transaction specified in xid.
|
||||
*
|
||||
* @param xid A global transaction identifier.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible exception
|
||||
* values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
|
||||
* or XAER_PROTO.
|
||||
*
|
||||
* @return A value indicating the resource manager's vote on the
|
||||
* outcome of the transaction. The possible values are: XA_RDONLY
|
||||
* or XA_OK. If the resource manager wants to roll back the
|
||||
* transaction, it should do so by raising an appropriate XAException
|
||||
* in the prepare method.
|
||||
*/
|
||||
|
||||
int prepare(Xid xid) throws XAException;
|
||||
|
||||
|
||||
/** Obtains a list of prepared transaction branches from a resource
|
||||
* manager. The transaction manager calls this method during recovery
|
||||
* to obtain the list of transaction branches that are currently in
|
||||
* prepared or heuristically completed states.
|
||||
*
|
||||
* @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
|
||||
* must be used when no other flags are set in the parameter.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible values are
|
||||
* XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
|
||||
*
|
||||
* @return The resource manager returns zero or more XIDs of the
|
||||
* transaction branches that are currently in a prepared or
|
||||
* heuristically completed state. If an error occurs during the
|
||||
* operation, the resource manager should throw the appropriate
|
||||
* XAException.
|
||||
*
|
||||
*/
|
||||
|
||||
Xid[] recover(int flag) throws XAException;
|
||||
|
||||
|
||||
/** Informs the resource manager to roll back work done on behalf
|
||||
* of a transaction branch.
|
||||
*
|
||||
* @param xid A global transaction identifier.
|
||||
*
|
||||
* @exception XAException An error has occurred.
|
||||
*/
|
||||
|
||||
void rollback(Xid xid) throws XAException;
|
||||
|
||||
|
||||
/** <P>Sets the current transaction timeout value for this <CODE>XAResource</CODE>
|
||||
* instance. Once set, this timeout value is effective until
|
||||
* <code>setTransactionTimeout</code> is invoked again with a different
|
||||
* value. To reset the timeout value to the default value used by the resource
|
||||
* manager, set the value to zero.
|
||||
*
|
||||
* If the timeout operation is performed successfully, the method returns
|
||||
* <i>true</i>; otherwise <i>false</i>. If a resource manager does not
|
||||
* support explicitly setting the transaction timeout value, this method
|
||||
* returns <i>false</i>.
|
||||
*
|
||||
* @param seconds The transaction timeout value in seconds.
|
||||
*
|
||||
* @return <i>true</i> if the transaction timeout value is set successfully;
|
||||
* otherwise <i>false</i>.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible exception values
|
||||
* are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
|
||||
*/
|
||||
boolean setTransactionTimeout(int seconds) throws XAException;
|
||||
|
||||
|
||||
/** Starts work on behalf of a transaction branch specified in
|
||||
* <code>xid</code>.
|
||||
*
|
||||
* If TMJOIN is specified, the start applies to joining a transaction
|
||||
* previously seen by the resource manager. If TMRESUME is specified,
|
||||
* the start applies to resuming a suspended transaction specified in the
|
||||
* parameter <code>xid</code>.
|
||||
*
|
||||
* If neither TMJOIN nor TMRESUME is specified and the transaction
|
||||
* specified by <code>xid</code> has previously been seen by the resource
|
||||
* manager, the resource manager throws the XAException exception with
|
||||
* XAER_DUPID error code.
|
||||
*
|
||||
* @param xid A global transaction identifier to be associated
|
||||
* with the resource.
|
||||
*
|
||||
* @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
|
||||
*
|
||||
* @exception XAException An error has occurred. Possible exceptions
|
||||
* are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
|
||||
* XAER_NOTA, XAER_INVAL, or XAER_PROTO.
|
||||
*
|
||||
*/
|
||||
void start(Xid xid, int flags) throws XAException;
|
||||
|
||||
|
||||
/**
|
||||
* Ends a recovery scan.
|
||||
*/
|
||||
public final static int TMENDRSCAN = 0x00800000;
|
||||
|
||||
/**
|
||||
* Disassociates the caller and marks the transaction branch
|
||||
* rollback-only.
|
||||
*/
|
||||
public final static int TMFAIL = 0x20000000;
|
||||
|
||||
/**
|
||||
* Caller is joining existing transaction branch.
|
||||
*/
|
||||
public final static int TMJOIN = 0x00200000;
|
||||
|
||||
/**
|
||||
* Use TMNOFLAGS to indicate no flags value is selected.
|
||||
*/
|
||||
public final static int TMNOFLAGS = 0x00000000;
|
||||
|
||||
/**
|
||||
* Caller is using one-phase optimization.
|
||||
*/
|
||||
public final static int TMONEPHASE = 0x40000000;
|
||||
|
||||
/**
|
||||
* Caller is resuming association with a suspended
|
||||
* transaction branch.
|
||||
*/
|
||||
public final static int TMRESUME = 0x08000000;
|
||||
|
||||
/**
|
||||
* Starts a recovery scan.
|
||||
*/
|
||||
public final static int TMSTARTRSCAN = 0x01000000;
|
||||
|
||||
|
||||
/**
|
||||
* Disassociates caller from a transaction branch.
|
||||
*/
|
||||
public final static int TMSUCCESS = 0x04000000;
|
||||
|
||||
|
||||
/**
|
||||
* Caller is suspending (not ending) its association with
|
||||
* a transaction branch.
|
||||
*/
|
||||
public final static int TMSUSPEND = 0x02000000;
|
||||
|
||||
/**
|
||||
* The transaction branch has been read-only and has been committed.
|
||||
*/
|
||||
public final static int XA_RDONLY = 0x00000003;
|
||||
|
||||
/**
|
||||
* The transaction work has been prepared normally.
|
||||
*/
|
||||
public final static int XA_OK = 0;
|
||||
|
||||
}
|
||||
@ -447,3 +447,4 @@ c363a8b87e477ee45d6d3cb2a36cb365141bc596 jdk9-b38
|
||||
38cb4fbd47e3472bd1b5ebac83bda96fe4869c4f jdk9-b42
|
||||
65a9747147b8090037541040ba67156ec914db6a jdk9-b43
|
||||
43a44b56dca61a4d766a20f0528fdd8b5ceff873 jdk9-b44
|
||||
5dc8184af1e2bb30b0103113d1f1a58a21a80c37 jdk9-b45
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -284,19 +284,20 @@ class Assembler : public AbstractAssembler {
|
||||
MTCTR_OPCODE = (MTSPR_OPCODE | 9 << SPR_0_4_SHIFT),
|
||||
MFCTR_OPCODE = (MFSPR_OPCODE | 9 << SPR_0_4_SHIFT),
|
||||
|
||||
MTTFHAR_OPCODE = (MTSPR_OPCODE | 128 << SPR_0_4_SHIFT),
|
||||
MFTFHAR_OPCODE = (MFSPR_OPCODE | 128 << SPR_0_4_SHIFT),
|
||||
MTTFIAR_OPCODE = (MTSPR_OPCODE | 129 << SPR_0_4_SHIFT),
|
||||
MFTFIAR_OPCODE = (MFSPR_OPCODE | 129 << SPR_0_4_SHIFT),
|
||||
MTTEXASR_OPCODE = (MTSPR_OPCODE | 130 << SPR_0_4_SHIFT),
|
||||
MFTEXASR_OPCODE = (MFSPR_OPCODE | 130 << SPR_0_4_SHIFT),
|
||||
MTTEXASRU_OPCODE = (MTSPR_OPCODE | 131 << SPR_0_4_SHIFT),
|
||||
MFTEXASRU_OPCODE = (MFSPR_OPCODE | 131 << SPR_0_4_SHIFT),
|
||||
// Attention: Higher and lower half are inserted in reversed order.
|
||||
MTTFHAR_OPCODE = (MTSPR_OPCODE | 4 << SPR_5_9_SHIFT | 0 << SPR_0_4_SHIFT),
|
||||
MFTFHAR_OPCODE = (MFSPR_OPCODE | 4 << SPR_5_9_SHIFT | 0 << SPR_0_4_SHIFT),
|
||||
MTTFIAR_OPCODE = (MTSPR_OPCODE | 4 << SPR_5_9_SHIFT | 1 << SPR_0_4_SHIFT),
|
||||
MFTFIAR_OPCODE = (MFSPR_OPCODE | 4 << SPR_5_9_SHIFT | 1 << SPR_0_4_SHIFT),
|
||||
MTTEXASR_OPCODE = (MTSPR_OPCODE | 4 << SPR_5_9_SHIFT | 2 << SPR_0_4_SHIFT),
|
||||
MFTEXASR_OPCODE = (MFSPR_OPCODE | 4 << SPR_5_9_SHIFT | 2 << SPR_0_4_SHIFT),
|
||||
MTTEXASRU_OPCODE = (MTSPR_OPCODE | 4 << SPR_5_9_SHIFT | 3 << SPR_0_4_SHIFT),
|
||||
MFTEXASRU_OPCODE = (MFSPR_OPCODE | 4 << SPR_5_9_SHIFT | 3 << SPR_0_4_SHIFT),
|
||||
|
||||
MTVRSAVE_OPCODE = (MTSPR_OPCODE | 256 << SPR_0_4_SHIFT),
|
||||
MFVRSAVE_OPCODE = (MFSPR_OPCODE | 256 << SPR_0_4_SHIFT),
|
||||
MTVRSAVE_OPCODE = (MTSPR_OPCODE | 8 << SPR_5_9_SHIFT | 0 << SPR_0_4_SHIFT),
|
||||
MFVRSAVE_OPCODE = (MFSPR_OPCODE | 8 << SPR_5_9_SHIFT | 0 << SPR_0_4_SHIFT),
|
||||
|
||||
MFTB_OPCODE = (MFSPR_OPCODE | 268 << SPR_0_4_SHIFT),
|
||||
MFTB_OPCODE = (MFSPR_OPCODE | 8 << SPR_5_9_SHIFT | 12 << SPR_0_4_SHIFT),
|
||||
|
||||
MTCRF_OPCODE = (31u << OPCODE_SHIFT | 144u << 1),
|
||||
MFCR_OPCODE = (31u << OPCODE_SHIFT | 19u << 1),
|
||||
@ -1494,6 +1495,26 @@ class Assembler : public AbstractAssembler {
|
||||
inline void mftexasr(Register d);
|
||||
inline void mftexasru(Register d);
|
||||
|
||||
// TEXASR bit description
|
||||
enum transaction_failure_reason {
|
||||
// Upper half (TEXASRU):
|
||||
tm_failure_persistent = 7, // The failure is likely to recur on each execution.
|
||||
tm_disallowed = 8, // The instruction is not permitted.
|
||||
tm_nesting_of = 9, // The maximum transaction level was exceeded.
|
||||
tm_footprint_of = 10, // The tracking limit for transactional storage accesses was exceeded.
|
||||
tm_self_induced_cf = 11, // A self-induced conflict occurred in Suspended state.
|
||||
tm_non_trans_cf = 12, // A conflict occurred with a non-transactional access by another processor.
|
||||
tm_trans_cf = 13, // A conflict occurred with another transaction.
|
||||
tm_translation_cf = 14, // A conflict occurred with a TLB invalidation.
|
||||
tm_inst_fetch_cf = 16, // An instruction fetch was performed from a block that was previously written transactionally.
|
||||
tm_tabort = 31, // Termination was caused by the execution of an abort instruction.
|
||||
// Lower half:
|
||||
tm_suspended = 32, // Failure was recorded in Suspended state.
|
||||
tm_failure_summary = 36, // Failure has been detected and recorded.
|
||||
tm_tfiar_exact = 37, // Value in the TFIAR is exact.
|
||||
tm_rot = 38, // Rollback-only transaction.
|
||||
};
|
||||
|
||||
// PPC 1, section 2.4.1 Branch Instructions
|
||||
inline void b( address a, relocInfo::relocType rt = relocInfo::none);
|
||||
inline void b( Label& L);
|
||||
@ -1581,6 +1602,7 @@ class Assembler : public AbstractAssembler {
|
||||
inline void bnectrl(ConditionRegister crx, relocInfo::relocType rt = relocInfo::none);
|
||||
|
||||
// condition register logic instructions
|
||||
// NOTE: There's a preferred form: d and s2 should point into the same condition register.
|
||||
inline void crand( int d, int s1, int s2);
|
||||
inline void crnand(int d, int s1, int s2);
|
||||
inline void cror( int d, int s1, int s2);
|
||||
@ -1590,6 +1612,19 @@ class Assembler : public AbstractAssembler {
|
||||
inline void crandc(int d, int s1, int s2);
|
||||
inline void crorc( int d, int s1, int s2);
|
||||
|
||||
// More convenient version.
|
||||
int condition_register_bit(ConditionRegister cr, Condition c) {
|
||||
return 4 * (int)(intptr_t)cr + c;
|
||||
}
|
||||
void crand( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void crnand(ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void cror( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void crxor( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void crnor( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void creqv( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void crandc(ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
void crorc( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc);
|
||||
|
||||
// icache and dcache related instructions
|
||||
inline void icbi( Register s1, Register s2);
|
||||
//inline void dcba(Register s1, Register s2); // Instruction for embedded processor only.
|
||||
@ -1673,6 +1708,10 @@ class Assembler : public AbstractAssembler {
|
||||
inline void smt_prio_low();
|
||||
inline void smt_prio_medium_low();
|
||||
inline void smt_prio_medium();
|
||||
// >= Power7
|
||||
inline void smt_yield();
|
||||
inline void smt_mdoio();
|
||||
inline void smt_mdoom();
|
||||
|
||||
// trap instructions
|
||||
inline void twi_0(Register a); // for load with acquire semantics use load+twi_0+isync (trap can't occur)
|
||||
@ -1958,6 +1997,7 @@ class Assembler : public AbstractAssembler {
|
||||
inline void tbeginrot_(); // R=1 Rollback-Only Transaction
|
||||
inline void tend_(); // A=0
|
||||
inline void tendall_(); // A=1
|
||||
inline void tabort_();
|
||||
inline void tabort_(Register a);
|
||||
inline void tabortwc_(int t, Register a, Register b);
|
||||
inline void tabortwci_(int t, Register a, int si);
|
||||
@ -1967,6 +2007,10 @@ class Assembler : public AbstractAssembler {
|
||||
inline void tresume_(); // tsr with L=1
|
||||
inline void tcheck(int f);
|
||||
|
||||
static bool is_tbegin(int x) {
|
||||
return TBEGIN_OPCODE == (x & (0x3f << OPCODE_SHIFT | 0x3ff << 1));
|
||||
}
|
||||
|
||||
// The following encoders use r0 as second operand. These instructions
|
||||
// read r0 as '0'.
|
||||
inline void lwzx( Register d, Register s2);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -453,6 +453,48 @@ inline void Assembler::creqv( int d, int s1, int s2) { emit_int32(CREQV_OPCODE
|
||||
inline void Assembler::crandc(int d, int s1, int s2) { emit_int32(CRANDC_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::crorc( int d, int s1, int s2) { emit_int32(CRORC_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
|
||||
// More convenient version.
|
||||
inline void Assembler::crand( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
crand(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::crnand(ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
crnand(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::cror( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
cror(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::crxor( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
crxor(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::crnor( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
crnor(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::creqv( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
creqv(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::crandc(ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
crandc(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
inline void Assembler::crorc( ConditionRegister crdst, Condition cdst, ConditionRegister crsrc, Condition csrc) {
|
||||
int dst_bit = condition_register_bit(crdst, cdst),
|
||||
src_bit = condition_register_bit(crsrc, csrc);
|
||||
crorc(dst_bit, src_bit, dst_bit);
|
||||
}
|
||||
|
||||
// Conditional move (>= Power7)
|
||||
inline void Assembler::isel(Register d, ConditionRegister cr, Condition cc, bool inv, Register a, Register b) {
|
||||
if (b == noreg) {
|
||||
@ -516,6 +558,10 @@ inline void Assembler::smt_prio_medium_low() { Assembler::or_unchecked(R6, R6,
|
||||
inline void Assembler::smt_prio_medium() { Assembler::or_unchecked(R2, R2, R2); }
|
||||
inline void Assembler::smt_prio_medium_high() { Assembler::or_unchecked(R5, R5, R5); }
|
||||
inline void Assembler::smt_prio_high() { Assembler::or_unchecked(R3, R3, R3); }
|
||||
// >= Power7
|
||||
inline void Assembler::smt_yield() { Assembler::or_unchecked(R27, R27, R27); }
|
||||
inline void Assembler::smt_mdoio() { Assembler::or_unchecked(R29, R29, R29); }
|
||||
inline void Assembler::smt_mdoom() { Assembler::or_unchecked(R30, R30, R30); }
|
||||
|
||||
inline void Assembler::twi_0(Register a) { twi_unchecked(0, a, 0);}
|
||||
|
||||
@ -778,7 +824,8 @@ inline void Assembler::tbegin_() { emit_int32( TB
|
||||
inline void Assembler::tbeginrot_() { emit_int32( TBEGIN_OPCODE | /*R=1*/ 1u << (31-10) | rc(1)); }
|
||||
inline void Assembler::tend_() { emit_int32( TEND_OPCODE | rc(1)); }
|
||||
inline void Assembler::tendall_() { emit_int32( TEND_OPCODE | /*A=1*/ 1u << (31-6) | rc(1)); }
|
||||
inline void Assembler::tabort_(Register a) { emit_int32( TABORT_OPCODE | ra(a) | rc(1)); }
|
||||
inline void Assembler::tabort_() { emit_int32( TABORT_OPCODE | rc(1)); }
|
||||
inline void Assembler::tabort_(Register a) { assert(a != R0, "r0 not allowed"); emit_int32( TABORT_OPCODE | ra(a) | rc(1)); }
|
||||
inline void Assembler::tabortwc_(int t, Register a, Register b) { emit_int32( TABORTWC_OPCODE | to(t) | ra(a) | rb(b) | rc(1)); }
|
||||
inline void Assembler::tabortwci_(int t, Register a, int si) { emit_int32( TABORTWCI_OPCODE | to(t) | ra(a) | sh1620(si) | rc(1)); }
|
||||
inline void Assembler::tabortdc_(int t, Register a, Register b) { emit_int32( TABORTDC_OPCODE | to(t) | ra(a) | rb(b) | rc(1)); }
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1712,7 +1712,7 @@ void InterpreterMacroAssembler::profile_obj_type(Register obj, Register mdo_addr
|
||||
andi_(R0, klass, TypeEntries::type_unknown);
|
||||
// Already unknown. Nothing to do anymore.
|
||||
//bne(CCR0, do_nothing);
|
||||
crorc(/*CCR0 eq*/2, /*CCR1 eq*/4+2, /*CCR0 eq*/2); // cr0 eq = cr1 eq or cr0 ne
|
||||
crorc(CCR0, Assembler::equal, CCR1, Assembler::equal); // cr0 eq = cr1 eq or cr0 ne
|
||||
beq(CCR0, do_nothing);
|
||||
|
||||
clrrdi_(R0, tmp, exact_log2(-TypeEntries::type_mask));
|
||||
@ -1826,9 +1826,9 @@ void InterpreterMacroAssembler::profile_return_type(Register ret, Register tmp1,
|
||||
lbz(tmp2, Method::intrinsic_id_offset_in_bytes(), R19_method);
|
||||
cmpwi(CCR0, tmp1, Bytecodes::_invokedynamic);
|
||||
cmpwi(CCR1, tmp1, Bytecodes::_invokehandle);
|
||||
cror(/*CR0 eq*/2, /*CR1 eq*/4+2, /*CR0 eq*/2);
|
||||
cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
|
||||
cmpwi(CCR1, tmp2, vmIntrinsics::_compiledLambdaForm);
|
||||
cror(/*CR0 eq*/2, /*CR1 eq*/4+2, /*CR0 eq*/2);
|
||||
cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
|
||||
bne(CCR0, profile_continue);
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1079,7 +1079,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ sldi(tmp2, R5_ARG3, log2_elem_size); // size in bytes
|
||||
__ cmpld(CCR0, R3_ARG1, R4_ARG2); // Use unsigned comparison!
|
||||
__ cmpld(CCR1, tmp1, tmp2);
|
||||
__ crand(/*CCR0 lt*/0, /*CCR1 lt*/4+0, /*CCR0 lt*/0);
|
||||
__ crand(CCR0, Assembler::less, CCR1, Assembler::less);
|
||||
__ blt(CCR0, l_overlap); // Src before dst and distance smaller than size.
|
||||
|
||||
// need to copy forwards
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2013, 2014 SAP AG. All rights reserved.
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2013, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -335,11 +335,11 @@ void TemplateTable::ldc(bool wide) {
|
||||
|
||||
__ cmpwi(CCR0, Rscratch2, JVM_CONSTANT_UnresolvedClass); // Unresolved class?
|
||||
__ cmpwi(CCR1, Rscratch2, JVM_CONSTANT_UnresolvedClassInError); // Unresolved class in error state?
|
||||
__ cror(/*CR0 eq*/2, /*CR1 eq*/4+2, /*CR0 eq*/2);
|
||||
__ cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
|
||||
|
||||
// Resolved class - need to call vm to get java mirror of the class.
|
||||
__ cmpwi(CCR1, Rscratch2, JVM_CONSTANT_Class);
|
||||
__ crnor(/*CR0 eq*/2, /*CR1 eq*/4+2, /*CR0 eq*/2); // Neither resolved class nor unresolved case from above?
|
||||
__ crnor(CCR0, Assembler::equal, CCR1, Assembler::equal); // Neither resolved class nor unresolved case from above?
|
||||
__ beq(CCR0, notClass);
|
||||
|
||||
__ li(R4, wide ? 1 : 0);
|
||||
@ -2611,7 +2611,7 @@ void TemplateTable::jvmti_post_field_mod(Register Rcache, Register Rscratch, boo
|
||||
__ cmpwi(CCR0, Rflags, ltos);
|
||||
__ cmpwi(CCR1, Rflags, dtos);
|
||||
__ addi(base, R15_esp, Interpreter::expr_offset_in_bytes(1));
|
||||
__ crnor(/*CR0 eq*/2, /*CR1 eq*/4+2, /*CR0 eq*/2);
|
||||
__ crnor(CCR0, Assembler::equal, CCR1, Assembler::equal);
|
||||
__ beq(CCR0, is_one_slot);
|
||||
__ addi(base, R15_esp, Interpreter::expr_offset_in_bytes(2));
|
||||
__ bind(is_one_slot);
|
||||
@ -3563,7 +3563,7 @@ void TemplateTable::_new() {
|
||||
// Make sure klass does not have has_finalizer, or is abstract, or interface or java/lang/Class.
|
||||
__ andi_(R0, Rinstance_size, Klass::_lh_instance_slow_path_bit); // slow path bit equals 0?
|
||||
|
||||
__ crnand(/*CR0 eq*/2, /*CR1 eq*/4+2, /*CR0 eq*/2); // slow path bit set or not fully initialized?
|
||||
__ crnand(CCR0, Assembler::equal, CCR1, Assembler::equal); // slow path bit set or not fully initialized?
|
||||
__ beq(CCR0, Lslow_case);
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@ -3184,7 +3184,24 @@ void MacroAssembler::pow_or_exp(bool is_exp, int num_fpu_regs_in_use) {
|
||||
jmp(done);
|
||||
} else {
|
||||
// Stack: X Y
|
||||
Label x_negative, y_odd;
|
||||
Label x_negative, y_not_2;
|
||||
|
||||
static double two = 2.0;
|
||||
ExternalAddress two_addr((address)&two);
|
||||
|
||||
// constant maybe too far on 64 bit
|
||||
lea(tmp2, two_addr);
|
||||
fld_d(Address(tmp2, 0)); // Stack: 2 X Y
|
||||
fcmp(tmp, 2, true, false); // Stack: X Y
|
||||
jcc(Assembler::parity, y_not_2);
|
||||
jcc(Assembler::notEqual, y_not_2);
|
||||
|
||||
fxch(); fpop(); // Stack: X
|
||||
fmul(0); // Stack: X*X
|
||||
|
||||
jmp(done);
|
||||
|
||||
bind(y_not_2);
|
||||
|
||||
fldz(); // Stack: 0 X Y
|
||||
fcmp(tmp, 1, true, false); // Stack: X Y
|
||||
|
||||
@ -252,7 +252,7 @@ CompileTask* CompileTask::allocate() {
|
||||
} else {
|
||||
task = new CompileTask();
|
||||
DEBUG_ONLY(_num_allocated_tasks++;)
|
||||
assert (_num_allocated_tasks < 10000, "Leaking compilation tasks?");
|
||||
assert (WhiteBoxAPI || _num_allocated_tasks < 10000, "Leaking compilation tasks?");
|
||||
task->set_next(NULL);
|
||||
task->set_is_free(true);
|
||||
}
|
||||
|
||||
@ -105,7 +105,6 @@ class MethodMatcher : public CHeapObj<mtCompiler> {
|
||||
tty->print(".");
|
||||
print_symbol(method_name(), _method_mode);
|
||||
if (signature() != NULL) {
|
||||
tty->print(" ");
|
||||
signature()->print_symbol_on(tty);
|
||||
}
|
||||
}
|
||||
@ -467,43 +466,85 @@ static OracleCommand parse_command_name(const char * line, int* bytes_read) {
|
||||
return UnknownCommand;
|
||||
}
|
||||
|
||||
|
||||
static void usage() {
|
||||
tty->print_cr(" CompileCommand and the CompilerOracle allows simple control over");
|
||||
tty->print_cr(" what's allowed to be compiled. The standard supported directives");
|
||||
tty->print_cr(" are exclude and compileonly. The exclude directive stops a method");
|
||||
tty->print_cr(" from being compiled and compileonly excludes all methods except for");
|
||||
tty->print_cr(" the ones mentioned by compileonly directives. The basic form of");
|
||||
tty->print_cr(" all commands is a command name followed by the name of the method");
|
||||
tty->print_cr(" in one of two forms: the standard class file format as in");
|
||||
tty->print_cr(" class/name.methodName or the PrintCompilation format");
|
||||
tty->print_cr(" class.name::methodName. The method name can optionally be followed");
|
||||
tty->print_cr(" by a space then the signature of the method in the class file");
|
||||
tty->print_cr(" format. Otherwise the directive applies to all methods with the");
|
||||
tty->print_cr(" same name and class regardless of signature. Leading and trailing");
|
||||
tty->print_cr(" *'s in the class and/or method name allows a small amount of");
|
||||
tty->print_cr(" wildcarding. ");
|
||||
tty->cr();
|
||||
tty->print_cr(" Examples:");
|
||||
tty->print_cr("The CompileCommand option enables the user of the JVM to control specific");
|
||||
tty->print_cr("behavior of the dynamic compilers. Many commands require a pattern that defines");
|
||||
tty->print_cr("the set of methods the command shall be applied to. The CompileCommand");
|
||||
tty->print_cr("option provides the following commands:");
|
||||
tty->cr();
|
||||
tty->print_cr(" exclude java/lang/StringBuffer.append");
|
||||
tty->print_cr(" compileonly java/lang/StringBuffer.toString ()Ljava/lang/String;");
|
||||
tty->print_cr(" exclude java/lang/String*.*");
|
||||
tty->print_cr(" exclude *.toString");
|
||||
}
|
||||
tty->print_cr(" break,<pattern> - debug breakpoint in compiler and in generated code");
|
||||
tty->print_cr(" print,<pattern> - print assembly");
|
||||
tty->print_cr(" exclude,<pattern> - don't compile or inline");
|
||||
tty->print_cr(" inline,<pattern> - always inline");
|
||||
tty->print_cr(" dontinline,<pattern> - don't inline");
|
||||
tty->print_cr(" compileonly,<pattern> - compile only");
|
||||
tty->print_cr(" log,<pattern> - log compilation");
|
||||
tty->print_cr(" option,<pattern>,<option type>,<option name>,<value>");
|
||||
tty->print_cr(" - set value of custom option");
|
||||
tty->print_cr(" option,<pattern>,<bool option name>");
|
||||
tty->print_cr(" - shorthand for setting boolean flag");
|
||||
tty->print_cr(" quiet - silence the compile command output");
|
||||
tty->print_cr(" help - print this text");
|
||||
tty->cr();
|
||||
tty->print_cr("The preferred format for the method matching pattern is:");
|
||||
tty->print_cr(" package/Class.method()");
|
||||
tty->cr();
|
||||
tty->print_cr("For backward compatibility this form is also allowed:");
|
||||
tty->print_cr(" package.Class::method()");
|
||||
tty->cr();
|
||||
tty->print_cr("The signature can be separated by an optional whitespace or comma:");
|
||||
tty->print_cr(" package/Class.method ()");
|
||||
tty->cr();
|
||||
tty->print_cr("The class and method identifier can be used together with leading or");
|
||||
tty->print_cr("trailing *'s for a small amount of wildcarding:");
|
||||
tty->print_cr(" *ackage/Clas*.*etho*()");
|
||||
tty->cr();
|
||||
tty->print_cr("It is possible to use more than one CompileCommand on the command line:");
|
||||
tty->print_cr(" -XX:CompileCommand=exclude,java/*.* -XX:CompileCommand=log,java*.*");
|
||||
tty->cr();
|
||||
tty->print_cr("The CompileCommands can be loaded from a file with the flag");
|
||||
tty->print_cr("-XX:CompileCommandFile=<file> or be added to the file '.hotspot_compiler'");
|
||||
tty->print_cr("Use the same format in the file as the argument to the CompileCommand flag.");
|
||||
tty->print_cr("Add one command on each line.");
|
||||
tty->print_cr(" exclude java/*.*");
|
||||
tty->print_cr(" option java/*.* ReplayInline");
|
||||
tty->cr();
|
||||
tty->print_cr("The following commands have conflicting behavior: 'exclude', 'inline', 'dontinline',");
|
||||
tty->print_cr("and 'compileonly'. There is no priority of commands. Applying (a subset of) these");
|
||||
tty->print_cr("commands to the same method results in undefined behavior.");
|
||||
tty->cr();
|
||||
};
|
||||
|
||||
// The JVM specification defines the allowed characters.
|
||||
// Tokens that are disallowed by the JVM specification can have
|
||||
// a meaning to the parser so we need to include them here.
|
||||
// The parser does not enforce all rules of the JVMS - a successful parse
|
||||
// does not mean that it is an allowed name. Illegal names will
|
||||
// be ignored since they never can match a class or method.
|
||||
//
|
||||
// '\0' and 0xf0-0xff are disallowed in constant string values
|
||||
// 0x20 ' ', 0x09 '\t' and, 0x2c ',' are used in the matching
|
||||
// 0x5b '[' and 0x5d ']' can not be used because of the matcher
|
||||
// 0x28 '(' and 0x29 ')' are used for the signature
|
||||
// 0x2e '.' is always replaced before the matching
|
||||
// 0x2f '/' is only used in the class name as package separator
|
||||
|
||||
// The characters allowed in a class or method name. All characters > 0x7f
|
||||
// are allowed in order to handle obfuscated class files (e.g. Volano)
|
||||
#define RANGEBASE "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$_<>" \
|
||||
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" \
|
||||
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" \
|
||||
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" \
|
||||
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" \
|
||||
"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" \
|
||||
"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" \
|
||||
"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" \
|
||||
"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
|
||||
#define RANGEBASE "\x1\x2\x3\x4\x5\x6\x7\x8\xa\xb\xc\xd\xe\xf" \
|
||||
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" \
|
||||
"\x21\x22\x23\x24\x25\x26\x27\x2a\x2b\x2c\x2d" \
|
||||
"\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" \
|
||||
"\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" \
|
||||
"\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5c\x5e\x5f" \
|
||||
"\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" \
|
||||
"\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" \
|
||||
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" \
|
||||
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" \
|
||||
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" \
|
||||
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" \
|
||||
"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" \
|
||||
"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" \
|
||||
"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
|
||||
|
||||
#define RANGE0 "[*" RANGEBASE "]"
|
||||
#define RANGESLASH "[*" RANGEBASE "/]"
|
||||
@ -681,8 +722,9 @@ void CompilerOracle::parse_from_line(char* line) {
|
||||
|
||||
if (command == UnknownCommand) {
|
||||
ttyLocker ttyl;
|
||||
tty->print_cr("CompilerOracle: unrecognized line");
|
||||
tty->print_cr("CompileCommand: unrecognized command");
|
||||
tty->print_cr(" \"%s\"", original_line);
|
||||
CompilerOracle::print_tip();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -712,9 +754,17 @@ void CompilerOracle::parse_from_line(char* line) {
|
||||
Symbol* signature = NULL;
|
||||
|
||||
line += bytes_read;
|
||||
|
||||
// Skip any leading spaces before signature
|
||||
int whitespace_read = 0;
|
||||
sscanf(line, "%*[ \t]%n", &whitespace_read);
|
||||
if (whitespace_read > 0) {
|
||||
line += whitespace_read;
|
||||
}
|
||||
|
||||
// there might be a signature following the method.
|
||||
// signatures always begin with ( so match that by hand
|
||||
if (1 == sscanf(line, "%*[ \t](%254[[);/" RANGEBASE "]%n", sig + 1, &bytes_read)) {
|
||||
if (1 == sscanf(line, "(%254[[);/" RANGEBASE "]%n", sig + 1, &bytes_read)) {
|
||||
sig[0] = '(';
|
||||
line += bytes_read;
|
||||
signature = SymbolTable::new_symbol(sig, CHECK);
|
||||
@ -740,7 +790,7 @@ void CompilerOracle::parse_from_line(char* line) {
|
||||
if (match != NULL && !_quiet) {
|
||||
// Print out the last match added
|
||||
ttyLocker ttyl;
|
||||
tty->print("CompilerOracle: %s ", command_names[command]);
|
||||
tty->print("CompileCommand: %s ", command_names[command]);
|
||||
match->print();
|
||||
}
|
||||
line += bytes_read;
|
||||
@ -775,26 +825,36 @@ void CompilerOracle::parse_from_line(char* line) {
|
||||
ttyLocker ttyl;
|
||||
if (error_msg != NULL) {
|
||||
// an error has happened
|
||||
tty->print_cr("CompilerOracle: unrecognized line");
|
||||
tty->print_cr("CompileCommand: An error occured during parsing");
|
||||
tty->print_cr(" \"%s\"", original_line);
|
||||
if (error_msg != NULL) {
|
||||
tty->print_cr("%s", error_msg);
|
||||
}
|
||||
CompilerOracle::print_tip();
|
||||
|
||||
} else {
|
||||
// check for remaining characters
|
||||
bytes_read = 0;
|
||||
sscanf(line, "%*[ \t]%n", &bytes_read);
|
||||
if (line[bytes_read] != '\0') {
|
||||
tty->print_cr("CompilerOracle: unrecognized line");
|
||||
tty->print_cr("CompileCommand: Bad pattern");
|
||||
tty->print_cr(" \"%s\"", original_line);
|
||||
tty->print_cr(" Unrecognized text %s after command ", line);
|
||||
CompilerOracle::print_tip();
|
||||
} else if (match != NULL && !_quiet) {
|
||||
tty->print("CompilerOracle: %s ", command_names[command]);
|
||||
tty->print("CompileCommand: %s ", command_names[command]);
|
||||
match->print();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CompilerOracle::print_tip() {
|
||||
tty->cr();
|
||||
tty->print_cr("Usage: '-XX:CompileCommand=command,\"package/Class.method()\"'");
|
||||
tty->print_cr("Use: '-XX:CompileCommand=help' for more information.");
|
||||
tty->cr();
|
||||
}
|
||||
|
||||
static const char* default_cc_file = ".hotspot_compiler";
|
||||
|
||||
static const char* cc_file() {
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
class CompilerOracle : AllStatic {
|
||||
private:
|
||||
static bool _quiet;
|
||||
static void print_tip();
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -1910,7 +1910,6 @@ public:
|
||||
}
|
||||
|
||||
void work(uint worker_id) {
|
||||
double start = os::elapsedTime();
|
||||
FreeRegionList local_cleanup_list("Local Cleanup List");
|
||||
HRRSCleanupTask hrrs_cleanup_task;
|
||||
G1NoteEndOfConcMarkClosure g1_note_end(_g1h, &local_cleanup_list,
|
||||
|
||||
@ -1229,7 +1229,6 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
||||
TraceCollectorStats tcs(g1mm()->full_collection_counters());
|
||||
TraceMemoryManagerStats tms(true /* fullGC */, gc_cause());
|
||||
|
||||
double start = os::elapsedTime();
|
||||
g1_policy()->record_full_collection_start();
|
||||
|
||||
// Note: When we have a more flexible GC logging framework that
|
||||
@ -1436,7 +1435,6 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
||||
|
||||
_allocator->init_mutator_alloc_region();
|
||||
|
||||
double end = os::elapsedTime();
|
||||
g1_policy()->record_full_collection_end();
|
||||
|
||||
if (G1Log::fine()) {
|
||||
|
||||
@ -56,7 +56,6 @@ class HRRSCleanupTask;
|
||||
class GenerationSpec;
|
||||
class OopsInHeapRegionClosure;
|
||||
class G1KlassScanClosure;
|
||||
class G1ScanHeapEvacClosure;
|
||||
class ObjectClosure;
|
||||
class SpaceClosure;
|
||||
class CompactibleSpaceClosure;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -153,14 +153,6 @@ G1CollectorPolicy::G1CollectorPolicy() :
|
||||
_inc_cset_predicted_elapsed_time_ms(0.0),
|
||||
_inc_cset_predicted_elapsed_time_ms_diffs(0.0),
|
||||
|
||||
#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
|
||||
#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
|
||||
#endif // _MSC_VER
|
||||
|
||||
_short_lived_surv_rate_group(new SurvRateGroup(this, "Short Lived",
|
||||
G1YoungSurvRateNumRegionsSummary)),
|
||||
_survivor_surv_rate_group(new SurvRateGroup(this, "Survivor",
|
||||
G1YoungSurvRateNumRegionsSummary)),
|
||||
// add here any more surv rate groups
|
||||
_recorded_survivor_regions(0),
|
||||
_recorded_survivor_head(NULL),
|
||||
@ -169,6 +161,22 @@ G1CollectorPolicy::G1CollectorPolicy() :
|
||||
|
||||
_gc_overhead_perc(0.0) {
|
||||
|
||||
uintx confidence_perc = G1ConfidencePercent;
|
||||
// Put an artificial ceiling on this so that it's not set to a silly value.
|
||||
if (confidence_perc > 100) {
|
||||
confidence_perc = 100;
|
||||
warning("G1ConfidencePercent is set to a value that is too large, "
|
||||
"it's been updated to %u", confidence_perc);
|
||||
}
|
||||
// '_sigma' must be initialized before the SurvRateGroups below because they
|
||||
// indirecty access '_sigma' trough the 'this' pointer in their constructor.
|
||||
_sigma = (double) confidence_perc / 100.0;
|
||||
|
||||
_short_lived_surv_rate_group =
|
||||
new SurvRateGroup(this, "Short Lived", G1YoungSurvRateNumRegionsSummary);
|
||||
_survivor_surv_rate_group =
|
||||
new SurvRateGroup(this, "Survivor", G1YoungSurvRateNumRegionsSummary);
|
||||
|
||||
// Set up the region size and associated fields. Given that the
|
||||
// policy is created before the heap, we have to set this up here,
|
||||
// so it's done as soon as possible.
|
||||
@ -283,15 +291,6 @@ G1CollectorPolicy::G1CollectorPolicy() :
|
||||
double time_slice = (double) GCPauseIntervalMillis / 1000.0;
|
||||
_mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time);
|
||||
|
||||
uintx confidence_perc = G1ConfidencePercent;
|
||||
// Put an artificial ceiling on this so that it's not set to a silly value.
|
||||
if (confidence_perc > 100) {
|
||||
confidence_perc = 100;
|
||||
warning("G1ConfidencePercent is set to a value that is too large, "
|
||||
"it's been updated to %u", confidence_perc);
|
||||
}
|
||||
_sigma = (double) confidence_perc / 100.0;
|
||||
|
||||
// start conservatively (around 50ms is about right)
|
||||
_concurrent_mark_remark_times_ms->add(0.05);
|
||||
_concurrent_mark_cleanup_times_ms->add(0.20);
|
||||
|
||||
@ -46,9 +46,6 @@ class ReferenceProcessor;
|
||||
class G1PrepareCompactClosure;
|
||||
|
||||
class G1MarkSweep : AllStatic {
|
||||
friend class VM_G1MarkSweep;
|
||||
friend class Scavenge;
|
||||
|
||||
public:
|
||||
|
||||
static void invoke_at_safepoint(ReferenceProcessor* rp,
|
||||
|
||||
@ -45,7 +45,8 @@
|
||||
#include "utilities/bitMap.inline.hpp"
|
||||
|
||||
G1PageBasedVirtualSpace::G1PageBasedVirtualSpace() : _low_boundary(NULL),
|
||||
_high_boundary(NULL), _committed(), _page_size(0), _special(false), _executable(false) {
|
||||
_high_boundary(NULL), _committed(), _page_size(0), _special(false),
|
||||
_dirty(), _executable(false) {
|
||||
}
|
||||
|
||||
bool G1PageBasedVirtualSpace::initialize_with_granularity(ReservedSpace rs, size_t page_size) {
|
||||
@ -66,6 +67,9 @@ bool G1PageBasedVirtualSpace::initialize_with_granularity(ReservedSpace rs, size
|
||||
assert(_committed.size() == 0, "virtual space initialized more than once");
|
||||
uintx size_in_bits = rs.size() / page_size;
|
||||
_committed.resize(size_in_bits, /* in_resource_area */ false);
|
||||
if (_special) {
|
||||
_dirty.resize(size_in_bits, /* in_resource_area */ false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -84,6 +88,7 @@ void G1PageBasedVirtualSpace::release() {
|
||||
_executable = false;
|
||||
_page_size = 0;
|
||||
_committed.resize(0, false);
|
||||
_dirty.resize(0, false);
|
||||
}
|
||||
|
||||
size_t G1PageBasedVirtualSpace::committed_size() const {
|
||||
@ -120,34 +125,43 @@ size_t G1PageBasedVirtualSpace::byte_size_for_pages(size_t num) {
|
||||
return num * _page_size;
|
||||
}
|
||||
|
||||
MemRegion G1PageBasedVirtualSpace::commit(uintptr_t start, size_t size_in_pages) {
|
||||
bool G1PageBasedVirtualSpace::commit(uintptr_t start, size_t size_in_pages) {
|
||||
// We need to make sure to commit all pages covered by the given area.
|
||||
guarantee(is_area_uncommitted(start, size_in_pages), "Specified area is not uncommitted");
|
||||
|
||||
if (!_special) {
|
||||
bool zero_filled = true;
|
||||
uintptr_t end = start + size_in_pages;
|
||||
|
||||
if (_special) {
|
||||
// Check for dirty pages and update zero_filled if any found.
|
||||
if (_dirty.get_next_one_offset(start,end) < end) {
|
||||
zero_filled = false;
|
||||
_dirty.clear_range(start, end);
|
||||
}
|
||||
} else {
|
||||
os::commit_memory_or_exit(page_start(start), byte_size_for_pages(size_in_pages), _executable,
|
||||
err_msg("Failed to commit pages from "SIZE_FORMAT" of length "SIZE_FORMAT, start, size_in_pages));
|
||||
}
|
||||
_committed.set_range(start, start + size_in_pages);
|
||||
_committed.set_range(start, end);
|
||||
|
||||
MemRegion result((HeapWord*)page_start(start), byte_size_for_pages(size_in_pages) / HeapWordSize);
|
||||
if (AlwaysPreTouch) {
|
||||
os::pretouch_memory((char*)result.start(), (char*)result.end());
|
||||
os::pretouch_memory(page_start(start), page_start(end));
|
||||
}
|
||||
return result;
|
||||
return zero_filled;
|
||||
}
|
||||
|
||||
MemRegion G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) {
|
||||
void G1PageBasedVirtualSpace::uncommit(uintptr_t start, size_t size_in_pages) {
|
||||
guarantee(is_area_committed(start, size_in_pages), "checking");
|
||||
|
||||
if (!_special) {
|
||||
if (_special) {
|
||||
// Mark that memory is dirty. If committed again the memory might
|
||||
// need to be cleared explicitly.
|
||||
_dirty.set_range(start, start + size_in_pages);
|
||||
} else {
|
||||
os::uncommit_memory(page_start(start), byte_size_for_pages(size_in_pages));
|
||||
}
|
||||
|
||||
_committed.clear_range(start, start + size_in_pages);
|
||||
|
||||
MemRegion result((HeapWord*)page_start(start), byte_size_for_pages(size_in_pages) / HeapWordSize);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool G1PageBasedVirtualSpace::contains(const void* p) const {
|
||||
@ -157,7 +171,7 @@ bool G1PageBasedVirtualSpace::contains(const void* p) const {
|
||||
#ifndef PRODUCT
|
||||
void G1PageBasedVirtualSpace::print_on(outputStream* out) {
|
||||
out->print ("Virtual space:");
|
||||
if (special()) out->print(" (pinned in memory)");
|
||||
if (_special) out->print(" (pinned in memory)");
|
||||
out->cr();
|
||||
out->print_cr(" - committed: " SIZE_FORMAT, committed_size());
|
||||
out->print_cr(" - reserved: " SIZE_FORMAT, reserved_size());
|
||||
|
||||
@ -49,6 +49,12 @@ class G1PageBasedVirtualSpace VALUE_OBJ_CLASS_SPEC {
|
||||
// Bitmap used for verification of commit/uncommit operations.
|
||||
BitMap _committed;
|
||||
|
||||
// Bitmap used to keep track of which pages are dirty or not for _special
|
||||
// spaces. This is needed because for those spaces the underlying memory
|
||||
// will only be zero filled the first time it is committed. Calls to commit
|
||||
// will use this bitmap and return whether or not the memory is zero filled.
|
||||
BitMap _dirty;
|
||||
|
||||
// Indicates that the entire space has been committed and pinned in memory,
|
||||
// os::commit_memory() or os::uncommit_memory() have no function.
|
||||
bool _special;
|
||||
@ -71,12 +77,11 @@ class G1PageBasedVirtualSpace VALUE_OBJ_CLASS_SPEC {
|
||||
public:
|
||||
|
||||
// Commit the given area of pages starting at start being size_in_pages large.
|
||||
MemRegion commit(uintptr_t start, size_t size_in_pages);
|
||||
// Returns true if the given area is zero filled upon completion.
|
||||
bool commit(uintptr_t start, size_t size_in_pages);
|
||||
|
||||
// Uncommit the given area of pages starting at start being size_in_pages large.
|
||||
MemRegion uncommit(uintptr_t start, size_t size_in_pages);
|
||||
|
||||
bool special() const { return _special; }
|
||||
void uncommit(uintptr_t start, size_t size_in_pages);
|
||||
|
||||
// Initialization
|
||||
G1PageBasedVirtualSpace();
|
||||
|
||||
@ -67,9 +67,9 @@ class G1RegionsLargerThanCommitSizeMapper : public G1RegionToSpaceMapper {
|
||||
}
|
||||
|
||||
virtual void commit_regions(uintptr_t start_idx, size_t num_regions) {
|
||||
_storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region);
|
||||
bool zero_filled = _storage.commit(start_idx * _pages_per_region, num_regions * _pages_per_region);
|
||||
_commit_map.set_range(start_idx, start_idx + num_regions);
|
||||
fire_on_commit(start_idx, num_regions, true);
|
||||
fire_on_commit(start_idx, num_regions, zero_filled);
|
||||
}
|
||||
|
||||
virtual void uncommit_regions(uintptr_t start_idx, size_t num_regions) {
|
||||
@ -117,8 +117,7 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
|
||||
uint old_refcount = _refcounts.get_by_index(idx);
|
||||
bool zero_filled = false;
|
||||
if (old_refcount == 0) {
|
||||
_storage.commit(idx, 1);
|
||||
zero_filled = true;
|
||||
zero_filled = _storage.commit(idx, 1);
|
||||
}
|
||||
_refcounts.set_by_index(idx, old_refcount + 1);
|
||||
_commit_map.set_bit(i);
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
// collection set.
|
||||
|
||||
class G1CollectedHeap;
|
||||
class CardTableModRefBarrierSet;
|
||||
class ConcurrentG1Refine;
|
||||
class G1ParPushHeapRSClosure;
|
||||
|
||||
|
||||
@ -279,10 +279,12 @@ size_t CodeHeap::alignment_offset() const {
|
||||
return sizeof(HeapBlock) & (_segment_size - 1);
|
||||
}
|
||||
|
||||
// Finds the next free heapblock. If the current one is free, that it returned
|
||||
void* CodeHeap::next_free(HeapBlock* b) const {
|
||||
// Since free blocks are merged, there is max. on free block
|
||||
// between two used ones
|
||||
// Returns the current block if available and used.
|
||||
// If not, it returns the subsequent block (if available), NULL otherwise.
|
||||
// Free blocks are merged, therefore there is at most one free block
|
||||
// between two used ones. As a result, the subsequent block (if available) is
|
||||
// guaranteed to be used.
|
||||
void* CodeHeap::next_used(HeapBlock* b) const {
|
||||
if (b != NULL && b->free()) b = next_block(b);
|
||||
assert(b == NULL || !b->free(), "must be in use or at end of heap");
|
||||
return (b == NULL) ? NULL : b->allocated_space();
|
||||
|
||||
@ -123,7 +123,7 @@ class CodeHeap : public CHeapObj<mtCode> {
|
||||
FreeBlock* search_freelist(size_t length);
|
||||
|
||||
// Iteration helpers
|
||||
void* next_free(HeapBlock* b) const;
|
||||
void* next_used(HeapBlock* b) const;
|
||||
HeapBlock* first_block() const;
|
||||
HeapBlock* next_block(HeapBlock* b) const;
|
||||
HeapBlock* block_start(void* p) const;
|
||||
@ -158,9 +158,9 @@ class CodeHeap : public CHeapObj<mtCode> {
|
||||
int freelist_length() const { return _freelist_length; } // number of elements in the freelist
|
||||
|
||||
// returns the first block or NULL
|
||||
void* first() const { return next_free(first_block()); }
|
||||
void* first() const { return next_used(first_block()); }
|
||||
// returns the next block given a block p or NULL
|
||||
void* next(void* p) const { return next_free(next_block(block_start(p))); }
|
||||
void* next(void* p) const { return next_used(next_block(block_start(p))); }
|
||||
|
||||
// Statistics
|
||||
size_t capacity() const;
|
||||
|
||||
@ -3840,11 +3840,13 @@ class TestVirtualSpaceNodeTest {
|
||||
assert(cm.sum_free_chunks() == 2*MediumChunk, "sizes should add up");
|
||||
}
|
||||
|
||||
{ // 4 pages of VSN is committed, some is used by chunks
|
||||
const size_t page_chunks = 4 * (size_t)os::vm_page_size() / BytesPerWord;
|
||||
// This doesn't work for systems with vm_page_size >= 16K.
|
||||
if (page_chunks < MediumChunk) {
|
||||
// 4 pages of VSN is committed, some is used by chunks
|
||||
ChunkManager cm(SpecializedChunk, SmallChunk, MediumChunk);
|
||||
VirtualSpaceNode vsn(vsn_test_size_bytes);
|
||||
const size_t page_chunks = 4 * (size_t)os::vm_page_size() / BytesPerWord;
|
||||
assert(page_chunks < MediumChunk, "Test expects medium chunks to be at least 4*page_size");
|
||||
|
||||
vsn.initialize();
|
||||
vsn.expand_by(page_chunks, page_chunks);
|
||||
vsn.get_chunk_vs(SmallChunk);
|
||||
|
||||
@ -361,22 +361,36 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
class IfTrueNode : public CProjNode {
|
||||
class IfProjNode : public CProjNode {
|
||||
public:
|
||||
IfTrueNode( IfNode *ifnode ) : CProjNode(ifnode,1) {
|
||||
IfProjNode(IfNode *ifnode, uint idx) : CProjNode(ifnode,idx) {}
|
||||
virtual Node *Identity(PhaseTransform *phase);
|
||||
|
||||
protected:
|
||||
// Type of If input when this branch is always taken
|
||||
virtual bool always_taken(const TypeTuple* t) const = 0;
|
||||
};
|
||||
|
||||
class IfTrueNode : public IfProjNode {
|
||||
public:
|
||||
IfTrueNode( IfNode *ifnode ) : IfProjNode(ifnode,1) {
|
||||
init_class_id(Class_IfTrue);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
|
||||
protected:
|
||||
virtual bool always_taken(const TypeTuple* t) const { return t == TypeTuple::IFTRUE; }
|
||||
};
|
||||
|
||||
class IfFalseNode : public CProjNode {
|
||||
class IfFalseNode : public IfProjNode {
|
||||
public:
|
||||
IfFalseNode( IfNode *ifnode ) : CProjNode(ifnode,0) {
|
||||
IfFalseNode( IfNode *ifnode ) : IfProjNode(ifnode,0) {
|
||||
init_class_id(Class_IfFalse);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
|
||||
protected:
|
||||
virtual bool always_taken(const TypeTuple* t) const { return t == TypeTuple::IFFALSE; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1122,12 +1122,21 @@ void IfNode::dominated_by( Node *prev_dom, PhaseIterGVN *igvn ) {
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If the test is constant & we match, then we are the input Control
|
||||
Node *IfTrueNode::Identity( PhaseTransform *phase ) {
|
||||
Node *IfProjNode::Identity(PhaseTransform *phase) {
|
||||
// Can only optimize if cannot go the other way
|
||||
const TypeTuple *t = phase->type(in(0))->is_tuple();
|
||||
return ( t == TypeTuple::IFNEITHER || t == TypeTuple::IFTRUE )
|
||||
? in(0)->in(0) // IfNode control
|
||||
: this; // no progress
|
||||
if (t == TypeTuple::IFNEITHER ||
|
||||
// kill dead branch first otherwise the IfNode's control will
|
||||
// have 2 control uses (the IfNode that doesn't go away because
|
||||
// it still has uses and this branch of the
|
||||
// If). Node::has_special_unique_user() will cause this node to
|
||||
// be reprocessed once the dead branch is killed.
|
||||
(always_taken(t) && in(0)->outcnt() == 1)) {
|
||||
// IfNode control
|
||||
return in(0)->in(0);
|
||||
}
|
||||
// no progress
|
||||
return this;
|
||||
}
|
||||
|
||||
//------------------------------dump_spec--------------------------------------
|
||||
@ -1195,13 +1204,3 @@ static IfNode* idealize_test(PhaseGVN* phase, IfNode* iff) {
|
||||
// Progress
|
||||
return iff;
|
||||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If the test is constant & we match, then we are the input Control
|
||||
Node *IfFalseNode::Identity( PhaseTransform *phase ) {
|
||||
// Can only optimize if cannot go the other way
|
||||
const TypeTuple *t = phase->type(in(0))->is_tuple();
|
||||
return ( t == TypeTuple::IFNEITHER || t == TypeTuple::IFFALSE )
|
||||
? in(0)->in(0) // IfNode control
|
||||
: this; // no progress
|
||||
}
|
||||
|
||||
@ -1080,18 +1080,21 @@ bool Node::has_special_unique_user() const {
|
||||
assert(outcnt() == 1, "match only for unique out");
|
||||
Node* n = unique_out();
|
||||
int op = Opcode();
|
||||
if( this->is_Store() ) {
|
||||
if (this->is_Store()) {
|
||||
// Condition for back-to-back stores folding.
|
||||
return n->Opcode() == op && n->in(MemNode::Memory) == this;
|
||||
} else if (this->is_Load()) {
|
||||
// Condition for removing an unused LoadNode from the MemBarAcquire precedence input
|
||||
return n->Opcode() == Op_MemBarAcquire;
|
||||
} else if( op == Op_AddL ) {
|
||||
} else if (op == Op_AddL) {
|
||||
// Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
|
||||
return n->Opcode() == Op_ConvL2I && n->in(1) == this;
|
||||
} else if( op == Op_SubI || op == Op_SubL ) {
|
||||
} else if (op == Op_SubI || op == Op_SubL) {
|
||||
// Condition for subI(x,subI(y,z)) ==> subI(addI(x,z),y)
|
||||
return n->Opcode() == op && n->in(2) == this;
|
||||
} else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) {
|
||||
// See IfProjNode::Identity()
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
@ -209,21 +209,22 @@ void report_untested(const char* file, int line, const char* message);
|
||||
|
||||
void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2);
|
||||
|
||||
#ifdef ASSERT
|
||||
// Compile-time asserts.
|
||||
template <bool> struct StaticAssert;
|
||||
template <> struct StaticAssert<true> {};
|
||||
// Compile-time asserts. Cond must be a compile-time constant expression that
|
||||
// is convertible to bool. STATIC_ASSERT() can be used anywhere a declaration
|
||||
// may appear.
|
||||
//
|
||||
// Implementation Note: STATIC_ASSERT_FAILURE<true> provides a value member
|
||||
// rather than type member that could be used directly in the typedef, because
|
||||
// a type member would require conditional use of "typename", depending on
|
||||
// whether Cond is dependent or not. The use of a value member leads to the
|
||||
// use of an array type.
|
||||
|
||||
// Only StaticAssert<true> is defined, so if cond evaluates to false we get
|
||||
// a compile time exception when trying to use StaticAssert<false>.
|
||||
#define STATIC_ASSERT(cond) \
|
||||
do { \
|
||||
StaticAssert<(cond)> DUMMY_STATIC_ASSERT; \
|
||||
(void)DUMMY_STATIC_ASSERT; /* ignore */ \
|
||||
} while (false)
|
||||
#else
|
||||
#define STATIC_ASSERT(cond)
|
||||
#endif
|
||||
template<bool x> struct STATIC_ASSERT_FAILURE;
|
||||
template<> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
|
||||
|
||||
#define STATIC_ASSERT(Cond) \
|
||||
typedef char STATIC_ASSERT_FAILURE_ ## __LINE__ [ \
|
||||
STATIC_ASSERT_FAILURE< (Cond) >::value ]
|
||||
|
||||
// out of shared space reporting
|
||||
enum SharedSpaceType {
|
||||
|
||||
@ -232,7 +232,8 @@ needs_g1gc = \
|
||||
gc/g1/ \
|
||||
gc/metaspace/G1AddMetaspaceDependency.java \
|
||||
gc/metaspace/TestMetaspacePerfCounters.java \
|
||||
gc/startup_warnings/TestG1.java
|
||||
gc/startup_warnings/TestG1.java \
|
||||
gc/whitebox/TestConcMarkCycleWB.java
|
||||
|
||||
# All tests that explicitly set the serial GC
|
||||
#
|
||||
@ -357,7 +358,8 @@ hotspot_compiler_2 = \
|
||||
compiler/inlining/ \
|
||||
compiler/integerArithmetic/ \
|
||||
compiler/interpreter/ \
|
||||
-compiler/codegen/7184394
|
||||
-compiler/codegen/7184394 \
|
||||
-compiler/codecache/stress
|
||||
|
||||
hotspot_compiler_3 = \
|
||||
compiler/intrinsics/ \
|
||||
|
||||
@ -37,6 +37,7 @@ import sun.hotspot.code.BlobType;
|
||||
|
||||
/*
|
||||
* @test PoolsIndependenceTest
|
||||
* @ignore 8068385
|
||||
* @library /testlibrary /../../test/lib
|
||||
* @build PoolsIndependenceTest
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
import com.oracle.java.testlibrary.TimeLimitedRunner;
|
||||
import com.oracle.java.testlibrary.Utils;
|
||||
|
||||
public class CodeCacheStressRunner {
|
||||
private final Runnable action;
|
||||
public CodeCacheStressRunner(Runnable action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
protected final void runTest() {
|
||||
Helper.startInfiniteLoopThread(action);
|
||||
try {
|
||||
// adjust timeout and substract vm init and exit time
|
||||
long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
|
||||
timeout *= 0.9;
|
||||
new TimeLimitedRunner(timeout, 2.0d, this::test).call();
|
||||
} catch (Exception e) {
|
||||
throw new Error("Exception occurred during test execution", e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean test() {
|
||||
Helper.TestCase obj = Helper.TestCase.get();
|
||||
Helper.callMethod(obj.getCallable(), obj.expectedValue());
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
141
hotspot/test/compiler/codecache/stress/Helper.java
Normal file
141
hotspot/test/compiler/codecache/stress/Helper.java
Normal file
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.Random;
|
||||
|
||||
import com.oracle.java.testlibrary.Asserts;
|
||||
import com.oracle.java.testlibrary.ByteCodeLoader;
|
||||
import com.oracle.java.testlibrary.InfiniteLoop;
|
||||
import com.oracle.java.testlibrary.Utils;
|
||||
import sun.hotspot.WhiteBox;
|
||||
|
||||
public final class Helper {
|
||||
public static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
|
||||
public static final Random RNG = Utils.getRandomInstance();
|
||||
|
||||
private static final long THRESHOLD = WHITE_BOX.getIntxVMFlag("CompileThreshold");
|
||||
private static final String TEST_CASE_IMPL_CLASS_NAME = "Helper$TestCaseImpl";
|
||||
private static byte[] CLASS_DATA;
|
||||
static {
|
||||
try {
|
||||
CLASS_DATA = loadClassData(TEST_CASE_IMPL_CLASS_NAME);
|
||||
} catch (IOException e) {
|
||||
throw new Error("TESTBUG: cannot load class byte code", e);
|
||||
}
|
||||
}
|
||||
|
||||
private Helper() {
|
||||
}
|
||||
|
||||
public static void startInfiniteLoopThread(Runnable action) {
|
||||
startInfiniteLoopThread(action, 0L);
|
||||
}
|
||||
|
||||
public static void startInfiniteLoopThread(Runnable action, long millis) {
|
||||
Thread t = new Thread(new InfiniteLoop(action, millis));
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
|
||||
public static int callMethod(Callable<Integer> callable, int expected) {
|
||||
int result = 0;
|
||||
for (int i = 0; i < THRESHOLD; ++i) {
|
||||
try {
|
||||
result = callable.call();
|
||||
} catch (Exception e) {
|
||||
throw new AssertionError(
|
||||
"Exception occurred during test method execution", e);
|
||||
}
|
||||
Asserts.assertEQ(result, expected, "Method returns unexpected value");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static byte[] loadClassData(String name) throws IOException {
|
||||
try (BufferedInputStream in = new BufferedInputStream(
|
||||
ClassLoader.getSystemResourceAsStream(name.replace(".", "/")
|
||||
+ ".class"))) {
|
||||
ByteArrayOutputStream result = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int read;
|
||||
while ((read = in.read(buffer)) != -1) {
|
||||
result.write(buffer, 0, read);
|
||||
}
|
||||
return result.toByteArray();
|
||||
}
|
||||
}
|
||||
|
||||
public interface TestCase {
|
||||
|
||||
public static TestCase get() {
|
||||
try {
|
||||
Class clazz = ByteCodeLoader.load(
|
||||
TEST_CASE_IMPL_CLASS_NAME, CLASS_DATA);
|
||||
return (TestCase) clazz.newInstance();
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new Error(String.format(
|
||||
"TESTBUG: error while creating %s instance from reloaded class",
|
||||
TEST_CASE_IMPL_CLASS_NAME), e);
|
||||
}
|
||||
}
|
||||
|
||||
Callable<Integer> getCallable();
|
||||
int method();
|
||||
int expectedValue();
|
||||
}
|
||||
|
||||
public static class TestCaseImpl implements TestCase {
|
||||
private static final int RETURN_VALUE = 42;
|
||||
private static final int RECURSION_DEPTH = 10;
|
||||
private volatile int i;
|
||||
|
||||
@Override
|
||||
public Callable<Integer> getCallable() {
|
||||
return () -> {
|
||||
i = 0;
|
||||
return method();
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int method() {
|
||||
++i;
|
||||
int result = RETURN_VALUE;
|
||||
if (i < RECURSION_DEPTH) {
|
||||
return result + method();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int expectedValue() {
|
||||
return RETURN_VALUE * RECURSION_DEPTH;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import com.oracle.java.testlibrary.Platform;
|
||||
|
||||
/*
|
||||
* @test OverloadCompileQueueTest
|
||||
* @library /testlibrary /../../test/lib
|
||||
* @build OverloadCompileQueueTest
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:CompileCommand=dontinline,Helper$TestCase::method
|
||||
* -XX:+WhiteBoxAPI -XX:-SegmentedCodeCache OverloadCompileQueueTest
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:CompileCommand=dontinline,Helper$TestCase::method
|
||||
* -XX:+WhiteBoxAPI -XX:+SegmentedCodeCache OverloadCompileQueueTest
|
||||
* @summary stressing code cache by overloading compile queues
|
||||
*/
|
||||
public class OverloadCompileQueueTest implements Runnable {
|
||||
private static final int MAX_SLEEP = 10000;
|
||||
private static final String METHOD_TO_ENQUEUE = "method";
|
||||
private static final int LEVEL_SIMPLE = 1;
|
||||
private static final int LEVEL_FULL_OPTIMIZATION = 4;
|
||||
private static final boolean INTERPRETED
|
||||
= System.getProperty("java.vm.info").startsWith("interpreted ");
|
||||
private static final boolean TIERED_COMPILATION
|
||||
= Helper.WHITE_BOX.getBooleanVMFlag("TieredCompilation");
|
||||
private static final int TIERED_STOP_AT_LEVEL
|
||||
= Helper.WHITE_BOX.getIntxVMFlag("TieredStopAtLevel").intValue();
|
||||
private static final int[] AVAILABLE_LEVELS;
|
||||
static {
|
||||
if (TIERED_COMPILATION) {
|
||||
AVAILABLE_LEVELS = IntStream
|
||||
.rangeClosed(LEVEL_SIMPLE, TIERED_STOP_AT_LEVEL)
|
||||
.toArray();
|
||||
} else if (Platform.isServer()) {
|
||||
AVAILABLE_LEVELS = new int[] { LEVEL_FULL_OPTIMIZATION };
|
||||
} else if (Platform.isClient() || Platform.isMinimal()) {
|
||||
AVAILABLE_LEVELS = new int[] { LEVEL_SIMPLE };
|
||||
} else {
|
||||
throw new Error(String.format(
|
||||
"TESTBUG: unknown VM: %s", System.getProperty("java.vm.name")));
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (INTERPRETED) {
|
||||
System.err.println("Test isn't applicable for interpreter. Skip test.");
|
||||
return;
|
||||
}
|
||||
new CodeCacheStressRunner(new OverloadCompileQueueTest()).runTest();
|
||||
}
|
||||
|
||||
public OverloadCompileQueueTest() {
|
||||
Helper.startInfiniteLoopThread(this::lockUnlock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Helper.TestCase obj = Helper.TestCase.get();
|
||||
Class clazz = obj.getClass();
|
||||
Method mEnqueue;
|
||||
try {
|
||||
mEnqueue = clazz.getMethod(METHOD_TO_ENQUEUE);
|
||||
} catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new Error(String.format(
|
||||
"TESTBUG: cannot get method '%s' of class %s",
|
||||
METHOD_TO_ENQUEUE, clazz.getName()), e);
|
||||
}
|
||||
for (int compLevel : AVAILABLE_LEVELS) {
|
||||
Helper.WHITE_BOX.enqueueMethodForCompilation(mEnqueue, compLevel);
|
||||
}
|
||||
}
|
||||
|
||||
private void lockUnlock() {
|
||||
try {
|
||||
Helper.WHITE_BOX.lockCompilation();
|
||||
Thread.sleep(Helper.RNG.nextInt(MAX_SLEEP));
|
||||
} catch (InterruptedException e) {
|
||||
throw new Error("TESTBUG: lockUnlocker thread was unexpectedly interrupted", e);
|
||||
} finally {
|
||||
Helper.WHITE_BOX.unlockCompilation();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import sun.hotspot.code.BlobType;
|
||||
|
||||
/*
|
||||
* @test RandomAllocationTest
|
||||
* @library /testlibrary /../../test/lib
|
||||
* @build RandomAllocationTest
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:CompileCommand=dontinline,Helper$TestCase::method
|
||||
* -XX:+WhiteBoxAPI -XX:-SegmentedCodeCache RandomAllocationTest
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:CompileCommand=dontinline,Helper$TestCase::method
|
||||
* -XX:+WhiteBoxAPI -XX:+SegmentedCodeCache RandomAllocationTest
|
||||
* @summary stressing code cache by allocating randomly sized "dummy" code blobs
|
||||
*/
|
||||
public class RandomAllocationTest implements Runnable {
|
||||
private static final long CODE_CACHE_SIZE
|
||||
= Helper.WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize");
|
||||
private static final int MAX_BLOB_SIZE = (int) (CODE_CACHE_SIZE >> 7);
|
||||
private static final BlobType[] BLOB_TYPES
|
||||
= BlobType.getAvailable().toArray(new BlobType[0]);
|
||||
|
||||
public static void main(String[] args) {
|
||||
new CodeCacheStressRunner(new RandomAllocationTest()).runTest();
|
||||
}
|
||||
|
||||
private final ArrayList<Long> blobs = new ArrayList<>();
|
||||
@Override
|
||||
public void run() {
|
||||
boolean allocate = blobs.isEmpty() || Helper.RNG.nextBoolean();
|
||||
if (allocate) {
|
||||
int type = Helper.RNG.nextInt(BLOB_TYPES.length);
|
||||
long addr = Helper.WHITE_BOX.allocateCodeBlob(
|
||||
Helper.RNG.nextInt(MAX_BLOB_SIZE), BLOB_TYPES[type].id);
|
||||
if (addr != 0) {
|
||||
blobs.add(addr);
|
||||
}
|
||||
} else {
|
||||
int index = Helper.RNG.nextInt(blobs.size());
|
||||
Helper.WHITE_BOX.freeCodeBlob(blobs.remove(index));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test UnexpectedDeoptimizationTest
|
||||
* @library /testlibrary /../../test/lib
|
||||
* @build UnexpectedDeoptimizationTest
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:CompileCommand=dontinline,Helper$TestCase::method
|
||||
* -XX:+WhiteBoxAPI -XX:-SegmentedCodeCache -XX:-DeoptimizeRandom
|
||||
* UnexpectedDeoptimizationTest
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:CompileCommand=dontinline,Helper$TestCase::method
|
||||
* -XX:+WhiteBoxAPI -XX:+SegmentedCodeCache -XX:-DeoptimizeRandom
|
||||
* UnexpectedDeoptimizationTest
|
||||
* @summary stressing code cache by forcing unexpected deoptimizations
|
||||
*/
|
||||
public class UnexpectedDeoptimizationTest implements Runnable {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new CodeCacheStressRunner(new UnexpectedDeoptimizationTest()).runTest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Helper.WHITE_BOX.deoptimizeFrames(Helper.RNG.nextBoolean());
|
||||
}
|
||||
|
||||
}
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 8054224
|
||||
* @summary Recursive method compiled by C1 is unable to catch StackOverflowError
|
||||
* @run main/othervm -Xcomp -XX:CompileOnly=Test.run -XX:+TieredCompilation -XX:TieredStopAtLevel=2 -Xss256K TestRecursiveReplacedException
|
||||
* @run main/othervm -Xcomp -XX:CompileOnly=Test.run -XX:+TieredCompilation -XX:TieredStopAtLevel=2 -Xss392K TestRecursiveReplacedException
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
73
hotspot/test/compiler/floatingpoint/TestPow2.java
Normal file
73
hotspot/test/compiler/floatingpoint/TestPow2.java
Normal file
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8063086
|
||||
* @summary X^2 special case for C2 yields different result than interpreter
|
||||
* @library /testlibrary /../../test/lib /compiler/whitebox
|
||||
* @build TestPow2
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestPow2
|
||||
*
|
||||
*/
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import sun.hotspot.WhiteBox;
|
||||
|
||||
public class TestPow2 {
|
||||
|
||||
private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
|
||||
|
||||
private static final double base = 5350.456329377186;
|
||||
private static final double exp = 2.0;
|
||||
|
||||
static double m() {
|
||||
return Math.pow(base, exp);
|
||||
}
|
||||
|
||||
static public void main(String[] args) throws NoSuchMethodException {
|
||||
Method test_method = TestPow2.class.getDeclaredMethod("m");
|
||||
|
||||
double interpreter_result = m();
|
||||
|
||||
// Compile with C1 if possible
|
||||
WHITE_BOX.enqueueMethodForCompilation(test_method, CompilerWhiteBoxTest.COMP_LEVEL_SIMPLE);
|
||||
|
||||
double c1_result = m();
|
||||
|
||||
WHITE_BOX.deoptimizeMethod(test_method);
|
||||
|
||||
// Compile it with C2 if possible
|
||||
WHITE_BOX.enqueueMethodForCompilation(test_method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
|
||||
|
||||
double c2_result = m();
|
||||
|
||||
if (interpreter_result != c1_result || interpreter_result != c2_result ||
|
||||
c1_result != c2_result) {
|
||||
System.out.println("interpreter = " + interpreter_result + " c1 = " + c1_result + " c2 = " + c2_result);
|
||||
throw new RuntimeException("Test Failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ public class CheckCompileCommandOption {
|
||||
out.shouldContain(expected_output);
|
||||
}
|
||||
|
||||
out.shouldNotContain("CompilerOracle: unrecognized line");
|
||||
out.shouldNotContain("CompileCommand: unrecognized line");
|
||||
out.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ public class CheckCompileCommandOption {
|
||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
||||
out = new OutputAnalyzer(pb.start());
|
||||
|
||||
out.shouldContain("CompilerOracle: unrecognized line");
|
||||
out.shouldContain("CompileCommand: unrecognized line");
|
||||
out.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@ import sun.misc.Unsafe;
|
||||
*/
|
||||
public class TestRTMDeoptOnLowAbortRatio extends CommandLineOptionTest {
|
||||
private static final long LOCKING_THRESHOLD = 100L;
|
||||
private static final long ABORT_THRESHOLD = LOCKING_THRESHOLD / 2L;
|
||||
|
||||
private TestRTMDeoptOnLowAbortRatio() {
|
||||
super(new AndPredicate(new SupportedCPU(), new SupportedVM()));
|
||||
@ -77,7 +78,8 @@ public class TestRTMDeoptOnLowAbortRatio extends CommandLineOptionTest {
|
||||
useStackLock),
|
||||
CommandLineOptionTest.prepareNumericFlag("RTMLockingThreshold",
|
||||
TestRTMDeoptOnLowAbortRatio.LOCKING_THRESHOLD),
|
||||
"-XX:RTMAbortThreshold=1",
|
||||
CommandLineOptionTest.prepareNumericFlag("RTMAbortThreshold",
|
||||
TestRTMDeoptOnLowAbortRatio.ABORT_THRESHOLD),
|
||||
"-XX:RTMAbortRatio=100",
|
||||
"-XX:CompileThreshold=1",
|
||||
"-XX:RTMRetryCount=0",
|
||||
@ -107,7 +109,7 @@ public class TestRTMDeoptOnLowAbortRatio extends CommandLineOptionTest {
|
||||
|
||||
for (RTMLockingStatistics s : statistics) {
|
||||
if (s.getTotalLocks()
|
||||
== TestRTMDeoptOnLowAbortRatio.LOCKING_THRESHOLD + 1L) {
|
||||
== TestRTMDeoptOnLowAbortRatio.LOCKING_THRESHOLD) {
|
||||
Asserts.assertNull(statisticsBeforeDeopt,
|
||||
"Only one abort was expected during test run");
|
||||
statisticsBeforeDeopt = s;
|
||||
@ -154,8 +156,7 @@ public class TestRTMDeoptOnLowAbortRatio extends CommandLineOptionTest {
|
||||
}
|
||||
for (int i = 0; i < AbortProvoker.DEFAULT_ITERATIONS; i++) {
|
||||
AbortProvoker.verifyMonitorState(t.monitor, shouldBeInflated);
|
||||
t.forceAbort(
|
||||
i == TestRTMDeoptOnLowAbortRatio.LOCKING_THRESHOLD);
|
||||
t.forceAbort(i >= TestRTMDeoptOnLowAbortRatio.ABORT_THRESHOLD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public class TestRTMLockingThreshold extends CommandLineOptionTest {
|
||||
* interrupts, VMM calls, etc. during first lock attempt.
|
||||
*
|
||||
*/
|
||||
private static final int ABORT_THRESHOLD = 10;
|
||||
private static final int MIN_ABORT_THRESHOLD = 10;
|
||||
|
||||
@Override
|
||||
protected void runTestCases() throws Throwable {
|
||||
@ -75,6 +75,9 @@ public class TestRTMLockingThreshold extends CommandLineOptionTest {
|
||||
boolean useStackLock) throws Throwable {
|
||||
CompilableTest test = new Test();
|
||||
|
||||
int abortThreshold = Math.max(lockingThreshold / 2,
|
||||
TestRTMLockingThreshold.MIN_ABORT_THRESHOLD);
|
||||
|
||||
OutputAnalyzer outputAnalyzer = RTMTestBase.executeRTMTest(
|
||||
test,
|
||||
"-XX:CompileThreshold=1",
|
||||
@ -84,7 +87,7 @@ public class TestRTMLockingThreshold extends CommandLineOptionTest {
|
||||
"-XX:RTMTotalCountIncrRate=1",
|
||||
"-XX:RTMRetryCount=0",
|
||||
CommandLineOptionTest.prepareNumericFlag("RTMAbortThreshold",
|
||||
TestRTMLockingThreshold.ABORT_THRESHOLD),
|
||||
abortThreshold),
|
||||
CommandLineOptionTest.prepareNumericFlag("RTMLockingThreshold",
|
||||
lockingThreshold),
|
||||
"-XX:RTMAbortRatio=100",
|
||||
@ -103,16 +106,12 @@ public class TestRTMLockingThreshold extends CommandLineOptionTest {
|
||||
+ "RTM locking statistics entries.");
|
||||
|
||||
/**
|
||||
* We force abort on each odd iteration, so if RTMLockingThreshold==0,
|
||||
* then we have to make 1 call without abort to avoid rtm state
|
||||
* transition to NoRTM (otherwise actual abort ratio will be 100%),
|
||||
* and after that make 1 call with abort to force deoptimization.
|
||||
* This leads us to two locks for threshold 0.
|
||||
* For other threshold values we have to make RTMLockingThreshold + 1
|
||||
* locks if locking threshold is even, or + 0 if odd.
|
||||
* If RTMLockingThreshold==0, then we have to make at least 1 call.
|
||||
*/
|
||||
long expectedValue = lockingThreshold +
|
||||
(lockingThreshold == 0L ? 2L : lockingThreshold % 2L);
|
||||
long expectedValue = lockingThreshold;
|
||||
if (expectedValue == 0) {
|
||||
expectedValue++;
|
||||
}
|
||||
|
||||
RTMLockingStatistics statBeforeDeopt = null;
|
||||
for (RTMLockingStatistics s : statistics) {
|
||||
@ -159,15 +158,16 @@ public class TestRTMLockingThreshold extends CommandLineOptionTest {
|
||||
* Test <inflate monitor>
|
||||
*/
|
||||
public static void main(String args[]) throws Throwable {
|
||||
Asserts.assertGTE(args.length, 1, "One argument required.");
|
||||
Asserts.assertGTE(args.length, 2, "Two arguments required.");
|
||||
Test t = new Test();
|
||||
boolean shouldBeInflated = Boolean.valueOf(args[0]);
|
||||
int lockingThreshold = Integer.valueOf(args[1]);
|
||||
if (shouldBeInflated) {
|
||||
AbortProvoker.inflateMonitor(t.monitor);
|
||||
}
|
||||
for (int i = 0; i < Test.TOTAL_ITERATIONS; i++) {
|
||||
AbortProvoker.verifyMonitorState(t.monitor, shouldBeInflated);
|
||||
t.lock(i % 2 == 1);
|
||||
t.lock(i >= lockingThreshold / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
* -XX:+WhiteBoxAPI TestRTMTotalCountIncrRate
|
||||
*/
|
||||
|
||||
import sun.misc.Unsafe;
|
||||
import java.util.List;
|
||||
|
||||
import com.oracle.java.testlibrary.*;
|
||||
@ -97,14 +98,12 @@ public class TestRTMTotalCountIncrRate extends CommandLineOptionTest {
|
||||
Asserts.assertEQ(lock.getTotalLocks(), Test.TOTAL_ITERATIONS,
|
||||
"Total locks should be exactly the same as amount of "
|
||||
+ "iterations.");
|
||||
} else {
|
||||
Asserts.assertGT(lock.getTotalLocks(), 0L, "RTM statistics "
|
||||
+ "should contain information for at least on lock.");
|
||||
}
|
||||
}
|
||||
|
||||
public static class Test implements CompilableTest {
|
||||
private static final long TOTAL_ITERATIONS = 10000L;
|
||||
private static final Unsafe UNSAFE = Utils.getUnsafe();
|
||||
private final Object monitor = new Object();
|
||||
// Following field have to be static in order to avoid escape analysis.
|
||||
@SuppressWarnings("UnsuedDeclaration")
|
||||
@ -120,8 +119,17 @@ public class TestRTMTotalCountIncrRate extends CommandLineOptionTest {
|
||||
return new String[] { getMethodWithLockName() };
|
||||
}
|
||||
|
||||
public void lock() {
|
||||
public void lock(booleab forceAbort) {
|
||||
synchronized(monitor) {
|
||||
if (forceAbort) {
|
||||
// We're calling native method in order to force
|
||||
// abort. It's done by explicit xabort call emitted
|
||||
// in SharedRuntime::generate_native_wrapper.
|
||||
// If an actuall JNI call will be replaced by
|
||||
// intrinsic - we'll be in trouble, since xabort
|
||||
// will be no longer called and test may fail.
|
||||
UNSAFE.addressSize();
|
||||
}
|
||||
Test.field++;
|
||||
}
|
||||
}
|
||||
@ -140,7 +148,11 @@ public class TestRTMTotalCountIncrRate extends CommandLineOptionTest {
|
||||
for (long i = 0L; i < Test.TOTAL_ITERATIONS; i++) {
|
||||
AbortProvoker.verifyMonitorState(test.monitor,
|
||||
shouldBeInflated);
|
||||
test.lock();
|
||||
// Force abort on first iteration to avoid rare case when
|
||||
// there were no aborts and locks count was not incremented
|
||||
// with RTMTotalCountIncrRate > 1 (in such case JVM won't
|
||||
// print JVM locking statistics).
|
||||
test.lock(i == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,9 +125,6 @@ public class TestPrintPreciseRTMLockingStatistics
|
||||
|
||||
RTMLockingStatistics lock = statistics.get(0);
|
||||
|
||||
Asserts.assertGT(lock.getTotalLocks(), 0L, "RTM locking statistics "
|
||||
+ "should contain non zero total locks count");
|
||||
|
||||
Asserts.assertGT(lock.getTotalAborts(), 0L,
|
||||
"RTM locking statistics should contain non zero total aborts "
|
||||
+ "count");
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
* @summary JVM crashes with "missing exception handler" error
|
||||
* @author volker.simonis@sap.com
|
||||
*
|
||||
* @run main/othervm -XX:CompileThreshold=100 -Xbatch -Xss248k StackOverflowBug
|
||||
* @run main/othervm -XX:CompileThreshold=100 -Xbatch -Xss392k StackOverflowBug
|
||||
*/
|
||||
|
||||
|
||||
|
||||
145
hotspot/test/compiler/testlibrary/uncommontrap/Verifier.java
Normal file
145
hotspot/test/compiler/testlibrary/uncommontrap/Verifier.java
Normal file
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package uncommontrap;
|
||||
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.oracle.java.testlibrary.Asserts;
|
||||
/**
|
||||
* Utility tool aimed to verify presence or absence of specified uncommon trap
|
||||
* in compilation log.
|
||||
*/
|
||||
public class Verifier {
|
||||
public static final String PROPERTIES_FILE_SUFFIX = ".verify.properties";
|
||||
public static final String VERIFICATION_SHOULD_BE_SKIPPED
|
||||
= "uncommon.trap.verification.skipped";
|
||||
public static final String UNCOMMON_TRAP_NAME = "uncommon.trap.name";
|
||||
public static final String UNCOMMON_TRAP_BCI = "uncommon.trap.bci";
|
||||
public static final String UNCOMMON_TRAP_COMMENT = "uncommon.trap.comment";
|
||||
public static final String UNCOMMON_TRAP_ACTION = "uncommon.trap.action";
|
||||
public static final String UNCOMMON_TRAP_SHOULD_EMITTED
|
||||
= "uncommon.trap.emitted";
|
||||
public static final String UNCOMMON_TRAP_SHOULD_FIRED
|
||||
= "uncommon.trap.fired";
|
||||
|
||||
private static final String EMITTED_TRAP_PATTERN
|
||||
= "<uncommon_trap bci='%s' reason='%s' action='%s' "
|
||||
+ "comment='%s'";
|
||||
private static final String FIRED_TRAP_PATTERN
|
||||
= "<uncommon_trap thread='[0-9]*' reason='%s' action='%s'";
|
||||
private static final String JVMS_PATTERN = "<jvms bci='%s'";
|
||||
|
||||
public static void main(String args[]) {
|
||||
if (args.length == 0) {
|
||||
throw new Error("At least one argument containing name of "
|
||||
+ "compilation log file is expected");
|
||||
}
|
||||
|
||||
for (String compLogFile : args) {
|
||||
try {
|
||||
verify(Paths.get(compLogFile));
|
||||
} catch (IOException e) {
|
||||
throw new Error("Unable to process compilation log.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void verify(Path compLogFile) throws IOException {
|
||||
Path propertiesFile = Paths.get(compLogFile.toString() +
|
||||
PROPERTIES_FILE_SUFFIX);
|
||||
|
||||
Properties properties = new Properties();
|
||||
properties.load(new FileReader(propertiesFile.toFile()));
|
||||
|
||||
if (Boolean.valueOf(properties.getProperty(
|
||||
VERIFICATION_SHOULD_BE_SKIPPED, "false"))) {
|
||||
System.out.println("Skipping verification for log file: "
|
||||
+ compLogFile.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("Verifying log file: " + compLogFile.toString());
|
||||
|
||||
List<String> compLogContent = Files.readAllLines(compLogFile);
|
||||
verifyUncommonTrapEmitted(properties, compLogContent);
|
||||
verifyUncommonTrapFired(properties, compLogContent);
|
||||
}
|
||||
|
||||
private static void verifyUncommonTrapEmitted(Properties properties,
|
||||
List<String> compLogContent) {
|
||||
String emittedTrapRE = String.format(EMITTED_TRAP_PATTERN,
|
||||
properties.getProperty(UNCOMMON_TRAP_BCI, ".*"),
|
||||
properties.getProperty(UNCOMMON_TRAP_NAME, ".*"),
|
||||
properties.getProperty(UNCOMMON_TRAP_ACTION, ".*"),
|
||||
properties.getProperty(UNCOMMON_TRAP_COMMENT, ".*"));
|
||||
Pattern pattern = Pattern.compile(emittedTrapRE);
|
||||
|
||||
long trapsCount = compLogContent.stream()
|
||||
.filter(line -> pattern.matcher(line).find())
|
||||
.count();
|
||||
|
||||
boolean shouldBeEmitted = Boolean.valueOf(
|
||||
properties.getProperty(UNCOMMON_TRAP_SHOULD_EMITTED));
|
||||
|
||||
Asserts.assertEQ(shouldBeEmitted, trapsCount > 0, String.format(
|
||||
"Uncommon trap that matches following string in compilation log"
|
||||
+ " should %sbe emitted: %s.",
|
||||
(shouldBeEmitted ? " " : "not "), emittedTrapRE));
|
||||
}
|
||||
|
||||
private static void verifyUncommonTrapFired(Properties properties,
|
||||
List<String> compLogContent) {
|
||||
String firedTrapRE = String.format(FIRED_TRAP_PATTERN,
|
||||
properties.getProperty(UNCOMMON_TRAP_NAME, ".*"),
|
||||
properties.getProperty(UNCOMMON_TRAP_ACTION, ".*"));
|
||||
String jvmsRE = String.format(JVMS_PATTERN,
|
||||
properties.getProperty(UNCOMMON_TRAP_BCI, ".*"));
|
||||
|
||||
boolean trapFired = false;
|
||||
Pattern firedTrapPattern = Pattern.compile(firedTrapRE);
|
||||
Pattern jvmsPattern = Pattern.compile(jvmsRE);
|
||||
|
||||
Iterator<String> iterator = compLogContent.iterator();
|
||||
while (iterator.hasNext() && !trapFired) {
|
||||
trapFired = firedTrapPattern.matcher(iterator.next()).find()
|
||||
&& jvmsPattern.matcher(iterator.next()).find();
|
||||
}
|
||||
|
||||
boolean shouldBeFired = Boolean.valueOf(
|
||||
properties.getProperty(UNCOMMON_TRAP_SHOULD_FIRED));
|
||||
Asserts.assertEQ(shouldBeFired, trapFired, String.format(
|
||||
"Uncommon trap that matches following string in compilation log"
|
||||
+ " should %sbe fired: %s.",
|
||||
(shouldBeFired ? "" : "not "), firedTrapRE));
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ import java.lang.reflect.Method;
|
||||
* @build Test8009761
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=exclude,Test8009761::m2 -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -Xss256K Test8009761
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=exclude,Test8009761::m2 -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -Xss392K Test8009761
|
||||
*/
|
||||
public class Test8009761 {
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 8029383
|
||||
* @summary stack overflow if callee is marked for deoptimization causes crash
|
||||
* @run main/othervm -XX:TieredStopAtLevel=1 -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,StackOverflowGuardPagesOff::m1 -XX:CompileCommand=exclude,StackOverflowGuardPagesOff::m2 -Xss256K -XX:-UseOnStackReplacement StackOverflowGuardPagesOff
|
||||
* @run main/othervm -XX:TieredStopAtLevel=1 -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,StackOverflowGuardPagesOff::m1 -XX:CompileCommand=exclude,StackOverflowGuardPagesOff::m2 -Xss392K -XX:-UseOnStackReplacement StackOverflowGuardPagesOff
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 8032410
|
||||
* @summary Stack overflow at deoptimization doesn't release owned monitors
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestStackBangMonitorOwned::m1 -XX:CompileCommand=exclude,TestStackBangMonitorOwned::m2 -Xss256K -XX:-UseOnStackReplacement TestStackBangMonitorOwned
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestStackBangMonitorOwned::m1 -XX:CompileCommand=exclude,TestStackBangMonitorOwned::m2 -Xss392K -XX:-UseOnStackReplacement TestStackBangMonitorOwned
|
||||
*
|
||||
*/
|
||||
public class TestStackBangMonitorOwned {
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 8028308
|
||||
* @summary rbp not restored when stack overflow is thrown from deopt/uncommon trap blobs
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestStackBangRbp::m1 -XX:CompileCommand=exclude,TestStackBangRbp::m2 -Xss256K -XX:-UseOnStackReplacement TestStackBangRbp
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestStackBangRbp::m1 -XX:CompileCommand=exclude,TestStackBangRbp::m2 -Xss392K -XX:-UseOnStackReplacement TestStackBangRbp
|
||||
*
|
||||
*/
|
||||
public class TestStackBangRbp {
|
||||
|
||||
257
hotspot/test/compiler/uncommontrap/TestUnstableIfTrap.java
Normal file
257
hotspot/test/compiler/uncommontrap/TestUnstableIfTrap.java
Normal file
@ -0,0 +1,257 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.oracle.java.testlibrary.ByteCodeLoader;
|
||||
import com.oracle.java.testlibrary.Platform;
|
||||
import jdk.internal.org.objectweb.asm.ClassVisitor;
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.Label;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
|
||||
import sun.hotspot.WhiteBox;
|
||||
import uncommontrap.Verifier;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8030976 8059226
|
||||
* @library /testlibrary /compiler/testlibrary /../../test/lib
|
||||
* @build TestUnstableIfTrap com.oracle.java.testlibrary.* uncommontrap.Verifier
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+WhiteBoxAPI -XX:+LogCompilation
|
||||
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
|
||||
* -XX:LogFile=always_taken_not_fired.xml
|
||||
* TestUnstableIfTrap ALWAYS_TAKEN false
|
||||
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+WhiteBoxAPI -XX:+LogCompilation
|
||||
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
|
||||
* -XX:LogFile=always_taken_fired.xml
|
||||
* TestUnstableIfTrap ALWAYS_TAKEN true
|
||||
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+WhiteBoxAPI -XX:+LogCompilation
|
||||
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
|
||||
* -XX:LogFile=never_taken_not_fired.xml
|
||||
* TestUnstableIfTrap NEVER_TAKEN false
|
||||
* @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+WhiteBoxAPI -XX:+LogCompilation
|
||||
* -XX:CompileCommand=compileonly,UnstableIfExecutable.test
|
||||
* -XX:LogFile=never_taken_fired.xml
|
||||
* TestUnstableIfTrap NEVER_TAKEN true
|
||||
* @run main uncommontrap.Verifier always_taken_not_fired.xml
|
||||
* always_taken_fired.xml
|
||||
* never_taken_not_fired.xml
|
||||
* never_taken_fired.xml
|
||||
*/
|
||||
public class TestUnstableIfTrap {
|
||||
private static final WhiteBox WB = WhiteBox.getWhiteBox();
|
||||
private static final String CLASS_NAME = "UnstableIfExecutable";
|
||||
private static final String METHOD_NAME = "test";
|
||||
private static final String FIELD_NAME = "field";
|
||||
private static final int ITERATIONS = 1_000_000;
|
||||
// There is no dependency on particular class file version, so it could be
|
||||
// set to any version (if you're updating this test for Java 42).
|
||||
private static final int CLASS_FILE_VERSION = 49;
|
||||
private static final int MAX_TIER = 4;
|
||||
// This test aimed to verify that uncommon trap with reason "unstable_if"
|
||||
// is emitted when method that contain control-flow divergence such that
|
||||
// one of two branches is never taken (and other one is taken always).
|
||||
// C2 will made a decision whether or not the branch was ever taken
|
||||
// depending on method's profile.
|
||||
// If profile was collected for a few method's invocations, then C2 will not
|
||||
// trust in branches' probabilities and the tested trap won't be emitted.
|
||||
// In fact, a method has to be invoked at least 40 time at the day when this
|
||||
// comment was written (see Parse::dynamic_branch_prediction for an actual
|
||||
// value). It would be to implementation dependent to use "40" as
|
||||
// a threshold value in the test, so in order to improve test's robustness
|
||||
// the threshold value is 1000: if the tested method was compiled by C2
|
||||
// before it was invoked 1000 times, then we won't verify that trap was
|
||||
// emitted and fired.
|
||||
private static final int MIN_INVOCATIONS_BEFORE_C2_COMPILATION = 1000;
|
||||
/**
|
||||
* Description of test case parameters and uncommon trap that will
|
||||
* be emitted during tested method compilation.
|
||||
*/
|
||||
private static enum TestCaseName {
|
||||
ALWAYS_TAKEN(false, "taken always"),
|
||||
NEVER_TAKEN(true, "taken never");
|
||||
TestCaseName(boolean predicate, String comment) {
|
||||
this.predicate = predicate;
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public final boolean predicate;
|
||||
public final String name = "unstable_if";
|
||||
public final String comment;
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
if (args.length != 2) {
|
||||
throw new Error("Expected two arguments: test case name and a "
|
||||
+ "boolean determining if uncommon trap should be fired.");
|
||||
}
|
||||
test(TestCaseName.valueOf(args[0]), Boolean.valueOf(args[1]));
|
||||
}
|
||||
|
||||
private static void test(TestCaseName testCase, boolean shouldBeFired) {
|
||||
Method testMethod;
|
||||
Label unstableIfLocation = new Label();
|
||||
boolean shouldBeEmitted;
|
||||
boolean compiledToEarly = false;
|
||||
|
||||
try {
|
||||
Class testClass = ByteCodeLoader.load(CLASS_NAME,
|
||||
generateTest(unstableIfLocation));
|
||||
testMethod = testClass.getDeclaredMethod(METHOD_NAME,
|
||||
boolean.class);
|
||||
for (int i = 0; i < ITERATIONS; i++) {
|
||||
testMethod.invoke(null, testCase.predicate);
|
||||
if (i < MIN_INVOCATIONS_BEFORE_C2_COMPILATION
|
||||
&& isMethodCompiledByC2(testMethod)) {
|
||||
compiledToEarly = true;
|
||||
// There is no sense in further invocations: we already
|
||||
// decided to avoid verification.
|
||||
break;
|
||||
}
|
||||
}
|
||||
// We're checking that trap should be emitted (i.e. it was compiled
|
||||
// by C2) before the trap is fired, because otherwise the nmethod
|
||||
// will be deoptimized and isMethodCompiledByC2 will return false.
|
||||
shouldBeEmitted = isMethodCompiledByC2(testMethod)
|
||||
&& !compiledToEarly;
|
||||
if (shouldBeFired) {
|
||||
testMethod.invoke(null, !testCase.predicate);
|
||||
}
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new Error("Test case should be generated, loaded and executed"
|
||||
+ " without any issues.", e);
|
||||
}
|
||||
|
||||
shouldBeFired &= shouldBeEmitted;
|
||||
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(Verifier.VERIFICATION_SHOULD_BE_SKIPPED,
|
||||
Boolean.toString(compiledToEarly));
|
||||
properties.setProperty(Verifier.UNCOMMON_TRAP_SHOULD_EMITTED,
|
||||
Boolean.toString(shouldBeEmitted));
|
||||
properties.setProperty(Verifier.UNCOMMON_TRAP_SHOULD_FIRED,
|
||||
Boolean.toString(shouldBeFired));
|
||||
properties.setProperty(Verifier.UNCOMMON_TRAP_NAME, testCase.name);
|
||||
properties.setProperty(Verifier.UNCOMMON_TRAP_COMMENT,
|
||||
testCase.comment);
|
||||
properties.setProperty(Verifier.UNCOMMON_TRAP_BCI,
|
||||
Integer.toString(unstableIfLocation.getOffset()));
|
||||
|
||||
properties.list(System.out);
|
||||
|
||||
File f = new File(WB.getStringVMFlag("LogFile") +
|
||||
Verifier.PROPERTIES_FILE_SUFFIX);
|
||||
try (FileWriter wr = new FileWriter(f)) {
|
||||
properties.store(wr, "");
|
||||
} catch (IOException e) {
|
||||
throw new Error("Unable to store test properties.", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isMethodCompiledByC2(Method m) {
|
||||
boolean isTiered = WB.getBooleanVMFlag("TieredCompilation");
|
||||
boolean isMethodCompiled = WB.isMethodCompiled(m);
|
||||
boolean isMethodCompiledAtMaxTier
|
||||
= WB.getMethodCompilationLevel(m) == MAX_TIER;
|
||||
|
||||
return Platform.isServer() && isMethodCompiled
|
||||
&& (!isTiered || isMethodCompiledAtMaxTier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates class with name {@code CLASS_NAME}, which will contain a
|
||||
* static method {@code METHOD_NAME}:
|
||||
*
|
||||
* <pre>{@code
|
||||
* public abstract class UnstableIfExecutable {
|
||||
* private static int field = 0;
|
||||
*
|
||||
* public static void test(boolean alwaysTrue) {
|
||||
* if (alwaysTrue) {
|
||||
* field++;
|
||||
* } else {
|
||||
* field--;
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @return generated bytecode.
|
||||
*/
|
||||
private static byte[] generateTest(Label unstableIfLocation) {
|
||||
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
|
||||
|
||||
cw.visit(CLASS_FILE_VERSION, ACC_PUBLIC | ACC_ABSTRACT, CLASS_NAME,
|
||||
null, "java/lang/Object", null);
|
||||
|
||||
cw.visitField(ACC_PUBLIC | ACC_STATIC | ACC_VOLATILE, FIELD_NAME,
|
||||
"I", null, Integer.valueOf(0));
|
||||
|
||||
generateTestMethod(cw, unstableIfLocation);
|
||||
|
||||
return cw.toByteArray();
|
||||
}
|
||||
|
||||
private static void generateTestMethod(ClassVisitor cv,
|
||||
Label unstableIfLocation) {
|
||||
MethodVisitor mv = cv.visitMethod(ACC_PUBLIC | ACC_STATIC, METHOD_NAME,
|
||||
"(Z)V", null, null);
|
||||
mv.visitCode();
|
||||
|
||||
Label end = new Label();
|
||||
Label falseBranch = new Label();
|
||||
|
||||
// push "field" field's value and 1 to stack
|
||||
mv.visitFieldInsn(GETSTATIC, CLASS_NAME, FIELD_NAME, "I");
|
||||
mv.visitInsn(ICONST_1);
|
||||
// load argument's value
|
||||
mv.visitVarInsn(ILOAD, 0); // alwaysTrue
|
||||
// here is our unstable if
|
||||
mv.visitLabel(unstableIfLocation);
|
||||
mv.visitJumpInsn(IFEQ, falseBranch);
|
||||
// increment on "true"
|
||||
mv.visitInsn(IADD);
|
||||
mv.visitJumpInsn(GOTO, end);
|
||||
// decrement on "false"
|
||||
mv.visitLabel(falseBranch);
|
||||
mv.visitInsn(ISUB);
|
||||
mv.visitLabel(end);
|
||||
// bye bye
|
||||
mv.visitInsn(RETURN);
|
||||
|
||||
mv.visitMaxs(0, 0);
|
||||
mv.visitEnd();
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ import com.oracle.java.testlibrary.InfiniteLoop;
|
||||
/*
|
||||
* @test
|
||||
* @bug 8059624 8064669
|
||||
* @ignore 8066998
|
||||
* @library /testlibrary /../../test/lib
|
||||
* @build ForceNMethodSweepTest
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,34 +26,46 @@
|
||||
* @bug 8067438
|
||||
* @requires vm.gc=="null"
|
||||
* @summary Verify that starting the VM with a small heap works
|
||||
* @library /testlibrary
|
||||
* @run main/othervm -Xmx4m -XX:+UseParallelGC TestSmallHeap
|
||||
* @run main/othervm -Xmx4m -XX:+UseSerialGC TestSmallHeap
|
||||
* @run main/othervm -Xmx4m -XX:+UseG1GC TestSmallHeap
|
||||
* @run main/othervm -Xmx4m -XX:+UseConcMarkSweepGC -XX:CMSMarkStackSizeMax=1032 TestSmallHeap
|
||||
* @library /testlibrary /../../test/lib
|
||||
* @build TestSmallHeap
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseParallelGC TestSmallHeap
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseSerialGC TestSmallHeap
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseG1GC TestSmallHeap
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx2m -XX:+UseConcMarkSweepGC TestSmallHeap
|
||||
*
|
||||
* Note: It would be nice to verify the minimal supported heap size (2m) here,
|
||||
* but we align the heap size based on the card table size. And the card table
|
||||
* size is aligned based on the minimal pages size provided by the os. This
|
||||
* means that on most platforms, where the minimal page size is 4k, we get a
|
||||
* minimal heap size of 2m but on Solaris/Sparc we have a page size of 8k and
|
||||
* get a minimal heap size of 4m. And on platforms where the page size is 64k
|
||||
* we get a minimal heap size of 32m. We never use large pages for the card table.
|
||||
*
|
||||
* Note: It would be nice to verify the minimal supported heap size here,
|
||||
* but that turns out to be quite tricky since we align the heap size based
|
||||
* on the card table size. And the card table size is aligned based on the
|
||||
* minimal pages size provided by the os. This means that on most platforms,
|
||||
* where the minimal page size is 4k, we get a minimal heap size of 2m but
|
||||
* on Solaris/Sparc we have a page size of 8k and get a minimal heap size
|
||||
* of 8m.
|
||||
* There is also no check in the VM for verifying that the maximum heap size
|
||||
* is larger than the supported minimal heap size. This means that specifying
|
||||
* -Xmx1m on the command line is fine but will give a heap of 2m (or 4m).
|
||||
* To work around these rather strange behaviors this test uses 4m for all
|
||||
* platforms.
|
||||
* -Xmx1m on the command line is fine but will give a heap of 2m (or 4m or 32m).
|
||||
*
|
||||
* To work around these rather strange behaviors this test uses -Xmx2m but then
|
||||
* calculates what the expected heap size should be. The calculation is a
|
||||
* simplified version of the code in the VM. We assume that the card table will
|
||||
* use one page. Each byte in the card table corresponds to 512 bytes on the heap.
|
||||
* So, the expected heap size is page_size * 512.
|
||||
*/
|
||||
|
||||
import sun.management.ManagementFactoryHelper;
|
||||
import com.oracle.java.testlibrary.*;
|
||||
import static com.oracle.java.testlibrary.Asserts.*;
|
||||
import sun.hotspot.WhiteBox;
|
||||
import sun.management.ManagementFactoryHelper;
|
||||
|
||||
public class TestSmallHeap {
|
||||
|
||||
public static void main(String[] args) {
|
||||
WhiteBox wb = WhiteBox.getWhiteBox();
|
||||
int pageSize = wb.getVMPageSize();
|
||||
int heapBytesPerCard = 512;
|
||||
long expectedMaxHeap = pageSize * heapBytesPerCard;
|
||||
String maxHeap = ManagementFactoryHelper.getDiagnosticMXBean().getVMOption("MaxHeapSize").getValue();
|
||||
String expectedMaxHeap = "4194304";
|
||||
assertEQ(maxHeap, expectedMaxHeap);
|
||||
assertEQ(Long.parseLong(maxHeap), expectedMaxHeap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ class TestMaxHeapSizeTools {
|
||||
}
|
||||
|
||||
private static void checkInvalidMinInitialHeapCombinations(String gcflag) throws Exception {
|
||||
expectError(new String[] { gcflag, "-Xms8M", "-XX:InitialHeapSize=4M", "-version" });
|
||||
expectError(new String[] { gcflag, "-Xms64M", "-XX:InitialHeapSize=32M", "-version" });
|
||||
}
|
||||
|
||||
private static void checkValidMinInitialHeapCombinations(String gcflag) throws Exception {
|
||||
|
||||
@ -107,8 +107,8 @@ public class TestGCLogMessages {
|
||||
|
||||
private static void testWithToSpaceExhaustionLogs() throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
|
||||
"-Xmx10M",
|
||||
"-Xmn5M",
|
||||
"-Xmx32M",
|
||||
"-Xmn16M",
|
||||
"-XX:+PrintGCDetails",
|
||||
GCTestWithToSpaceExhaustion.class.getName());
|
||||
|
||||
@ -120,8 +120,8 @@ public class TestGCLogMessages {
|
||||
output.shouldHaveExitValue(0);
|
||||
|
||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
|
||||
"-Xmx10M",
|
||||
"-Xmn5M",
|
||||
"-Xmx32M",
|
||||
"-Xmn16M",
|
||||
"-XX:+PrintGCDetails",
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:G1LogLevel=finest",
|
||||
@ -151,7 +151,7 @@ public class TestGCLogMessages {
|
||||
private static byte[] garbage;
|
||||
private static byte[] largeObject;
|
||||
public static void main(String [] args) {
|
||||
largeObject = new byte[5*1024*1024];
|
||||
largeObject = new byte[16*1024*1024];
|
||||
System.out.println("Creating garbage");
|
||||
// create 128MB of garbage. This should result in at least one GC,
|
||||
// some of them with to-space exhaustion.
|
||||
|
||||
@ -31,7 +31,9 @@
|
||||
import com.oracle.java.testlibrary.*;
|
||||
|
||||
public class TestHumongousAllocInitialMark {
|
||||
private static final int heapSize = 200; // MB
|
||||
// Heap sizes < 224 MB are increased to 224 MB if vm_page_size == 64K to
|
||||
// fulfill alignment constraints.
|
||||
private static final int heapSize = 224; // MB
|
||||
private static final int heapRegionSize = 1; // MB
|
||||
private static final int initiatingHeapOccupancyPercent = 50; // %
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -71,11 +71,12 @@ bad_data_ptr_re='(SIGILL|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).* at pc='
|
||||
# EXCEPTION_ACCESS_VIOLATION - Win-*
|
||||
# SIGBUS - Solaris SPARC-64
|
||||
# SIGSEGV - Linux-*, Solaris SPARC-32, Solaris X86-*
|
||||
# SIGILL - Aix
|
||||
#
|
||||
# Note: would like to use "pc=0x00*0f," in the pattern, but Solaris SPARC-*
|
||||
# gets its signal at a PC in test_error_handler().
|
||||
#
|
||||
bad_func_ptr_re='(SIGBUS|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).* at pc='
|
||||
bad_func_ptr_re='(SIGBUS|SIGSEGV|SIGILL|EXCEPTION_ACCESS_VIOLATION).* at pc='
|
||||
guarantee_re='guarantee[(](str|num).*failed: *'
|
||||
fatal_re='fatal error: *'
|
||||
tail_1='.*expected null'
|
||||
|
||||
@ -43,7 +43,7 @@ public class CompilerConfigFileWarning {
|
||||
|
||||
pb = ProcessTools.createJavaProcessBuilder("-XX:CompileCommandFile=hs_comp.txt", "-version");
|
||||
output = new OutputAnalyzer(pb.start());
|
||||
output.shouldContain("CompilerOracle: unrecognized line");
|
||||
output.shouldContain("CompileCommand: unrecognized command");
|
||||
output.shouldContain("aaa aaa");
|
||||
|
||||
// Skip on debug builds since we'll always read the file there
|
||||
|
||||
@ -47,7 +47,7 @@ public class WBStackSize {
|
||||
static final long K = 1024;
|
||||
|
||||
static final long MIN_STACK_SIZE = 8 * K;
|
||||
static final long MAX_STACK_SIZE_ALLOCATED_IN_MAIN = 200 * K; // current value is about 130k on 64-bit platforms
|
||||
static final long MAX_STACK_SIZE_ALLOCATED_IN_MAIN = 150 * K; // current value is about 130k on 64-bit platforms
|
||||
|
||||
static final WhiteBox wb = WhiteBox.getWhiteBox();
|
||||
|
||||
@ -82,9 +82,11 @@ public class WBStackSize {
|
||||
|
||||
public static void main(String[] args) {
|
||||
long configStackSize = wb.getIntxVMFlag("ThreadStackSize") * K;
|
||||
|
||||
System.out.println("ThreadStackSize VM option: " + configStackSize);
|
||||
|
||||
long stackProtectionSize = wb.getIntxVMFlag("StackShadowPages") * wb.getVMPageSize();
|
||||
System.out.println("Size of protected shadow pages: " + stackProtectionSize);
|
||||
|
||||
long actualStackSize = wb.getThreadStackSize();
|
||||
System.out.println("Full stack size: " + actualStackSize);
|
||||
|
||||
@ -96,14 +98,16 @@ public class WBStackSize {
|
||||
long remainingStackSize = wb.getThreadRemainingStackSize();
|
||||
System.out.println("Remaining stack size in main(): " + remainingStackSize);
|
||||
|
||||
// Up to 200k can be already allocated by VM
|
||||
// Up to 150k can be already allocated by VM and some space is used for stack protection.
|
||||
long spaceAlreadyOccupied = MAX_STACK_SIZE_ALLOCATED_IN_MAIN + stackProtectionSize;
|
||||
|
||||
if (remainingStackSize > configStackSize
|
||||
|| (configStackSize > MAX_STACK_SIZE_ALLOCATED_IN_MAIN
|
||||
&& remainingStackSize < configStackSize - MAX_STACK_SIZE_ALLOCATED_IN_MAIN)) {
|
||||
|| (configStackSize > spaceAlreadyOccupied
|
||||
&& remainingStackSize < configStackSize - spaceAlreadyOccupied)) {
|
||||
|
||||
throw new RuntimeException("getThreadRemainingStackSize value [" + remainingStackSize
|
||||
+ "] should be at least ThreadStackSize value [" + configStackSize + "] minus ["
|
||||
+ MAX_STACK_SIZE_ALLOCATED_IN_MAIN + "]");
|
||||
+ spaceAlreadyOccupied + "]");
|
||||
}
|
||||
|
||||
testStackOverflow();
|
||||
|
||||
@ -3,7 +3,7 @@ import java.util.Set;
|
||||
import com.oracle.java.testlibrary.Platform;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,14 +39,16 @@ public class DynLibDcmdTest {
|
||||
String result = DcmdUtil.executeDcmd("VM.dynlibs");
|
||||
|
||||
String osDependentBaseString = null;
|
||||
if (Platform.isSolaris()) {
|
||||
if (Platform.isAix()) {
|
||||
osDependentBaseString = "lib%s.so";
|
||||
} else if (Platform.isLinux()) {
|
||||
osDependentBaseString = "lib%s.so";
|
||||
} else if (Platform.isOSX()) {
|
||||
osDependentBaseString = "lib%s.dylib";
|
||||
} else if (Platform.isSolaris()) {
|
||||
osDependentBaseString = "lib%s.so";
|
||||
} else if (Platform.isWindows()) {
|
||||
osDependentBaseString = "%s.dll";
|
||||
} else if (Platform.isOSX()) {
|
||||
osDependentBaseString = "lib%s.dylib";
|
||||
} else if (Platform.isLinux()) {
|
||||
osDependentBaseString = "lib%s.so";
|
||||
}
|
||||
|
||||
if (osDependentBaseString == null) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,7 +56,7 @@ echo "TESTOPTS=${TESTOPTS}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | Darwin )
|
||||
AIX | Darwin | Linux | SunOS )
|
||||
NULL=/dev/null
|
||||
PS=":"
|
||||
FS="/"
|
||||
@ -133,26 +133,31 @@ then
|
||||
fi
|
||||
|
||||
VM_OS="unknown"
|
||||
grep "solaris" vm_version.out > ${NULL}
|
||||
grep "aix" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_OS="solaris"
|
||||
VM_OS="aix"
|
||||
fi
|
||||
grep "bsd" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_OS="bsd"
|
||||
fi
|
||||
grep "linux" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_OS="linux"
|
||||
fi
|
||||
grep "solaris" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_OS="solaris"
|
||||
fi
|
||||
grep "windows" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_OS="windows"
|
||||
fi
|
||||
grep "bsd" vm_version.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
VM_OS="bsd"
|
||||
fi
|
||||
|
||||
VM_CPU="unknown"
|
||||
grep "sparc" vm_version.out > ${NULL}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -68,20 +68,24 @@ public class Platform {
|
||||
return dataModel.equals("64");
|
||||
}
|
||||
|
||||
public static boolean isSolaris() {
|
||||
return isOs("sunos");
|
||||
public static boolean isAix() {
|
||||
return isOs("aix");
|
||||
}
|
||||
|
||||
public static boolean isWindows() {
|
||||
return isOs("win");
|
||||
public static boolean isLinux() {
|
||||
return isOs("linux");
|
||||
}
|
||||
|
||||
public static boolean isOSX() {
|
||||
return isOs("mac");
|
||||
}
|
||||
|
||||
public static boolean isLinux() {
|
||||
return isOs("linux");
|
||||
public static boolean isSolaris() {
|
||||
return isOs("sunos");
|
||||
}
|
||||
|
||||
public static boolean isWindows() {
|
||||
return isOs("win");
|
||||
}
|
||||
|
||||
private static boolean isOs(String osname) {
|
||||
@ -140,7 +144,9 @@ public class Platform {
|
||||
*/
|
||||
public static boolean shouldSAAttach() throws Exception {
|
||||
|
||||
if (isLinux()) {
|
||||
if (isAix()) {
|
||||
return false; // SA not implemented.
|
||||
} else if (isLinux()) {
|
||||
return canPtraceAttachLinux();
|
||||
} else if (isOSX()) {
|
||||
return canAttachOSX();
|
||||
|
||||
@ -45,7 +45,7 @@ public class TestMutuallyExclusivePlatformPredicates {
|
||||
private static enum MethodGroup {
|
||||
ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"),
|
||||
BITNESS("is32bit", "is64bit"),
|
||||
OS("isLinux", "isSolaris", "isWindows", "isOSX"),
|
||||
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
|
||||
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"),
|
||||
IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach",
|
||||
"canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");
|
||||
|
||||
@ -287,3 +287,4 @@ a12d347f84176200593999f4da91ae2bb86865b2 jdk9-b39
|
||||
47b0d3fa4118b9d56870cf4004987438c501f5c0 jdk9-b42
|
||||
40b242363040229a05224fbc5dc203a3f46a8f8f jdk9-b43
|
||||
0cb0844b58924d6086d2850c22087d06679d5eef jdk9-b44
|
||||
0dab3e848229127c7aca4c58b98e2d90ba70372f jdk9-b45
|
||||
|
||||
@ -290,3 +290,4 @@ dd4ba422dba858b1c3c4b38f49a3e514be4e2790 jdk9-b38
|
||||
301ddb4478fb36d1f025d14e7e48c2a434e9e6ff jdk9-b42
|
||||
edc13d27dc871be57d7ca77eef77e6d04972fee2 jdk9-b43
|
||||
2a03baa4d849818ff6d635f110c2813b12fc2326 jdk9-b44
|
||||
e529374fbe526dbd668e5e98fc047b42b3bc6d33 jdk9-b45
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user