Merge
This commit is contained in:
commit
dc20ecddcf
3
.hgtags
3
.hgtags
@ -256,3 +256,6 @@ efe7dbc6088691757404e0c8745f894e3ca9c022 jdk9-b09
|
||||
0809c9a4d36e6291f1c4384604c4bbf29e975722 jdk9-b11
|
||||
0d1f816217dce5e72187f167cc1816080cbeb453 jdk9-b12
|
||||
1a30593dcb9802faec3b6edb24d86ca088594e4e jdk9-b13
|
||||
97932f6ad950ae5a73a9da5c96e6e58503ff646b jdk9-b14
|
||||
74eb0778e4f2dbff6628e718378449fba27c4265 jdk9-b15
|
||||
4a09f5d30be844ac6f714bdb0f63d8c3c08b9a98 jdk9-b16
|
||||
|
@ -256,3 +256,6 @@ fa13f2b926f8426876ec03e7903f3ee0ee150f2e jdk9-b10
|
||||
ab55a18a95e1990a588929d5d29db3eb9985fea0 jdk9-b11
|
||||
59f6350295f9681fe5956d8bc889bf341914c6cb jdk9-b12
|
||||
5800456add07e1a68170a229fb5e27376f8875e5 jdk9-b13
|
||||
4e3aa9723e9972623e3dafc321b368e7db7e9b3b jdk9-b14
|
||||
b114474fb25af4e73cb7219f7c04bd8994da03a5 jdk9-b15
|
||||
cf22a728521f91a4692b433d39d730a0a1b23155 jdk9-b16
|
||||
|
14
README
14
README
@ -1,15 +1,15 @@
|
||||
README:
|
||||
This file should be located at the top of the OpenJDK Mercurial root
|
||||
repository. A full OpenJDK repository set (forest) should also include
|
||||
the following 6 nested repositories:
|
||||
"jdk", "hotspot", "langtools", "corba", "jaxws" and "jaxp".
|
||||
the following 7 nested repositories:
|
||||
"jdk", "hotspot", "langtools", "nashorn", "corba", "jaxws" and "jaxp".
|
||||
|
||||
The root repository can be obtained with something like:
|
||||
hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
|
||||
hg clone http://hg.openjdk.java.net/jdk9/jdk9 openjdk9
|
||||
|
||||
You can run the get_source.sh script located in the root repository to get
|
||||
the other needed repositories:
|
||||
cd openjdk8 && sh ./get_source.sh
|
||||
cd openjdk9 && sh ./get_source.sh
|
||||
|
||||
People unfamiliar with Mercurial should read the first few chapters of
|
||||
the Mercurial book: http://hgbook.red-bean.com/read/
|
||||
@ -19,9 +19,9 @@ README:
|
||||
Simple Build Instructions:
|
||||
|
||||
0. Get the necessary system software/packages installed on your system, see
|
||||
http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
|
||||
http://hg.openjdk.java.net/jdk9/jdk9/raw-file/tip/README-builds.html
|
||||
|
||||
1. If you don't have a jdk7u7 or newer jdk, download and install it from
|
||||
1. If you don't have a jdk8 or newer jdk, download and install it from
|
||||
http://java.sun.com/javase/downloads/index.jsp
|
||||
Add the /bin directory of this installation to your PATH environment
|
||||
variable.
|
||||
@ -37,4 +37,4 @@ where make is GNU make 3.81 or newer, /usr/bin/make on Linux usually
|
||||
is 3.81 or newer. Note that on Solaris, GNU make is called "gmake".
|
||||
|
||||
Complete details are available in the file:
|
||||
http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
|
||||
http://hg.openjdk.java.net/jdk9/jdk9/raw-file/tip/README-builds.html
|
||||
|
4
common/autoconf/configure
vendored
4
common/autoconf/configure
vendored
@ -49,7 +49,7 @@ fi
|
||||
###
|
||||
|
||||
run_autogen_or_fail() {
|
||||
if test "x`which autoconf 2> /dev/null`" = x; then
|
||||
if test "x`which autoconf 2> /dev/null | grep -v '^no autoconf in'`" = x; then
|
||||
echo "Cannot locate autoconf, unable to correct situation."
|
||||
echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
@ -80,7 +80,7 @@ check_autoconf_timestamps() {
|
||||
}
|
||||
|
||||
check_hg_updates() {
|
||||
if test "x`which hg 2> /dev/null`" != x; then
|
||||
if test "x`which hg 2> /dev/null | grep -v '^no hg in'`" != x; then
|
||||
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
|
||||
if test "x$conf_updated_autoconf_files" != x; then
|
||||
echo "Configure source code has been updated, checking time stamps"
|
||||
|
@ -656,6 +656,9 @@ USE_EXTERNAL_LIBZ
|
||||
USE_EXTERNAL_LIBPNG
|
||||
PNG_LIBS
|
||||
PNG_CFLAGS
|
||||
USE_EXTERNAL_LCMS
|
||||
LCMS_LIBS
|
||||
LCMS_CFLAGS
|
||||
USE_EXTERNAL_LIBGIF
|
||||
USE_EXTERNAL_LIBJPEG
|
||||
ALSA_LIBS
|
||||
@ -1079,6 +1082,7 @@ with_alsa
|
||||
with_alsa_include
|
||||
with_alsa_lib
|
||||
with_giflib
|
||||
with_lcms
|
||||
with_libpng
|
||||
with_zlib
|
||||
with_stdc__lib
|
||||
@ -1192,6 +1196,8 @@ FREETYPE_CFLAGS
|
||||
FREETYPE_LIBS
|
||||
ALSA_CFLAGS
|
||||
ALSA_LIBS
|
||||
LCMS_CFLAGS
|
||||
LCMS_LIBS
|
||||
PNG_CFLAGS
|
||||
PNG_LIBS
|
||||
LIBFFI_CFLAGS
|
||||
@ -1934,6 +1940,8 @@ Optional Packages:
|
||||
--with-alsa-lib specify directory for the alsa library
|
||||
--with-giflib use giflib from build system or OpenJDK source
|
||||
(system, bundled) [bundled]
|
||||
--with-lcms use lcms2 from build system or OpenJDK source
|
||||
(system, bundled) [bundled]
|
||||
--with-libpng use libpng from build system or OpenJDK source
|
||||
(system, bundled) [bundled]
|
||||
--with-zlib use zlib from build system or OpenJDK source
|
||||
@ -2060,6 +2068,8 @@ Some influential environment variables:
|
||||
linker flags for FREETYPE, overriding pkg-config
|
||||
ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
|
||||
ALSA_LIBS linker flags for ALSA, overriding pkg-config
|
||||
LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
|
||||
LCMS_LIBS linker flags for LCMS, overriding pkg-config
|
||||
PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
|
||||
PNG_LIBS linker flags for PNG, overriding pkg-config
|
||||
LIBFFI_CFLAGS
|
||||
@ -47307,6 +47317,115 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the lcms2 library
|
||||
#
|
||||
|
||||
|
||||
# Check whether --with-lcms was given.
|
||||
if test "${with_lcms+set}" = set; then :
|
||||
withval=$with_lcms;
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
|
||||
$as_echo_n "checking for which lcms to use... " >&6; }
|
||||
|
||||
DEFAULT_LCMS=bundled
|
||||
|
||||
#
|
||||
# If user didn't specify, use DEFAULT_LCMS
|
||||
#
|
||||
if test "x${with_lcms}" = "x"; then
|
||||
with_lcms=${DEFAULT_LCMS}
|
||||
fi
|
||||
|
||||
if test "x${with_lcms}" = "xbundled"; then
|
||||
USE_EXTERNAL_LCMS=false
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
|
||||
$as_echo "bundled" >&6; }
|
||||
elif test "x${with_lcms}" = "xsystem"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
|
||||
$as_echo "system" >&6; }
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
|
||||
$as_echo_n "checking for LCMS... " >&6; }
|
||||
|
||||
if test -n "$LCMS_CFLAGS"; then
|
||||
pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$LCMS_LIBS"; then
|
||||
pkg_cv_LCMS_LIBS="$LCMS_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
|
||||
else
|
||||
LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$LCMS_PKG_ERRORS" >&5
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
LCMS_FOUND=no
|
||||
elif test $pkg_failed = untried; then
|
||||
LCMS_FOUND=no
|
||||
else
|
||||
LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
|
||||
LCMS_LIBS=$pkg_cv_LCMS_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
LCMS_FOUND=yes
|
||||
fi
|
||||
if test "x${LCMS_FOUND}" = "xyes"; then
|
||||
USE_EXTERNAL_LCMS=true
|
||||
else
|
||||
as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the png library
|
||||
|
@ -664,6 +664,42 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||
fi
|
||||
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the lcms2 library
|
||||
#
|
||||
|
||||
AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
|
||||
[use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([for which lcms to use])
|
||||
|
||||
DEFAULT_LCMS=bundled
|
||||
|
||||
#
|
||||
# If user didn't specify, use DEFAULT_LCMS
|
||||
#
|
||||
if test "x${with_lcms}" = "x"; then
|
||||
with_lcms=${DEFAULT_LCMS}
|
||||
fi
|
||||
|
||||
if test "x${with_lcms}" = "xbundled"; then
|
||||
USE_EXTERNAL_LCMS=false
|
||||
AC_MSG_RESULT([bundled])
|
||||
elif test "x${with_lcms}" = "xsystem"; then
|
||||
AC_MSG_RESULT([system])
|
||||
PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
|
||||
if test "x${LCMS_FOUND}" = "xyes"; then
|
||||
USE_EXTERNAL_LCMS=true
|
||||
else
|
||||
AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LCMS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the png library
|
||||
|
@ -652,6 +652,10 @@ INSTALL_SYSCONFDIR=@sysconfdir@
|
||||
# Libraries
|
||||
#
|
||||
|
||||
USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
|
||||
LCMS_CFLAGS:=@LCMS_CFLAGS@
|
||||
LCMS_LIBS:=@LCMS_LIBS@
|
||||
|
||||
USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
|
||||
PNG_LIBS:=@PNG_LIBS@
|
||||
PNG_CFLAGS:=@PNG_CFLAGS@
|
||||
|
@ -256,3 +256,6 @@ a4bf701ac316946c2e5e83138ad8e687da6a4b30 jdk9-b06
|
||||
77ea0a2503582a28e4e66be7239a49a0d1dd313f jdk9-b11
|
||||
e212cdcc8c11f0ba5acf6f5ddb596c4c545a93f9 jdk9-b12
|
||||
088eec4c36f4d7f250fcd19c4969bf698e3d2cdc jdk9-b13
|
||||
a2b82f863ba95a596da555a4c1b871c404863e7e jdk9-b14
|
||||
e54022d0dd92106fff7f7fe670010cd7e6517ee3 jdk9-b15
|
||||
422ef9d29d84f571453f015c4cb8713c3af70ee4 jdk9-b16
|
||||
|
@ -416,3 +416,6 @@ ebc44d040cd149d2120d69fe183a3dae7840f4b4 jdk9-b10
|
||||
783309c3a1a629a452673399dcfa83ef7eca94d8 jdk9-b11
|
||||
1c383bb39e2849ca62cb763f4e182a29b421d60a jdk9-b12
|
||||
456ad9c99133803d4e1433124c85a6fd141b9ac9 jdk9-b13
|
||||
bd333491bb6c012d7b606939406d0fa9a5ac7ffd jdk9-b14
|
||||
170f6d733d7aec062f743a6b8c1cce940a7a984a jdk9-b15
|
||||
b14e7c0b7d3ec04127f565cda1d84122e205680c jdk9-b16
|
||||
|
@ -64,7 +64,11 @@ public class ciEnv extends VMObject {
|
||||
}
|
||||
|
||||
public Compile compilerData() {
|
||||
return new Compile(compilerDataField.getValue(this.getAddress()));
|
||||
Address addr = compilerDataField.getValue(this.getAddress());
|
||||
if (addr == null) {
|
||||
return null;
|
||||
}
|
||||
return new Compile(addr);
|
||||
}
|
||||
|
||||
public ciObjectFactory factory() {
|
||||
@ -94,10 +98,7 @@ public class ciEnv extends VMObject {
|
||||
Method method = task.method();
|
||||
int entryBci = task.osrBci();
|
||||
int compLevel = task.compLevel();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.print("compile " + holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
out.print("compile " + method.nameAsAscii() + " " +
|
||||
entryBci + " " + compLevel);
|
||||
Compile compiler = compilerData();
|
||||
if (compiler != null) {
|
||||
|
@ -55,4 +55,9 @@ public class ciKlass extends ciType {
|
||||
public ciKlass(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
Klass k = (Klass)getMetadata();
|
||||
k.printValueOn(tty);
|
||||
}
|
||||
}
|
||||
|
@ -90,17 +90,23 @@ public class ciMethod extends ciMetadata {
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
Method method = (Method)getMetadata();
|
||||
NMethod nm = method.getNativeMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("ciMethod " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
method.getInvocationCount() + " " +
|
||||
method.getBackedgeCount() + " " +
|
||||
interpreterInvocationCount() + " " +
|
||||
interpreterThrowoutCount() + " " +
|
||||
instructionsSize());
|
||||
Method method = (Method)getMetadata();
|
||||
NMethod nm = method.getNativeMethod();
|
||||
out.println("ciMethod " +
|
||||
nameAsAscii() + " " +
|
||||
method.getInvocationCount() + " " +
|
||||
method.getBackedgeCount() + " " +
|
||||
interpreterInvocationCount() + " " +
|
||||
interpreterThrowoutCount() + " " +
|
||||
instructionsSize());
|
||||
}
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
tty.print("ciMethod " + method().getName().asString() + method().getSignature().asString() + "@" + getAddress());
|
||||
}
|
||||
|
||||
public String nameAsAscii() {
|
||||
Method method = (Method)getMetadata();
|
||||
return method.nameAsAscii();
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
|
||||
public class ciMethodData extends ciMetadata {
|
||||
public class ciMethodData extends ciMetadata implements MethodDataInterface<ciKlass,ciMethod> {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -54,7 +54,9 @@ public class ciMethodData extends ciMetadata {
|
||||
extraDataSizeField = new CIntField(type.getCIntegerField("_extra_data_size"), 0);
|
||||
dataSizeField = new CIntField(type.getCIntegerField("_data_size"), 0);
|
||||
stateField = new CIntField(type.getCIntegerField("_state"), 0);
|
||||
sizeofMethodDataOopDesc = (int)db.lookupType("MethodData").getSize();;
|
||||
Type typeMethodData = db.lookupType("MethodData");
|
||||
sizeofMethodDataOopDesc = (int)typeMethodData.getSize();
|
||||
parametersTypeDataDi = new CIntField(typeMethodData.getCIntegerField("_parameters_type_data_di"), 0);
|
||||
}
|
||||
|
||||
private static AddressField origField;
|
||||
@ -69,11 +71,28 @@ public class ciMethodData extends ciMetadata {
|
||||
private static CIntField dataSizeField;
|
||||
private static CIntField stateField;
|
||||
private static int sizeofMethodDataOopDesc;
|
||||
private static CIntField parametersTypeDataDi;
|
||||
|
||||
public ciMethodData(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public ciKlass getKlassAtAddress(Address addr) {
|
||||
return (ciKlass)ciObjectFactory.getMetadata(addr);
|
||||
}
|
||||
|
||||
public ciMethod getMethodAtAddress(Address addr) {
|
||||
return (ciMethod)ciObjectFactory.getMetadata(addr);
|
||||
}
|
||||
|
||||
public void printKlassValueOn(ciKlass klass, PrintStream st) {
|
||||
klass.printValueOn(st);
|
||||
}
|
||||
|
||||
public void printMethodValueOn(ciMethod method, PrintStream st) {
|
||||
method.printValueOn(st);
|
||||
}
|
||||
|
||||
private byte[] fetchDataAt(Address base, long size) {
|
||||
byte[] result = new byte[(int)size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
@ -110,6 +129,10 @@ public class ciMethodData extends ciMetadata {
|
||||
return (int)dataSizeField.getValue(getAddress());
|
||||
}
|
||||
|
||||
int extraDataSize() {
|
||||
return (int)extraDataSizeField.getValue(getAddress());
|
||||
}
|
||||
|
||||
int state() {
|
||||
return (int)stateField.getValue(getAddress());
|
||||
}
|
||||
@ -122,6 +145,16 @@ public class ciMethodData extends ciMetadata {
|
||||
return dataIndex >= dataSize();
|
||||
}
|
||||
|
||||
ParametersTypeData<ciKlass,ciMethod> parametersTypeData() {
|
||||
Address base = getAddress().addOffsetTo(origField.getOffset());
|
||||
int di = (int)parametersTypeDataDi.getValue(base);
|
||||
if (di == -1) {
|
||||
return null;
|
||||
}
|
||||
DataLayout dataLayout = new DataLayout(dataField.getValue(getAddress()), di);
|
||||
return new ParametersTypeData<ciKlass,ciMethod>(this, dataLayout);
|
||||
}
|
||||
|
||||
ProfileData dataAt(int dataIndex) {
|
||||
if (outOfBounds(dataIndex)) {
|
||||
return null;
|
||||
@ -139,15 +172,21 @@ public class ciMethodData extends ciMetadata {
|
||||
case DataLayout.jumpDataTag:
|
||||
return new JumpData(dataLayout);
|
||||
case DataLayout.receiverTypeDataTag:
|
||||
return new ciReceiverTypeData(dataLayout);
|
||||
return new ReceiverTypeData<ciKlass,ciMethod>(this, dataLayout);
|
||||
case DataLayout.virtualCallDataTag:
|
||||
return new ciVirtualCallData(dataLayout);
|
||||
return new VirtualCallData<ciKlass,ciMethod>(this, dataLayout);
|
||||
case DataLayout.retDataTag:
|
||||
return new RetData(dataLayout);
|
||||
case DataLayout.branchDataTag:
|
||||
return new BranchData(dataLayout);
|
||||
case DataLayout.multiBranchDataTag:
|
||||
return new MultiBranchData(dataLayout);
|
||||
case DataLayout.callTypeDataTag:
|
||||
return new CallTypeData<ciKlass,ciMethod>(this, dataLayout);
|
||||
case DataLayout.virtualCallTypeDataTag:
|
||||
return new VirtualCallTypeData<ciKlass,ciMethod>(this, dataLayout);
|
||||
case DataLayout.parametersTypeDataTag:
|
||||
return new ParametersTypeData<ciKlass,ciMethod>(this, dataLayout);
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,7 +203,23 @@ public class ciMethodData extends ciMetadata {
|
||||
}
|
||||
boolean isValid(ProfileData current) { return current != null; }
|
||||
|
||||
DataLayout limitDataPosition() {
|
||||
return new DataLayout(dataField.getValue(getAddress()), dataSize());
|
||||
}
|
||||
DataLayout extraDataBase() {
|
||||
return limitDataPosition();
|
||||
}
|
||||
DataLayout extraDataLimit() {
|
||||
return new DataLayout(dataField.getValue(getAddress()), dataSize() + extraDataSize());
|
||||
}
|
||||
DataLayout nextExtra(DataLayout dataLayout) {
|
||||
return new DataLayout(dataField.getValue(getAddress()), dataLayout.dp() + DataLayout.computeSizeInBytes(MethodData.extraNbCells(dataLayout)));
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
if (parametersTypeData() != null) {
|
||||
parametersTypeData().printDataOn(st);
|
||||
}
|
||||
ProfileData data = firstData();
|
||||
for ( ; isValid(data); data = nextData(data)) {
|
||||
st.print(dpToDi(data.dp()));
|
||||
@ -172,16 +227,96 @@ public class ciMethodData extends ciMetadata {
|
||||
// st->fillTo(6);
|
||||
data.printDataOn(st);
|
||||
}
|
||||
st.println("--- Extra data:");
|
||||
DataLayout dp = extraDataBase();
|
||||
DataLayout end = extraDataLimit();
|
||||
for (;; dp = nextExtra(dp)) {
|
||||
switch(dp.tag()) {
|
||||
case DataLayout.noTag:
|
||||
continue;
|
||||
case DataLayout.bitDataTag:
|
||||
data = new BitData(dp);
|
||||
break;
|
||||
case DataLayout.speculativeTrapDataTag:
|
||||
data = new SpeculativeTrapData<ciKlass,ciMethod>(this, dp);
|
||||
break;
|
||||
case DataLayout.argInfoDataTag:
|
||||
data = new ArgInfoData(dp);
|
||||
dp = end; // ArgInfoData is at the end of extra data section.
|
||||
break;
|
||||
default:
|
||||
throw new InternalError("unexpected tag " + dp.tag());
|
||||
}
|
||||
st.print(dpToDi(data.dp()));
|
||||
st.print(" ");
|
||||
data.printDataOn(st);
|
||||
if (dp == end) return;
|
||||
}
|
||||
}
|
||||
|
||||
int dumpReplayDataTypeHelper(PrintStream out, int round, int count, int index, ProfileData pdata, ciKlass k) {
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((pdata.dp() + pdata.cellOffset(index)) / MethodData.cellSize) + " " + k.name());
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int dumpReplayDataReceiverTypeHelper(PrintStream out, int round, int count, ReceiverTypeData<ciKlass,ciMethod> vdata) {
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiver(i);
|
||||
count = dumpReplayDataTypeHelper(out, round, count, vdata.receiverCellIndex(i), vdata, k);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int dumpReplayDataCallTypeHelper(PrintStream out, int round, int count, CallTypeDataInterface<ciKlass> callTypeData) {
|
||||
if (callTypeData.hasArguments()) {
|
||||
for (int i = 0; i < callTypeData.numberOfArguments(); i++) {
|
||||
count = dumpReplayDataTypeHelper(out, round, count, callTypeData.argumentTypeIndex(i), (ProfileData)callTypeData, callTypeData.argumentType(i));
|
||||
}
|
||||
}
|
||||
if (callTypeData.hasReturn()) {
|
||||
count = dumpReplayDataTypeHelper(out, round, count, callTypeData.returnTypeIndex(), (ProfileData)callTypeData, callTypeData.returnType());
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int dumpReplayDataExtraDataHelper(PrintStream out, int round, int count) {
|
||||
DataLayout dp = extraDataBase();
|
||||
DataLayout end = extraDataLimit();
|
||||
|
||||
for (;dp != end; dp = nextExtra(dp)) {
|
||||
switch(dp.tag()) {
|
||||
case DataLayout.noTag:
|
||||
case DataLayout.argInfoDataTag:
|
||||
return count;
|
||||
case DataLayout.bitDataTag:
|
||||
break;
|
||||
case DataLayout.speculativeTrapDataTag: {
|
||||
SpeculativeTrapData<ciKlass,ciMethod> data = new SpeculativeTrapData<ciKlass,ciMethod>(this, dp);
|
||||
ciMethod m = data.method();
|
||||
if (m != null) {
|
||||
if (round == 0) {
|
||||
count++;
|
||||
} else {
|
||||
out.print(" " + (dpToDi(data.dp() + data.cellOffset(SpeculativeTrapData.methodIndex())) / MethodData.cellSize) + " " + m.nameAsAscii());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new InternalError("bad tag " + dp.tag());
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
MethodData mdo = (MethodData)getMetadata();
|
||||
Method method = mdo.getMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.print("ciMethodData " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
method.nameAsAscii() + " " +
|
||||
state() + " " + currentMileage());
|
||||
byte[] orig = orig();
|
||||
out.print(" orig " + orig.length);
|
||||
@ -195,30 +330,28 @@ public class ciMethodData extends ciMetadata {
|
||||
out.print(" 0x" + Long.toHexString(data[i]));
|
||||
}
|
||||
int count = 0;
|
||||
ParametersTypeData<ciKlass,ciMethod> parameters = parametersTypeData();
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" oops " + count);
|
||||
ProfileData pdata = firstData();
|
||||
for ( ; isValid(pdata); pdata = nextData(pdata)) {
|
||||
if (pdata instanceof ciReceiverTypeData) {
|
||||
ciReceiverTypeData vdata = (ciReceiverTypeData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiverAt(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((vdata.dp() + vdata.cellOffset(vdata.receiverCellIndex(i))) / MethodData.cellSize) + " " + k.name());
|
||||
}
|
||||
}
|
||||
} else if (pdata instanceof ciVirtualCallData) {
|
||||
ciVirtualCallData vdata = (ciVirtualCallData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiverAt(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((vdata.dp() + vdata.cellOffset(vdata.receiverCellIndex(i))) / MethodData.cellSize + " " + k.name()));
|
||||
}
|
||||
}
|
||||
if (pdata instanceof ReceiverTypeData) {
|
||||
count = dumpReplayDataReceiverTypeHelper(out, round, count, (ReceiverTypeData<ciKlass,ciMethod>)pdata);
|
||||
}
|
||||
if (pdata instanceof CallTypeDataInterface) {
|
||||
count = dumpReplayDataCallTypeHelper(out, round, count, (CallTypeDataInterface<ciKlass>)pdata);
|
||||
}
|
||||
}
|
||||
if (parameters != null) {
|
||||
for (int i = 0; i < parameters.numberOfParameters(); i++) {
|
||||
count = dumpReplayDataTypeHelper(out, round, count, ParametersTypeData.typeIndex(i), parameters, parameters.type(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
count = 0;
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" methods " + count);
|
||||
count = dumpReplayDataExtraDataHelper(out, round, count);
|
||||
}
|
||||
out.println();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -22,31 +22,35 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.ci;
|
||||
package sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
public class ciVirtualCallData extends VirtualCallData {
|
||||
public ciVirtualCallData(DataLayout data) {
|
||||
super(data);
|
||||
public class ArgInfoData extends ArrayData {
|
||||
|
||||
public ArgInfoData(DataLayout layout) {
|
||||
super(layout);
|
||||
}
|
||||
|
||||
public Klass receiver(int row) {
|
||||
throw new InternalError("should not call");
|
||||
int numberOfArgs() {
|
||||
return arrayLen();
|
||||
}
|
||||
|
||||
public ciKlass receiverAt(int row) {
|
||||
//assert((uint)row < rowLimit(), "oob");
|
||||
ciMetadata recv = ciObjectFactory.getMetadata(addressAt(receiverCellIndex(row)));
|
||||
if (recv != null && !(recv instanceof ciKlass)) {
|
||||
System.err.println(recv);
|
||||
int argModified(int arg) {
|
||||
return arrayUintAt(arg);
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
printShared(st, "ArgInfoData");
|
||||
int nargs = numberOfArgs();
|
||||
for (int i = 0; i < nargs; i++) {
|
||||
st.print(" 0x" + Integer.toHexString(argModified(i)));
|
||||
}
|
||||
//assert(recv == NULL || recv->isKlass(), "wrong type");
|
||||
return (ciKlass)recv;
|
||||
st.println();
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// CallTypeData
|
||||
//
|
||||
// A CallTypeData is used to access profiling information about a non
|
||||
// virtual call for which we collect type information about arguments
|
||||
// and return value.
|
||||
public class CallTypeData<K,M> extends CounterData implements CallTypeDataInterface<K> {
|
||||
final TypeStackSlotEntries<K,M> args;
|
||||
final ReturnTypeEntry<K,M> ret;
|
||||
|
||||
int cellCountGlobalOffset() {
|
||||
return CounterData.staticCellCount() + TypeEntriesAtCall.cellCountLocalOffset();
|
||||
}
|
||||
|
||||
int cellCountNoHeader() {
|
||||
return uintAt(cellCountGlobalOffset());
|
||||
}
|
||||
|
||||
public CallTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||
super(layout);
|
||||
args = new TypeStackSlotEntries<K,M>(methodData, this, CounterData.staticCellCount()+TypeEntriesAtCall.headerCellCount(), numberOfArguments());
|
||||
ret = new ReturnTypeEntry<K,M>(methodData, this, cellCount() - ReturnTypeEntry.staticCellCount());
|
||||
}
|
||||
|
||||
static int staticCellCount() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int cellCount() {
|
||||
return CounterData.staticCellCount() +
|
||||
TypeEntriesAtCall.headerCellCount() +
|
||||
intAt(cellCountGlobalOffset());
|
||||
}
|
||||
|
||||
public int numberOfArguments() {
|
||||
return cellCountNoHeader() / TypeStackSlotEntries.perArgCount();
|
||||
}
|
||||
|
||||
public boolean hasArguments() {
|
||||
return cellCountNoHeader() >= TypeStackSlotEntries.perArgCount();
|
||||
}
|
||||
|
||||
public K argumentType(int i) {
|
||||
return args.type(i);
|
||||
}
|
||||
|
||||
public boolean hasReturn() {
|
||||
return (cellCountNoHeader() % TypeStackSlotEntries.perArgCount()) != 0;
|
||||
}
|
||||
|
||||
public K returnType() {
|
||||
return ret.type();
|
||||
}
|
||||
|
||||
public int argumentTypeIndex(int i) {
|
||||
return args.typeIndex(i);
|
||||
}
|
||||
|
||||
public int returnTypeIndex() {
|
||||
return ret.typeIndex();
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
super.printDataOn(st);
|
||||
if (hasArguments()) {
|
||||
tab(st);
|
||||
st.print("argument types");
|
||||
args.printDataOn(st);
|
||||
}
|
||||
if (hasReturn()) {
|
||||
tab(st);
|
||||
st.print("return type");
|
||||
ret.printDataOn(st);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
public interface CallTypeDataInterface<K> {
|
||||
int numberOfArguments();
|
||||
boolean hasArguments();
|
||||
K argumentType(int i);
|
||||
boolean hasReturn();
|
||||
K returnType();
|
||||
int argumentTypeIndex(int i);
|
||||
int returnTypeIndex();
|
||||
}
|
@ -41,6 +41,11 @@ public class DataLayout {
|
||||
public static final int retDataTag = 6;
|
||||
public static final int branchDataTag = 7;
|
||||
public static final int multiBranchDataTag = 8;
|
||||
public static final int argInfoDataTag = 9;
|
||||
public static final int callTypeDataTag = 10;
|
||||
public static final int virtualCallTypeDataTag = 11;
|
||||
public static final int parametersTypeDataTag = 12;
|
||||
public static final int speculativeTrapDataTag = 13;
|
||||
|
||||
// The _struct._flags word is formatted as [trapState:4 | flags:4].
|
||||
// The trap state breaks down further as [recompile:1 | reason:3].
|
||||
@ -61,8 +66,6 @@ public class DataLayout {
|
||||
|
||||
private int offset;
|
||||
|
||||
private boolean handlized;
|
||||
|
||||
public DataLayout(MethodData d, int o) {
|
||||
data = d.getAddress();
|
||||
offset = o;
|
||||
@ -71,7 +74,6 @@ public class DataLayout {
|
||||
public DataLayout(Address d, int o) {
|
||||
data = d;
|
||||
offset = o;
|
||||
handlized = true;
|
||||
}
|
||||
|
||||
public int dp() { return offset; }
|
||||
@ -90,12 +92,7 @@ public class DataLayout {
|
||||
}
|
||||
|
||||
public Address addressAt(int index) {
|
||||
OopHandle handle;
|
||||
if (handlized) {
|
||||
return data.getAddressAt(offset + cellOffset(index));
|
||||
} else {
|
||||
return data.getOopHandleAt(offset + cellOffset(index));
|
||||
}
|
||||
return data.getAddressAt(offset + cellOffset(index));
|
||||
}
|
||||
|
||||
// Every data layout begins with a header. This header
|
||||
@ -128,7 +125,7 @@ public class DataLayout {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int computeSizeInBytes(int cellCount) {
|
||||
static public int computeSizeInBytes(int cellCount) {
|
||||
return headerSizeInBytes() + cellCount * MethodData.cellSize;
|
||||
}
|
||||
|
||||
|
@ -354,9 +354,7 @@ public class Method extends Metadata {
|
||||
}
|
||||
Klass holder = getMethodHolder();
|
||||
out.println("ciMethod " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(getName().asString()) + " " +
|
||||
getSignature().asString() + " " +
|
||||
nameAsAscii() + " " +
|
||||
getInvocationCount() + " " +
|
||||
getBackedgeCount() + " " +
|
||||
interpreterInvocationCount() + " " +
|
||||
@ -371,4 +369,10 @@ public class Method extends Metadata {
|
||||
public int interpreterInvocationCount() {
|
||||
return getMethodCounters().interpreterInvocationCount();
|
||||
}
|
||||
|
||||
public String nameAsAscii() {
|
||||
return getMethodHolder().getName().asString() + " " +
|
||||
OopUtilities.escapeString(getName().asString()) + " " +
|
||||
getSignature().asString();
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// A MethodData provides interpreter profiling information
|
||||
|
||||
public class MethodData extends Metadata {
|
||||
public class MethodData extends Metadata implements MethodDataInterface<Klass,Method> {
|
||||
static int TypeProfileWidth = 2;
|
||||
static int BciProfileWidth = 2;
|
||||
static int CompileThreshold;
|
||||
@ -152,6 +152,8 @@ public class MethodData extends Metadata {
|
||||
dataSize = new CIntField(type.getCIntegerField("_data_size"), 0);
|
||||
data = type.getAddressField("_data[0]");
|
||||
|
||||
parametersTypeDataDi = new CIntField(type.getCIntegerField("_parameters_type_data_di"), 0);
|
||||
|
||||
sizeofMethodDataOopDesc = (int)type.getSize();;
|
||||
|
||||
Reason_many = db.lookupIntConstant("Deoptimization::Reason_many").intValue();
|
||||
@ -191,6 +193,22 @@ public class MethodData extends Metadata {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public Klass getKlassAtAddress(Address addr) {
|
||||
return (Klass)Metadata.instantiateWrapperFor(addr);
|
||||
}
|
||||
|
||||
public Method getMethodAtAddress(Address addr) {
|
||||
return (Method)Metadata.instantiateWrapperFor(addr);
|
||||
}
|
||||
|
||||
public void printKlassValueOn(Klass klass, PrintStream st) {
|
||||
klass.printValueOn(st);
|
||||
}
|
||||
|
||||
public void printMethodValueOn(Method method, PrintStream st) {
|
||||
method.printValueOn(st);
|
||||
}
|
||||
|
||||
public boolean isMethodData() { return true; }
|
||||
|
||||
private static long baseOffset;
|
||||
@ -198,7 +216,7 @@ public class MethodData extends Metadata {
|
||||
private static MetadataField method;
|
||||
private static CIntField dataSize;
|
||||
private static AddressField data;
|
||||
|
||||
private static CIntField parametersTypeDataDi;
|
||||
public static int sizeofMethodDataOopDesc;
|
||||
public static int cellSize;
|
||||
|
||||
@ -225,6 +243,27 @@ public class MethodData extends Metadata {
|
||||
}
|
||||
}
|
||||
|
||||
int sizeInBytes() {
|
||||
if (size == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return (int)size.getValue(getAddress());
|
||||
}
|
||||
}
|
||||
|
||||
int size() {
|
||||
return (int)Oop.alignObjectSize(VM.getVM().alignUp(sizeInBytes(), VM.getVM().getBytesPerWord())/VM.getVM().getBytesPerWord());
|
||||
}
|
||||
|
||||
ParametersTypeData<Klass,Method> parametersTypeData() {
|
||||
int di = (int)parametersTypeDataDi.getValue(getAddress());
|
||||
if (di == -1) {
|
||||
return null;
|
||||
}
|
||||
DataLayout dataLayout = new DataLayout(this, di + (int)data.getOffset());
|
||||
return new ParametersTypeData<Klass,Method>(this, dataLayout);
|
||||
}
|
||||
|
||||
boolean outOfBounds(int dataIndex) {
|
||||
return dataIndex >= dataSize();
|
||||
}
|
||||
@ -246,15 +285,21 @@ public class MethodData extends Metadata {
|
||||
case DataLayout.jumpDataTag:
|
||||
return new JumpData(dataLayout);
|
||||
case DataLayout.receiverTypeDataTag:
|
||||
return new ReceiverTypeData(dataLayout);
|
||||
return new ReceiverTypeData<Klass,Method>(this, dataLayout);
|
||||
case DataLayout.virtualCallDataTag:
|
||||
return new VirtualCallData(dataLayout);
|
||||
return new VirtualCallData<Klass,Method>(this, dataLayout);
|
||||
case DataLayout.retDataTag:
|
||||
return new RetData(dataLayout);
|
||||
case DataLayout.branchDataTag:
|
||||
return new BranchData(dataLayout);
|
||||
case DataLayout.multiBranchDataTag:
|
||||
return new MultiBranchData(dataLayout);
|
||||
case DataLayout.callTypeDataTag:
|
||||
return new CallTypeData<Klass,Method>(this, dataLayout);
|
||||
case DataLayout.virtualCallTypeDataTag:
|
||||
return new VirtualCallTypeData<Klass,Method>(this, dataLayout);
|
||||
case DataLayout.parametersTypeDataTag:
|
||||
return new ParametersTypeData<Klass,Method>(this, dataLayout);
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,7 +317,42 @@ public class MethodData extends Metadata {
|
||||
}
|
||||
boolean isValid(ProfileData current) { return current != null; }
|
||||
|
||||
DataLayout limitDataPosition() {
|
||||
return new DataLayout(this, dataSize() + (int)data.getOffset());
|
||||
}
|
||||
|
||||
DataLayout extraDataBase() {
|
||||
return limitDataPosition();
|
||||
}
|
||||
|
||||
DataLayout extraDataLimit() {
|
||||
return new DataLayout(this, sizeInBytes());
|
||||
}
|
||||
|
||||
static public int extraNbCells(DataLayout dataLayout) {
|
||||
int nbCells = 0;
|
||||
switch(dataLayout.tag()) {
|
||||
case DataLayout.bitDataTag:
|
||||
case DataLayout.noTag:
|
||||
nbCells = BitData.staticCellCount();
|
||||
break;
|
||||
case DataLayout.speculativeTrapDataTag:
|
||||
nbCells = SpeculativeTrapData.staticCellCount();
|
||||
break;
|
||||
default:
|
||||
throw new InternalError("unexpected tag " + dataLayout.tag());
|
||||
}
|
||||
return nbCells;
|
||||
}
|
||||
|
||||
DataLayout nextExtra(DataLayout dataLayout) {
|
||||
return new DataLayout(this, dataLayout.dp() + DataLayout.computeSizeInBytes(extraNbCells(dataLayout)));
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
if (parametersTypeData() != null) {
|
||||
parametersTypeData().printDataOn(st);
|
||||
}
|
||||
ProfileData data = firstData();
|
||||
for ( ; isValid(data); data = nextData(data)) {
|
||||
st.print(dpToDi(data.dp()));
|
||||
@ -280,6 +360,31 @@ public class MethodData extends Metadata {
|
||||
// st->fillTo(6);
|
||||
data.printDataOn(st);
|
||||
}
|
||||
st.println("--- Extra data:");
|
||||
DataLayout dp = extraDataBase();
|
||||
DataLayout end = extraDataLimit();
|
||||
for (;; dp = nextExtra(dp)) {
|
||||
switch(dp.tag()) {
|
||||
case DataLayout.noTag:
|
||||
continue;
|
||||
case DataLayout.bitDataTag:
|
||||
data = new BitData(dp);
|
||||
break;
|
||||
case DataLayout.speculativeTrapDataTag:
|
||||
data = new SpeculativeTrapData<Klass,Method>(this, dp);
|
||||
break;
|
||||
case DataLayout.argInfoDataTag:
|
||||
data = new ArgInfoData(dp);
|
||||
dp = end; // ArgInfoData is at the end of extra data section.
|
||||
break;
|
||||
default:
|
||||
throw new InternalError("unexpected tag " + dp.tag());
|
||||
}
|
||||
st.print(dpToDi(data.dp()));
|
||||
st.print(" ");
|
||||
data.printDataOn(st);
|
||||
if (dp == end) return;
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] fetchDataAt(Address base, long offset, long size) {
|
||||
@ -332,14 +437,71 @@ public class MethodData extends Metadata {
|
||||
return 20000;
|
||||
}
|
||||
|
||||
int dumpReplayDataTypeHelper(PrintStream out, int round, int count, int index, ProfileData pdata, Klass k) {
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " +
|
||||
(dpToDi(pdata.dp() +
|
||||
pdata.cellOffset(index)) / cellSize) + " " +
|
||||
k.getName().asString());
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int dumpReplayDataReceiverTypeHelper(PrintStream out, int round, int count, ReceiverTypeData<Klass,Method> vdata) {
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
Klass k = vdata.receiver(i);
|
||||
count = dumpReplayDataTypeHelper(out, round, count, vdata.receiverCellIndex(i), vdata, k);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int dumpReplayDataCallTypeHelper(PrintStream out, int round, int count, CallTypeDataInterface<Klass> callTypeData) {
|
||||
if (callTypeData.hasArguments()) {
|
||||
for (int i = 0; i < callTypeData.numberOfArguments(); i++) {
|
||||
count = dumpReplayDataTypeHelper(out, round, count, callTypeData.argumentTypeIndex(i), (ProfileData)callTypeData, callTypeData.argumentType(i));
|
||||
}
|
||||
}
|
||||
if (callTypeData.hasReturn()) {
|
||||
count = dumpReplayDataTypeHelper(out, round, count, callTypeData.returnTypeIndex(), (ProfileData)callTypeData, callTypeData.returnType());
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int dumpReplayDataExtraDataHelper(PrintStream out, int round, int count) {
|
||||
DataLayout dp = extraDataBase();
|
||||
DataLayout end = extraDataLimit();
|
||||
|
||||
for (;dp != end; dp = nextExtra(dp)) {
|
||||
switch(dp.tag()) {
|
||||
case DataLayout.noTag:
|
||||
case DataLayout.argInfoDataTag:
|
||||
return count;
|
||||
case DataLayout.bitDataTag:
|
||||
break;
|
||||
case DataLayout.speculativeTrapDataTag: {
|
||||
SpeculativeTrapData<Klass,Method> data = new SpeculativeTrapData<Klass,Method>(this, dp);
|
||||
Method m = data.method();
|
||||
if (m != null) {
|
||||
if (round == 0) {
|
||||
count++;
|
||||
} else {
|
||||
out.print(" " + (dpToDi(data.dp() + data.cellOffset(SpeculativeTrapData.methodIndex())) / cellSize) + " " + m.nameAsAscii());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new InternalError("bad tag " + dp.tag());
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
Method method = getMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.print("ciMethodData " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
"2" + " " +
|
||||
out.print("ciMethodData " + method.nameAsAscii()
|
||||
+ " " + "2" + " " +
|
||||
currentMileage());
|
||||
byte[] orig = orig();
|
||||
out.print(" orig " + orig.length);
|
||||
@ -353,36 +515,28 @@ public class MethodData extends Metadata {
|
||||
out.print(" 0x" + Long.toHexString(data[i]));
|
||||
}
|
||||
int count = 0;
|
||||
ParametersTypeData<Klass,Method> parameters = parametersTypeData();
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" oops " + count);
|
||||
ProfileData pdata = firstData();
|
||||
for ( ; isValid(pdata); pdata = nextData(pdata)) {
|
||||
if (pdata instanceof ReceiverTypeData) {
|
||||
ReceiverTypeData vdata = (ReceiverTypeData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
Klass k = vdata.receiver(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " +
|
||||
(dpToDi(vdata.dp() +
|
||||
vdata.cellOffset(vdata.receiverCellIndex(i))) / cellSize) + " " +
|
||||
k.getName().asString());
|
||||
}
|
||||
}
|
||||
} else if (pdata instanceof VirtualCallData) {
|
||||
VirtualCallData vdata = (VirtualCallData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
Klass k = vdata.receiver(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " +
|
||||
(dpToDi(vdata.dp() +
|
||||
vdata.cellOffset(vdata.receiverCellIndex(i))) / cellSize) + " " +
|
||||
k.getName().asString());
|
||||
}
|
||||
}
|
||||
count = dumpReplayDataReceiverTypeHelper(out, round, count, (ReceiverTypeData<Klass,Method>)pdata);
|
||||
}
|
||||
if (pdata instanceof CallTypeDataInterface) {
|
||||
count = dumpReplayDataCallTypeHelper(out, round, count, (CallTypeDataInterface<Klass>)pdata);
|
||||
}
|
||||
}
|
||||
if (parameters != null) {
|
||||
for (int i = 0; i < parameters.numberOfParameters(); i++) {
|
||||
count = dumpReplayDataTypeHelper(out, round, count, ParametersTypeData.typeIndex(i), parameters, parameters.type(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
count = 0;
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" methods " + count);
|
||||
count = dumpReplayDataExtraDataHelper(out, round, count);
|
||||
}
|
||||
out.println();
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
public interface MethodDataInterface<K, M> {
|
||||
K getKlassAtAddress(Address addr);
|
||||
M getMethodAtAddress(Address addr);
|
||||
void printKlassValueOn(K klass, PrintStream st);
|
||||
void printMethodValueOn(M klass, PrintStream st);
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// ParametersTypeData
|
||||
//
|
||||
// A ParametersTypeData is used to access profiling information about
|
||||
// types of parameters to a method
|
||||
public class ParametersTypeData<K,M> extends ArrayData {
|
||||
final TypeStackSlotEntries<K,M> parameters;
|
||||
|
||||
static int stackSlotLocalOffset(int i) {
|
||||
return arrayStartOffSet + TypeStackSlotEntries.stackSlotLocalOffset(i);
|
||||
}
|
||||
|
||||
static int typeLocalOffset(int i) {
|
||||
return arrayStartOffSet + TypeStackSlotEntries.typeLocalOffset(i);
|
||||
}
|
||||
|
||||
public ParametersTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||
super(layout);
|
||||
parameters = new TypeStackSlotEntries<K,M>(methodData, this, 1, numberOfParameters());
|
||||
}
|
||||
|
||||
public int numberOfParameters() {
|
||||
return arrayLen() / TypeStackSlotEntries.perArgCount();
|
||||
}
|
||||
|
||||
int stackSlot(int i) {
|
||||
return parameters.stackSlot(i);
|
||||
}
|
||||
|
||||
public K type(int i) {
|
||||
return parameters.type(i);
|
||||
}
|
||||
|
||||
static public int typeIndex(int i) {
|
||||
return typeLocalOffset(i);
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
st.print("parameter types");
|
||||
parameters.printDataOn(st);
|
||||
}
|
||||
}
|
@ -37,13 +37,15 @@ import sun.jvm.hotspot.utilities.*;
|
||||
// dynamic type check. It consists of a counter which counts the total times
|
||||
// that the check is reached, and a series of (Klass, count) pairs
|
||||
// which are used to store a type profile for the receiver of the check.
|
||||
public class ReceiverTypeData extends CounterData {
|
||||
public class ReceiverTypeData<K,M> extends CounterData {
|
||||
static final int receiver0Offset = counterCellCount;
|
||||
static final int count0Offset = receiver0Offset + 1;
|
||||
static final int receiverTypeRowCellCount = (count0Offset + 1) - receiver0Offset;
|
||||
final MethodDataInterface<K,M> methodData;
|
||||
|
||||
public ReceiverTypeData(DataLayout layout) {
|
||||
public ReceiverTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||
super(layout);
|
||||
this.methodData = methodData;
|
||||
//assert(layout.tag() == DataLayout.receiverTypeDataTag ||
|
||||
// layout.tag() == DataLayout.virtualCallDataTag, "wrong type");
|
||||
}
|
||||
@ -73,14 +75,14 @@ public class ReceiverTypeData extends CounterData {
|
||||
// gc; it does not assert the receiver is a klass. During compaction of the
|
||||
// perm gen, the klass may already have moved, so the isKlass() predicate
|
||||
// would fail. The 'normal' version should be used whenever possible.
|
||||
Klass receiverUnchecked(int row) {
|
||||
K receiverUnchecked(int row) {
|
||||
//assert(row < rowLimit(), "oob");
|
||||
Address recv = addressAt(receiverCellIndex(row));
|
||||
return (Klass)Metadata.instantiateWrapperFor(recv);
|
||||
return methodData.getKlassAtAddress(recv);
|
||||
}
|
||||
|
||||
public Klass receiver(int row) {
|
||||
Klass recv = receiverUnchecked(row);
|
||||
public K receiver(int row) {
|
||||
K recv = receiverUnchecked(row);
|
||||
//assert(recv == NULL || ((oop)recv).isKlass(), "wrong type");
|
||||
return recv;
|
||||
}
|
||||
@ -111,7 +113,7 @@ public class ReceiverTypeData extends CounterData {
|
||||
for (row = 0; row < rowLimit(); row++) {
|
||||
if (receiver(row) != null) {
|
||||
tab(st);
|
||||
receiver(row).printValueOn(st);
|
||||
methodData.printKlassValueOn(receiver(row), st);
|
||||
st.println("(" + receiverCount(row) + ")");
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -22,32 +22,39 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.ci;
|
||||
package sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
public class ciReceiverTypeData extends ReceiverTypeData {
|
||||
public ciReceiverTypeData(DataLayout data) {
|
||||
super(data);
|
||||
// Type entry used for return from a call. A single cell to record the
|
||||
// type.
|
||||
public class ReturnTypeEntry<K,M> extends TypeEntries<K,M> {
|
||||
static final int cellCount = 1;
|
||||
|
||||
ReturnTypeEntry(MethodDataInterface<K,M> methodData, ProfileData pd, int baseOff) {
|
||||
super(methodData, pd, baseOff);
|
||||
}
|
||||
|
||||
public Klass receiver(int row) {
|
||||
throw new InternalError("should not call");
|
||||
K type() {
|
||||
return validKlass(baseOff);
|
||||
}
|
||||
|
||||
public ciKlass receiverAt(int row) {
|
||||
//assert((uint)row < rowLimit(), "oob");
|
||||
ciMetadata recv = ciObjectFactory.getMetadata(addressAt(receiverCellIndex(row)));
|
||||
if (recv != null && !(recv instanceof ciKlass)) {
|
||||
System.err.println(recv);
|
||||
}
|
||||
//assert(recv == NULL || recv->isKlass(), "wrong type");
|
||||
return (ciKlass)recv;
|
||||
static int staticCellCount() {
|
||||
return cellCount;
|
||||
}
|
||||
|
||||
int typeIndex() {
|
||||
return baseOff;
|
||||
}
|
||||
|
||||
void printDataOn(PrintStream st) {
|
||||
pd.tab(st);
|
||||
printKlass(st, baseOff);
|
||||
st.println();
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// SpeculativeTrapData
|
||||
//
|
||||
// A SpeculativeTrapData is used to record traps due to type
|
||||
// speculation. It records the root of the compilation.
|
||||
public class SpeculativeTrapData<K, M> extends ProfileData {
|
||||
static final int speculativeTrapMethod = 0;
|
||||
static final int speculativeTrapCellCount = 1;
|
||||
final MethodDataInterface<K, M> methodData;
|
||||
|
||||
public SpeculativeTrapData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||
super(layout);
|
||||
this.methodData = methodData;
|
||||
}
|
||||
|
||||
static int staticCellCount() {
|
||||
return speculativeTrapCellCount;
|
||||
}
|
||||
|
||||
public int cellCount() {
|
||||
return staticCellCount();
|
||||
}
|
||||
|
||||
public M method() {
|
||||
return methodData.getMethodAtAddress(addressAt(speculativeTrapMethod));
|
||||
}
|
||||
|
||||
static public int methodIndex() {
|
||||
return speculativeTrapMethod;
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
printShared(st, "SpeculativeTrapData");
|
||||
tab(st);
|
||||
methodData.printMethodValueOn(method(), st);
|
||||
st.println();
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// Entries in a ProfileData object to record types: it can either be
|
||||
// none (no profile), unknown (conflicting profile data) or a klass if
|
||||
// a single one is seen. Whether a null reference was seen is also
|
||||
// recorded. No counter is associated with the type and a single type
|
||||
// is tracked (unlike VirtualCallData).
|
||||
public abstract class TypeEntries<K,M> {
|
||||
static final int nullSeen = 1;
|
||||
static final int typeMask = ~nullSeen;
|
||||
static final int typeUnknown = 2;
|
||||
static final int statusBits = nullSeen | typeUnknown;
|
||||
static final int typeKlassMask = ~statusBits;
|
||||
|
||||
final ProfileData pd;
|
||||
final int baseOff;
|
||||
final MethodDataInterface<K,M> methodData;
|
||||
|
||||
boolean wasNullSeen(int index) {
|
||||
int v = pd.intptrAt(index);
|
||||
return (v & nullSeen) != 0;
|
||||
}
|
||||
|
||||
boolean isTypeUnknown(int index) {
|
||||
int v = pd.intptrAt(index);
|
||||
return (v & typeUnknown) != 0;
|
||||
}
|
||||
|
||||
boolean isTypeNone(int index) {
|
||||
int v = pd.intptrAt(index);
|
||||
return (v & typeMask) == 0;
|
||||
}
|
||||
|
||||
K validKlass(int index) {
|
||||
if (!isTypeNone(index) &&
|
||||
!isTypeUnknown(index)) {
|
||||
return methodData.getKlassAtAddress(pd.addressAt(index).andWithMask(typeKlassMask));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
void printKlass(PrintStream st, int index) {
|
||||
if (isTypeNone(index)) {
|
||||
st.print("none");
|
||||
} else if (isTypeUnknown(index)) {
|
||||
st.print("unknown");
|
||||
} else {
|
||||
methodData.printKlassValueOn(validKlass(index), st);
|
||||
}
|
||||
if (wasNullSeen(index)) {
|
||||
st.print(" (null seen)");
|
||||
}
|
||||
}
|
||||
|
||||
TypeEntries(MethodDataInterface<K,M> methodData, ProfileData pd, int baseOff) {
|
||||
this.pd = pd;
|
||||
this.baseOff = baseOff;
|
||||
this.methodData = methodData;
|
||||
}
|
||||
|
||||
long intptrAt(int index) {
|
||||
return pd.intptrAt(index);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// Entries to collect type information at a call: contains arguments
|
||||
// (TypeStackSlotEntries), a return type (ReturnTypeEntry) and a
|
||||
// number of cells.
|
||||
public abstract class TypeEntriesAtCall {
|
||||
|
||||
static int stackSlotLocalOffset(int i) {
|
||||
return headerCellCount() + TypeStackSlotEntries.stackSlotLocalOffset(i);
|
||||
}
|
||||
|
||||
static int argumentTypeLocalOffset(int i) {
|
||||
return headerCellCount() + TypeStackSlotEntries.typeLocalOffset(i);
|
||||
}
|
||||
|
||||
static int headerCellCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cellCountLocalOffset() {
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// Type entries used for arguments passed at a call and parameters on
|
||||
// method entry. 2 cells per entry: one for the type encoded as in
|
||||
// TypeEntries and one initialized with the stack slot where the
|
||||
// profiled object is to be found so that the interpreter can locate
|
||||
// it quickly.
|
||||
public class TypeStackSlotEntries<K,M> extends TypeEntries<K,M> {
|
||||
static final int stackSlotEntry = 0;
|
||||
static final int typeEntry = 1;
|
||||
static final int perArgCellCount = 2;
|
||||
|
||||
int stackSlotOffset(int i) {
|
||||
return baseOff + stackSlotLocalOffset(i);
|
||||
}
|
||||
|
||||
final int numberOfEntries;
|
||||
|
||||
int typeOffsetInCells(int i) {
|
||||
return baseOff + typeLocalOffset(i);
|
||||
}
|
||||
|
||||
TypeStackSlotEntries(MethodDataInterface<K,M> methodData, ProfileData pd, int baseOff, int nbEntries) {
|
||||
super(methodData, pd, baseOff);
|
||||
numberOfEntries = nbEntries;
|
||||
}
|
||||
|
||||
static int stackSlotLocalOffset(int i) {
|
||||
return i * perArgCellCount + stackSlotEntry;
|
||||
}
|
||||
|
||||
static int typeLocalOffset(int i) {
|
||||
return i * perArgCellCount + typeEntry;
|
||||
}
|
||||
|
||||
int stackSlot(int i) {
|
||||
return pd.uintAt(stackSlotOffset(i));
|
||||
}
|
||||
|
||||
K type(int i) {
|
||||
return validKlass(typeOffsetInCells(i));
|
||||
}
|
||||
|
||||
static int perArgCount() {
|
||||
return perArgCellCount;
|
||||
}
|
||||
|
||||
int typeIndex(int i) {
|
||||
return typeOffsetInCells(i);
|
||||
}
|
||||
|
||||
void printDataOn(PrintStream st) {
|
||||
for (int i = 0; i < numberOfEntries; i++) {
|
||||
pd.tab(st);
|
||||
st.print(i + ": stack(" + stackSlot(i)+ ") ");
|
||||
printKlass(st, typeOffsetInCells(i));
|
||||
st.println();
|
||||
}
|
||||
}
|
||||
}
|
@ -35,9 +35,9 @@ import sun.jvm.hotspot.utilities.*;
|
||||
//
|
||||
// A VirtualCallData is used to access profiling information about a
|
||||
// call. For now, it has nothing more than a ReceiverTypeData.
|
||||
public class VirtualCallData extends ReceiverTypeData {
|
||||
public VirtualCallData(DataLayout layout) {
|
||||
super(layout);
|
||||
public class VirtualCallData<K,M> extends ReceiverTypeData<K,M> {
|
||||
public VirtualCallData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||
super(methodData, layout);
|
||||
//assert(layout.tag() == DataLayout.virtualCallDataTag, "wrong type");
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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 sun.jvm.hotspot.oops;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// VirtualCallTypeData
|
||||
//
|
||||
// A VirtualCallTypeData is used to access profiling information about
|
||||
// a virtual call for which we collect type information about
|
||||
// arguments and return value.
|
||||
public class VirtualCallTypeData<K,M> extends VirtualCallData implements CallTypeDataInterface<K> {
|
||||
final TypeStackSlotEntries<K,M> args;
|
||||
final ReturnTypeEntry<K,M> ret;
|
||||
|
||||
int cellCountGlobalOffset() {
|
||||
return VirtualCallData.staticCellCount() + TypeEntriesAtCall.cellCountLocalOffset();
|
||||
}
|
||||
|
||||
int cellCountNoHeader() {
|
||||
return uintAt(cellCountGlobalOffset());
|
||||
}
|
||||
|
||||
public VirtualCallTypeData(MethodDataInterface<K,M> methodData, DataLayout layout) {
|
||||
super(methodData, layout);
|
||||
args = new TypeStackSlotEntries<K,M>(methodData, this, VirtualCallData.staticCellCount()+TypeEntriesAtCall.headerCellCount(), numberOfArguments());
|
||||
ret = new ReturnTypeEntry<K,M>(methodData, this, cellCount() - ReturnTypeEntry.staticCellCount());
|
||||
}
|
||||
|
||||
static int staticCellCount() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int cellCount() {
|
||||
return VirtualCallData.staticCellCount() +
|
||||
TypeEntriesAtCall.headerCellCount() +
|
||||
intAt(cellCountGlobalOffset());
|
||||
}
|
||||
|
||||
public int numberOfArguments() {
|
||||
return cellCountNoHeader() / TypeStackSlotEntries.perArgCount();
|
||||
}
|
||||
|
||||
public boolean hasArguments() {
|
||||
return cellCountNoHeader() >= TypeStackSlotEntries.perArgCount();
|
||||
}
|
||||
|
||||
public K argumentType(int i) {
|
||||
return args.type(i);
|
||||
}
|
||||
|
||||
public boolean hasReturn() {
|
||||
return (cellCountNoHeader() % TypeStackSlotEntries.perArgCount()) != 0;
|
||||
}
|
||||
|
||||
public K returnType() {
|
||||
return ret.type();
|
||||
}
|
||||
|
||||
public int argumentTypeIndex(int i) {
|
||||
return args.typeIndex(i);
|
||||
}
|
||||
|
||||
public int returnTypeIndex() {
|
||||
return ret.typeIndex();
|
||||
}
|
||||
|
||||
public void printDataOn(PrintStream st) {
|
||||
super.printDataOn(st);
|
||||
if (hasArguments()) {
|
||||
tab(st);
|
||||
st.print("argument types");
|
||||
args.printDataOn(st);
|
||||
}
|
||||
if (hasReturn()) {
|
||||
tab(st);
|
||||
st.print("return type");
|
||||
ret.printDataOn(st);
|
||||
}
|
||||
}
|
||||
};
|
@ -136,8 +136,6 @@ include $(MAKEFILES_DIR)/dtrace.make
|
||||
JVM = jvm
|
||||
LIBJVM = lib$(JVM).so
|
||||
|
||||
CFLAGS += -DALLOW_OPERATOR_NEW_USAGE
|
||||
|
||||
LIBJVM_DEBUGINFO = lib$(JVM).debuginfo
|
||||
LIBJVM_DIZ = lib$(JVM).diz
|
||||
|
||||
|
@ -146,9 +146,6 @@ JVM = jvm
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
LIBJVM = lib$(JVM).dylib
|
||||
CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
|
||||
ifeq (${VERSION}, $(filter ${VERSION}, debug fastdebug))
|
||||
CFLAGS += -DALLOW_OPERATOR_NEW_USAGE
|
||||
endif
|
||||
|
||||
LIBJVM_DEBUGINFO = lib$(JVM).dylib.dSYM
|
||||
LIBJVM_DIZ = lib$(JVM).diz
|
||||
|
@ -77,30 +77,40 @@ ifeq ($(INCLUDE_ALL_GCS), false)
|
||||
CXXFLAGS += -DINCLUDE_ALL_GCS=0
|
||||
CFLAGS += -DINCLUDE_ALL_GCS=0
|
||||
|
||||
Src_Files_EXCLUDE += \
|
||||
cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \
|
||||
cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp compactibleFreeListSpace.cpp \
|
||||
concurrentMarkSweepGeneration.cpp concurrentMarkSweepThread.cpp \
|
||||
freeChunk.cpp adaptiveFreeList.cpp promotionInfo.cpp vmCMSOperations.cpp \
|
||||
collectionSetChooser.cpp concurrentG1Refine.cpp concurrentG1RefineThread.cpp \
|
||||
concurrentMark.cpp concurrentMarkThread.cpp dirtyCardQueue.cpp g1AllocRegion.cpp \
|
||||
g1BlockOffsetTable.cpp g1CardCounts.cpp g1CollectedHeap.cpp g1CollectorPolicy.cpp \
|
||||
g1ErgoVerbose.cpp g1GCPhaseTimes.cpp g1HRPrinter.cpp g1HotCardCache.cpp g1Log.cpp \
|
||||
g1MMUTracker.cpp g1MarkSweep.cpp g1MemoryPool.cpp g1MonitoringSupport.cpp g1OopClosures.cpp \
|
||||
g1RemSet.cpp g1RemSetSummary.cpp g1SATBCardTableModRefBS.cpp g1StringDedup.cpp g1StringDedupStat.cpp \
|
||||
g1StringDedupTable.cpp g1StringDedupThread.cpp g1StringDedupQueue.cpp g1_globals.cpp heapRegion.cpp \
|
||||
g1BiasedArray.cpp heapRegionRemSet.cpp heapRegionSeq.cpp heapRegionSet.cpp heapRegionSets.cpp \
|
||||
ptrQueue.cpp satbQueue.cpp sparsePRT.cpp survRateGroup.cpp vm_operations_g1.cpp g1CodeCacheRemSet.cpp \
|
||||
adjoiningGenerations.cpp adjoiningVirtualSpaces.cpp asPSOldGen.cpp asPSYoungGen.cpp \
|
||||
cardTableExtension.cpp gcTaskManager.cpp gcTaskThread.cpp objectStartArray.cpp \
|
||||
parallelScavengeHeap.cpp parMarkBitMap.cpp pcTasks.cpp psAdaptiveSizePolicy.cpp \
|
||||
psCompactionManager.cpp psGCAdaptivePolicyCounters.cpp psGenerationCounters.cpp \
|
||||
psMarkSweep.cpp psMarkSweepDecorator.cpp psMemoryPool.cpp psOldGen.cpp \
|
||||
psParallelCompact.cpp psPromotionLAB.cpp psPromotionManager.cpp psScavenge.cpp \
|
||||
psTasks.cpp psVirtualspace.cpp psYoungGen.cpp vmPSOperations.cpp asParNewGeneration.cpp \
|
||||
parCardTableModRefBS.cpp parGCAllocBuffer.cpp parNewGeneration.cpp mutableSpace.cpp \
|
||||
gSpaceCounters.cpp allocationStats.cpp spaceCounters.cpp gcAdaptivePolicyCounters.cpp \
|
||||
mutableNUMASpace.cpp immutableSpace.cpp yieldingWorkGroup.cpp hSpaceCounters.cpp
|
||||
gc_impl := $(GAMMADIR)/src/share/vm/gc_implementation
|
||||
gc_exclude := \
|
||||
$(notdir $(wildcard $(gc_impl)/concurrentMarkSweep/*.cpp)) \
|
||||
$(notdir $(wildcard $(gc_impl)/g1/*.cpp)) \
|
||||
$(notdir $(wildcard $(gc_impl)/parallelScavenge/*.cpp)) \
|
||||
$(notdir $(wildcard $(gc_impl)/parNew/*.cpp))
|
||||
Src_Files_EXCLUDE += $(gc_exclude)
|
||||
|
||||
# Exclude everything in $(gc_impl)/shared except the files listed
|
||||
# in $(gc_shared_keep).
|
||||
gc_shared_all := $(notdir $(wildcard $(gc_impl)/shared/*.cpp))
|
||||
gc_shared_keep := \
|
||||
adaptiveSizePolicy.cpp \
|
||||
ageTable.cpp \
|
||||
collectorCounters.cpp \
|
||||
cSpaceCounters.cpp \
|
||||
gcPolicyCounters.cpp \
|
||||
gcStats.cpp \
|
||||
gcTimer.cpp \
|
||||
gcTrace.cpp \
|
||||
gcTraceSend.cpp \
|
||||
gcTraceTime.cpp \
|
||||
gcUtil.cpp \
|
||||
generationCounters.cpp \
|
||||
markSweep.cpp \
|
||||
objectCountEventSender.cpp \
|
||||
spaceDecorator.cpp \
|
||||
vmGCOperations.cpp
|
||||
Src_Files_EXCLUDE += $(filter-out $(gc_shared_keep),$(gc_shared_all))
|
||||
|
||||
# src/share/vm/services
|
||||
Src_Files_EXCLUDE += \
|
||||
g1MemoryPool.cpp \
|
||||
psMemoryPool.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(INCLUDE_NMT), false)
|
||||
|
@ -93,7 +93,7 @@ JRE_RELEASE_VERSION="\\\"$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)\\\""
|
||||
!if "$(HOTSPOT_RELEASE_VERSION)" != ""
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
|
||||
!else
|
||||
HOTSPOT_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\""
|
||||
HOTSPOT_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
!endif
|
||||
# Define HOTSPOT_VM_DISTRO if HOTSPOT_VM_DISTRO is set,
|
||||
# and if it is not see if we have the src/closed directory
|
||||
@ -105,9 +105,18 @@ HOTSPOT_VM_DISTRO="\\\"Java HotSpot(TM)\\\""
|
||||
!else
|
||||
HOTSPOT_VM_DISTRO="\\\"OpenJDK\\\""
|
||||
!endif
|
||||
!if "$(JDK_BUILD_NUMBER)" != ""
|
||||
JDK_BUILD_NUMBER="\\\"$(JDK_BUILD_NUMBER)\\\""
|
||||
!else
|
||||
JDK_BUILD_NUMBER="\\\"00\\\""
|
||||
!endif
|
||||
!endif
|
||||
|
||||
ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)
|
||||
JDK_MAJOR_VERSION="\\\"$(JDK_MAJOR_VER)\\\""
|
||||
JDK_MINOR_VERSION="\\\"$(JDK_MINOR_VER)\\\""
|
||||
JDK_MICRO_VERSION="\\\"$(JDK_MICRO_VER)\\\""
|
||||
|
||||
ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) -define JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) -define JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) -define JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER)
|
||||
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
|
||||
|
||||
$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
|
||||
|
@ -41,7 +41,6 @@ define_pd_global(bool, UseOnStackReplacement, true);
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 140000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 140);
|
||||
define_pd_global(intx, ConditionalMoveLimit, 3);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -149,7 +149,7 @@ void VM_Version::initialize() {
|
||||
}
|
||||
|
||||
void VM_Version::print_features() {
|
||||
tty->print_cr("Version: %s cache_line_size = %d", cpu_features(), get_cache_line_size());
|
||||
tty->print_cr("Version: %s cache_line_size = %d", cpu_features(), (int) get_cache_line_size());
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
|
@ -414,6 +414,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
|
||||
|
||||
void DeoptimizeStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
__ set(_trap_request, G4);
|
||||
__ call(Runtime1::entry_for(Runtime1::deoptimize_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
ce->add_call_info_here(_info);
|
||||
|
@ -1221,10 +1221,8 @@ void LIRGenerator::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
|
||||
bool is_obj = (type == T_ARRAY || type == T_OBJECT);
|
||||
LIR_Opr offset = off.result();
|
||||
|
||||
if (data != dst) {
|
||||
__ move(data, dst);
|
||||
data = dst;
|
||||
}
|
||||
// Because we want a 2-arg form of xchg
|
||||
__ move(data, dst);
|
||||
|
||||
assert (!x->is_add() && (type == T_INT || (is_obj LP64_ONLY(&& UseCompressedOops))), "unexpected type");
|
||||
LIR_Address* addr;
|
||||
@ -1254,7 +1252,7 @@ void LIRGenerator::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
|
||||
pre_barrier(ptr, LIR_OprFact::illegalOpr /* pre_val */,
|
||||
true /* do_load */, false /* patch */, NULL);
|
||||
}
|
||||
__ xchg(LIR_OprFact::address(addr), data, dst, tmp);
|
||||
__ xchg(LIR_OprFact::address(addr), dst, dst, tmp);
|
||||
if (is_obj) {
|
||||
// Seems to be a precise address
|
||||
post_barrier(ptr, data);
|
||||
|
@ -781,7 +781,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
{
|
||||
__ set_info("deoptimize", dont_gc_arguments);
|
||||
OopMap* oop_map = save_live_registers(sasm);
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, deoptimize));
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, deoptimize), G4);
|
||||
oop_maps = new OopMapSet();
|
||||
oop_maps->add_gc_map(call_offset, oop_map);
|
||||
restore_live_registers(sasm);
|
||||
|
@ -40,7 +40,6 @@ define_pd_global(bool, ProfileTraps, false);
|
||||
define_pd_global(bool, UseOnStackReplacement, true );
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 1000 ); // Design center runs on 1.3.1
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 1400 );
|
||||
define_pd_global(bool, UseTLAB, true );
|
||||
|
@ -44,7 +44,6 @@ define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 140000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 140);
|
||||
define_pd_global(intx, ConditionalMoveLimit, 4);
|
||||
|
@ -184,7 +184,7 @@ static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value)
|
||||
assert(MinObjAlignmentInBytes >= BytesPerLong, "need alternate implementation");
|
||||
|
||||
if (value == 0 && UseBlockZeroing &&
|
||||
(count > (BlockZeroingLowLimit >> LogHeapWordSize))) {
|
||||
(count > (size_t)(BlockZeroingLowLimit >> LogHeapWordSize))) {
|
||||
// Call it only when block zeroing is used
|
||||
((_zero_Fn)StubRoutines::zero_aligned_words())(tohw, count);
|
||||
} else {
|
||||
|
@ -3653,9 +3653,9 @@ class StubGenerator: public StubCodeGenerator {
|
||||
const Register len_reg = I4; // cipher length
|
||||
const Register keylen = I5; // reg for storing expanded key array length
|
||||
|
||||
// save cipher len before save_frame, to return in the end
|
||||
__ mov(O4, L0);
|
||||
__ save_frame(0);
|
||||
// save cipher len to return in the end
|
||||
__ mov(len_reg, L0);
|
||||
|
||||
// read expanded key length
|
||||
__ ldsw(Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)), keylen, 0);
|
||||
@ -3778,9 +3778,9 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// re-init intial vector for next block, 8-byte alignment is guaranteed
|
||||
__ stf(FloatRegisterImpl::D, F60, rvec, 0);
|
||||
__ stf(FloatRegisterImpl::D, F62, rvec, 8);
|
||||
__ restore();
|
||||
__ retl();
|
||||
__ delayed()->mov(L0, O0);
|
||||
__ mov(L0, I0);
|
||||
__ ret();
|
||||
__ delayed()->restore();
|
||||
|
||||
__ align(OptoLoopAlignment);
|
||||
__ BIND(L_cbcenc192);
|
||||
@ -3869,9 +3869,9 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// re-init intial vector for next block, 8-byte alignment is guaranteed
|
||||
__ stf(FloatRegisterImpl::D, F60, rvec, 0);
|
||||
__ stf(FloatRegisterImpl::D, F62, rvec, 8);
|
||||
__ restore();
|
||||
__ retl();
|
||||
__ delayed()->mov(L0, O0);
|
||||
__ mov(L0, I0);
|
||||
__ ret();
|
||||
__ delayed()->restore();
|
||||
|
||||
__ align(OptoLoopAlignment);
|
||||
__ BIND(L_cbcenc256);
|
||||
@ -3962,9 +3962,9 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// re-init intial vector for next block, 8-byte alignment is guaranteed
|
||||
__ stf(FloatRegisterImpl::D, F60, rvec, 0);
|
||||
__ stf(FloatRegisterImpl::D, F62, rvec, 8);
|
||||
__ restore();
|
||||
__ retl();
|
||||
__ delayed()->mov(L0, O0);
|
||||
__ mov(L0, I0);
|
||||
__ ret();
|
||||
__ delayed()->restore();
|
||||
|
||||
return start;
|
||||
}
|
||||
@ -3992,9 +3992,9 @@ class StubGenerator: public StubCodeGenerator {
|
||||
const Register original_key = I5; // original key array only required during decryption
|
||||
const Register keylen = L6; // reg for storing expanded key array length
|
||||
|
||||
// save cipher len before save_frame, to return in the end
|
||||
__ mov(O4, L0);
|
||||
__ save_frame(0); //args are read from I* registers since we save the frame in the beginning
|
||||
// save cipher len to return in the end
|
||||
__ mov(len_reg, L7);
|
||||
|
||||
// load original key from SunJCE expanded decryption key
|
||||
// Since we load original key buffer starting first element, 8-byte alignment is guaranteed
|
||||
@ -4568,10 +4568,9 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// re-init intial vector for next block, 8-byte alignment is guaranteed
|
||||
__ stx(L0, rvec, 0);
|
||||
__ stx(L1, rvec, 8);
|
||||
__ restore();
|
||||
__ mov(L0, O0);
|
||||
__ retl();
|
||||
__ delayed()->nop();
|
||||
__ mov(L7, I0);
|
||||
__ ret();
|
||||
__ delayed()->restore();
|
||||
|
||||
return start;
|
||||
}
|
||||
|
@ -318,22 +318,22 @@ void VM_Version::initialize() {
|
||||
tty->print("BIS");
|
||||
}
|
||||
if (AllocatePrefetchLines > 1) {
|
||||
tty->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize);
|
||||
tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
|
||||
} else {
|
||||
tty->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize);
|
||||
tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
|
||||
}
|
||||
}
|
||||
if (PrefetchCopyIntervalInBytes > 0) {
|
||||
tty->print_cr("PrefetchCopyIntervalInBytes %d", PrefetchCopyIntervalInBytes);
|
||||
tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
|
||||
}
|
||||
if (PrefetchScanIntervalInBytes > 0) {
|
||||
tty->print_cr("PrefetchScanIntervalInBytes %d", PrefetchScanIntervalInBytes);
|
||||
tty->print_cr("PrefetchScanIntervalInBytes %d", (int) PrefetchScanIntervalInBytes);
|
||||
}
|
||||
if (PrefetchFieldsAhead > 0) {
|
||||
tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead);
|
||||
tty->print_cr("PrefetchFieldsAhead %d", (int) PrefetchFieldsAhead);
|
||||
}
|
||||
if (ContendedPaddingWidth > 0) {
|
||||
tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth);
|
||||
tty->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth);
|
||||
}
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -522,11 +522,11 @@ address Assembler::locate_operand(address inst, WhichOperand which) {
|
||||
// these asserts are somewhat nonsensical
|
||||
#ifndef _LP64
|
||||
assert(which == imm_operand || which == disp32_operand,
|
||||
err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip));
|
||||
err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, p2i(ip)));
|
||||
#else
|
||||
assert((which == call32_operand || which == imm_operand) && is_64bit ||
|
||||
which == narrow_oop_operand && !is_64bit,
|
||||
err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, ip));
|
||||
err_msg("which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, p2i(ip)));
|
||||
#endif // _LP64
|
||||
return ip;
|
||||
|
||||
|
@ -430,6 +430,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
|
||||
|
||||
void DeoptimizeStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
ce->store_parameter(_trap_request, 0);
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::deoptimize_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
DEBUG_ONLY(__ should_not_reach_here());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -95,7 +95,7 @@ void LinearScan::allocate_fpu_stack() {
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (TraceFPURegisterUsage) {
|
||||
tty->print("FPU regs for block %d, LIR instr %d): ", b->block_id(), id); regs.print_on(tty); tty->print_cr("");
|
||||
tty->print("FPU regs for block %d, LIR instr %d): ", b->block_id(), id); regs.print_on(tty); tty->cr();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1468,9 +1468,10 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
case deoptimize_id:
|
||||
{
|
||||
StubFrame f(sasm, "deoptimize", dont_gc_arguments);
|
||||
const int num_rt_args = 1; // thread
|
||||
const int num_rt_args = 2; // thread, trap_request
|
||||
OopMap* oop_map = save_live_registers(sasm, num_rt_args);
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, deoptimize));
|
||||
f.load_argument(0, rax);
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, deoptimize), rax);
|
||||
oop_maps = new OopMapSet();
|
||||
oop_maps->add_gc_map(call_offset, oop_map);
|
||||
restore_live_registers(sasm);
|
||||
|
@ -41,7 +41,6 @@ define_pd_global(bool, ProfileTraps, false);
|
||||
define_pd_global(bool, UseOnStackReplacement, true );
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 1500 );
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 933 );
|
||||
define_pd_global(intx, FreqInlineSize, 325 );
|
||||
|
@ -45,7 +45,6 @@ define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 140);
|
||||
define_pd_global(intx, ConditionalMoveLimit, 3);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -122,7 +122,7 @@ void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry)
|
||||
if (TraceICs) {
|
||||
ResourceMark rm;
|
||||
tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
|
||||
instruction_address(),
|
||||
p2i(instruction_address()),
|
||||
callee->name_and_sig_as_C_string());
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -48,6 +48,7 @@ void RegisterMap::check_location_valid() {
|
||||
}
|
||||
#endif
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
// Profiling/safepoint support
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -51,6 +51,7 @@
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
#ifdef _WIN64
|
||||
address AbstractInterpreterGenerator::generate_slow_signature_handler() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -55,6 +55,7 @@
|
||||
|
||||
#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
#ifdef ASSERT
|
||||
bool AbstractAssembler::pd_check_instruction_mark() { return true; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -29,6 +29,8 @@
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
#ifdef PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -35,6 +35,8 @@
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
#endif
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
void NativeInstruction::wrote(int offset) {
|
||||
ICache::invalidate_word(addr_at(offset));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -925,16 +925,16 @@ void VM_Version::get_processor_features() {
|
||||
if (PrintMiscellaneous && Verbose) {
|
||||
tty->print_cr("Logical CPUs per core: %u",
|
||||
logical_processors_per_package());
|
||||
tty->print("UseSSE=%d",UseSSE);
|
||||
tty->print("UseSSE=%d", (int) UseSSE);
|
||||
if (UseAVX > 0) {
|
||||
tty->print(" UseAVX=%d",UseAVX);
|
||||
tty->print(" UseAVX=%d", (int) UseAVX);
|
||||
}
|
||||
if (UseAES) {
|
||||
tty->print(" UseAES=1");
|
||||
}
|
||||
#ifdef COMPILER2
|
||||
if (MaxVectorSize > 0) {
|
||||
tty->print(" MaxVectorSize=%d", MaxVectorSize);
|
||||
tty->print(" MaxVectorSize=%d", (int) MaxVectorSize);
|
||||
}
|
||||
#endif
|
||||
tty->cr();
|
||||
@ -957,23 +957,23 @@ void VM_Version::get_processor_features() {
|
||||
}
|
||||
}
|
||||
if (AllocatePrefetchLines > 1) {
|
||||
tty->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize);
|
||||
tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
|
||||
} else {
|
||||
tty->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize);
|
||||
tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
|
||||
}
|
||||
}
|
||||
|
||||
if (PrefetchCopyIntervalInBytes > 0) {
|
||||
tty->print_cr("PrefetchCopyIntervalInBytes %d", PrefetchCopyIntervalInBytes);
|
||||
tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
|
||||
}
|
||||
if (PrefetchScanIntervalInBytes > 0) {
|
||||
tty->print_cr("PrefetchScanIntervalInBytes %d", PrefetchScanIntervalInBytes);
|
||||
tty->print_cr("PrefetchScanIntervalInBytes %d", (int) PrefetchScanIntervalInBytes);
|
||||
}
|
||||
if (PrefetchFieldsAhead > 0) {
|
||||
tty->print_cr("PrefetchFieldsAhead %d", PrefetchFieldsAhead);
|
||||
tty->print_cr("PrefetchFieldsAhead %d", (int) PrefetchFieldsAhead);
|
||||
}
|
||||
if (ContendedPaddingWidth > 0) {
|
||||
tty->print_cr("ContendedPaddingWidth %d", ContendedPaddingWidth);
|
||||
tty->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth);
|
||||
}
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -118,7 +118,7 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
|
||||
|
||||
if (PrintMiscellaneous && (WizardMode || Verbose)) {
|
||||
tty->print_cr("vtable #%d at "PTR_FORMAT"[%d] left over: %d",
|
||||
vtable_index, s->entry_point(),
|
||||
vtable_index, p2i(s->entry_point()),
|
||||
(int)(s->code_end() - s->entry_point()),
|
||||
(int)(s->code_end() - __ pc()));
|
||||
}
|
||||
@ -199,7 +199,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
|
||||
|
||||
if (PrintMiscellaneous && (WizardMode || Verbose)) {
|
||||
tty->print_cr("itable #%d at "PTR_FORMAT"[%d] left over: %d",
|
||||
itable_index, s->entry_point(),
|
||||
itable_index, p2i(s->entry_point()),
|
||||
(int)(s->code_end() - s->entry_point()),
|
||||
(int)(s->code_end() - __ pc()));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -35,6 +35,8 @@
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
// machine-dependent part of VtableStubs: create VtableStub of correct size and
|
||||
// initialize its code
|
||||
|
||||
|
@ -43,7 +43,6 @@ define_pd_global(intx, Tier2CompileThreshold, 1500);
|
||||
define_pd_global(intx, Tier3CompileThreshold, 2500);
|
||||
define_pd_global(intx, Tier4CompileThreshold, 4500);
|
||||
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
|
||||
|
@ -1871,7 +1871,7 @@ public:
|
||||
// properties.
|
||||
|
||||
// ShmBkBlock: base class for all blocks in the shared memory bookkeeping
|
||||
class ShmBkBlock {
|
||||
class ShmBkBlock : public CHeapObj<mtInternal> {
|
||||
|
||||
ShmBkBlock* _next;
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "asm/assembler.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "loadlib_aix.hpp"
|
||||
#include "porting_aix.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
@ -67,7 +68,7 @@ inline char* align_ptr_up(char* ptr, intptr_t alignment) {
|
||||
// a primitive string map. Should this turn out to be a performance
|
||||
// problem, a better hashmap has to be used.
|
||||
class fixed_strings {
|
||||
struct node {
|
||||
struct node : public CHeapObj<mtInternal> {
|
||||
char* v;
|
||||
node* next;
|
||||
};
|
||||
|
@ -26,12 +26,9 @@
|
||||
#ifndef OS_AIX_VM_THREAD_AIX_INLINE_HPP
|
||||
#define OS_AIX_VM_THREAD_AIX_INLINE_HPP
|
||||
|
||||
#include "runtime/prefetch.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadLocalStorage.hpp"
|
||||
|
||||
#include "prefetch_aix_ppc.inline.hpp"
|
||||
|
||||
// Contains inlined functions for class Thread and ThreadLocalStorage
|
||||
|
||||
inline void ThreadLocalStorage::pd_invalidate_all() {} // nothing to do
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -53,7 +53,7 @@ bool MachODecoder::decode(address addr, char *buf,
|
||||
struct symtab_command * symt = (struct symtab_command *)
|
||||
mach_find_command((struct mach_header_64 *)mach_base, LC_SYMTAB);
|
||||
if (symt == NULL) {
|
||||
DEBUG_ONLY(tty->print_cr("no symtab in mach file at 0x%lx", mach_base));
|
||||
DEBUG_ONLY(tty->print_cr("no symtab in mach file at 0x%lx", p2i(mach_base)));
|
||||
return false;
|
||||
}
|
||||
uint32_t off = symt->symoff; /* symbol table offset (within this mach file) */
|
||||
|
@ -124,6 +124,9 @@
|
||||
#define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)
|
||||
|
||||
#define LARGEPAGES_BIT (1 << 6)
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// global variables
|
||||
julong os::Bsd::_physical_memory = 0;
|
||||
@ -2394,7 +2397,6 @@ char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr,
|
||||
(!FLAG_IS_DEFAULT(UseLargePages) ||
|
||||
!FLAG_IS_DEFAULT(LargePageSizeInBytes)
|
||||
);
|
||||
char msg[128];
|
||||
|
||||
// Create a large shared memory region to attach to based on size.
|
||||
// Currently, size is the total size of the heap
|
||||
@ -2415,8 +2417,7 @@ char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr,
|
||||
// coalesce into large pages. Try to reserve large pages when
|
||||
// the system is still "fresh".
|
||||
if (warn_on_failure) {
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to reserve shared memory (errno = %d).", errno);
|
||||
warning(msg);
|
||||
warning("Failed to reserve shared memory (errno = %d).", errno);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -2433,8 +2434,7 @@ char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr,
|
||||
|
||||
if ((intptr_t)addr == -1) {
|
||||
if (warn_on_failure) {
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to attach shared memory (errno = %d).", err);
|
||||
warning(msg);
|
||||
warning("Failed to attach shared memory (errno = %d).", err);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -3810,6 +3810,7 @@ bool os::check_heap(bool force) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ATTRIBUTE_PRINTF(3, 0)
|
||||
int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
|
||||
return ::vsnprintf(buf, count, format, args);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 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
|
||||
@ -925,7 +925,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
|
||||
|
||||
if (PerfTraceMemOps) {
|
||||
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
|
||||
INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress);
|
||||
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,12 +31,6 @@
|
||||
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadLocalStorage.hpp"
|
||||
#ifdef TARGET_OS_ARCH_bsd_x86
|
||||
# include "prefetch_bsd_x86.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_bsd_zero
|
||||
# include "prefetch_bsd_zero.inline.hpp"
|
||||
#endif
|
||||
|
||||
// Contains inlined functions for class Thread and ThreadLocalStorage
|
||||
|
||||
|
@ -102,6 +102,8 @@
|
||||
# include <inttypes.h>
|
||||
# include <sys/ioctl.h>
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
// if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling
|
||||
// getrusage() is prepared to handle the associated failure.
|
||||
#ifndef RUSAGE_THREAD
|
||||
@ -2138,7 +2140,7 @@ void os::print_os_info(outputStream* st) {
|
||||
// Print warning if unsafe chroot environment detected
|
||||
if (unsafe_chroot_detected) {
|
||||
st->print("WARNING!! ");
|
||||
st->print_cr(unstable_chroot_error);
|
||||
st->print_cr("%s", unstable_chroot_error);
|
||||
}
|
||||
|
||||
os::Linux::print_libversion_info(st);
|
||||
@ -2199,8 +2201,8 @@ void os::Linux::print_distro_info(outputStream* st) {
|
||||
void os::Linux::print_libversion_info(outputStream* st) {
|
||||
// libc, pthread
|
||||
st->print("libc:");
|
||||
st->print(os::Linux::glibc_version()); st->print(" ");
|
||||
st->print(os::Linux::libpthread_version()); st->print(" ");
|
||||
st->print("%s ", os::Linux::glibc_version());
|
||||
st->print("%s ", os::Linux::libpthread_version());
|
||||
if (os::Linux::is_LinuxThreads()) {
|
||||
st->print("(%s stack)", os::Linux::is_floating_stack() ? "floating" : "fixed");
|
||||
}
|
||||
@ -3417,7 +3419,7 @@ char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment, char
|
||||
// the system is still "fresh".
|
||||
if (warn_on_failure) {
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to reserve shared memory (errno = %d).", errno);
|
||||
warning(msg);
|
||||
warning("%s", msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -3435,7 +3437,7 @@ char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment, char
|
||||
if ((intptr_t)addr == -1) {
|
||||
if (warn_on_failure) {
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to attach shared memory (errno = %d).", err);
|
||||
warning(msg);
|
||||
warning("%s", msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -3455,7 +3457,7 @@ static void warn_on_large_pages_failure(char* req_addr, size_t bytes, int error)
|
||||
char msg[128];
|
||||
jio_snprintf(msg, sizeof(msg), "Failed to reserve large pages memory req_addr: "
|
||||
PTR_FORMAT " bytes: " SIZE_FORMAT " (errno = %d).", req_addr, bytes, error);
|
||||
warning(msg);
|
||||
warning("%s", msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -931,7 +931,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
|
||||
|
||||
if (PerfTraceMemOps) {
|
||||
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
|
||||
INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress);
|
||||
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,24 +29,8 @@
|
||||
#error "This file should only be included from thread.inline.hpp"
|
||||
#endif
|
||||
|
||||
#include "runtime/prefetch.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadLocalStorage.hpp"
|
||||
#ifdef TARGET_OS_ARCH_linux_x86
|
||||
# include "prefetch_linux_x86.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_sparc
|
||||
# include "prefetch_linux_sparc.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_zero
|
||||
# include "prefetch_linux_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_arm
|
||||
# include "prefetch_linux_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_linux_ppc
|
||||
# include "prefetch_linux_ppc.inline.hpp"
|
||||
#endif
|
||||
|
||||
// Contains inlined functions for class Thread and ThreadLocalStorage
|
||||
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
// Todo: provide a os::get_max_process_id() or similar. Number of processes
|
||||
// may have been configured, can be read more accurately from proc fs etc.
|
||||
#ifndef MAX_PID
|
||||
@ -192,10 +194,10 @@ void os::Posix::print_uname_info(outputStream* st) {
|
||||
st->print("uname:");
|
||||
struct utsname name;
|
||||
uname(&name);
|
||||
st->print(name.sysname); st->print(" ");
|
||||
st->print(name.release); st->print(" ");
|
||||
st->print(name.version); st->print(" ");
|
||||
st->print(name.machine);
|
||||
st->print("%s ", name.sysname);
|
||||
st->print("%s ", name.release);
|
||||
st->print("%s ", name.version);
|
||||
st->print("%s", name.machine);
|
||||
st->cr();
|
||||
}
|
||||
|
||||
@ -682,7 +684,7 @@ const char* os::Posix::describe_signal_set_short(const sigset_t* set, char* buff
|
||||
void os::Posix::print_signal_set_short(outputStream* st, const sigset_t* set) {
|
||||
char buf[NUM_IMPORTANT_SIGS + 1];
|
||||
os::Posix::describe_signal_set_short(set, buf, sizeof(buf));
|
||||
st->print(buf);
|
||||
st->print("%s", buf);
|
||||
}
|
||||
|
||||
// Writes one-line description of a combination of sigaction.sa_flags into a user
|
||||
@ -742,7 +744,7 @@ const char* os::Posix::describe_sa_flags(int flags, char* buffer, size_t size) {
|
||||
void os::Posix::print_sa_flags(outputStream* st, int flags) {
|
||||
char buffer[0x100];
|
||||
os::Posix::describe_sa_flags(flags, buffer, sizeof(buffer));
|
||||
st->print(buffer);
|
||||
st->print("%s", buffer);
|
||||
}
|
||||
|
||||
// Helper function for os::Posix::print_siginfo_...():
|
||||
|
@ -30,15 +30,8 @@
|
||||
#endif
|
||||
|
||||
#include "runtime/atomic.inline.hpp"
|
||||
#include "runtime/prefetch.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadLocalStorage.hpp"
|
||||
#ifdef TARGET_OS_ARCH_solaris_x86
|
||||
# include "prefetch_solaris_x86.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_OS_ARCH_solaris_sparc
|
||||
# include "prefetch_solaris_sparc.inline.hpp"
|
||||
#endif
|
||||
|
||||
// Thread::current is "hot" it's called > 128K times in the 1st 500 msecs of
|
||||
// startup.
|
||||
|
@ -5005,7 +5005,11 @@ bool os::check_heap(bool force) {
|
||||
// wrong; at these points, eax contains the address of the offending block (I think).
|
||||
// To get to the exlicit error message(s) below, just continue twice.
|
||||
HANDLE heap = GetProcessHeap();
|
||||
{ HeapLock(heap);
|
||||
|
||||
// If we fail to lock the heap, then gflags.exe has been used
|
||||
// or some other special heap flag has been set that prevents
|
||||
// locking. We don't try to walk a heap we can't lock.
|
||||
if (HeapLock(heap) != 0) {
|
||||
PROCESS_HEAP_ENTRY phe;
|
||||
phe.lpData = NULL;
|
||||
while (HeapWalk(heap, &phe) != 0) {
|
||||
|
@ -29,12 +29,8 @@
|
||||
#error "This file should only be included from thread.inline.hpp"
|
||||
#endif
|
||||
|
||||
#include "runtime/prefetch.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadLocalStorage.hpp"
|
||||
#ifdef TARGET_OS_ARCH_windows_x86
|
||||
# include "prefetch_windows_x86.inline.hpp"
|
||||
#endif
|
||||
|
||||
// Contains inlined functions for class Thread and ThreadLocalStorage
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -276,6 +276,8 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
address os::current_stack_pointer() {
|
||||
#if defined(__clang__) || defined(__llvm__)
|
||||
register void *esp;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -89,6 +89,8 @@
|
||||
#define SPELL_REG_FP "ebp"
|
||||
#endif // AMD64
|
||||
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
address os::current_stack_pointer() {
|
||||
#ifdef SPARC_WORKS
|
||||
register void *esp;
|
||||
|
@ -231,6 +231,9 @@ public class CallSite {
|
||||
// identical call sites with the same method name/bci are
|
||||
// possible so we have to try them all until we find the late
|
||||
// inline call site that has a matching inline id.
|
||||
if (calls == null) {
|
||||
return null;
|
||||
}
|
||||
CallSite site = sites.pop();
|
||||
for (CallSite c : calls) {
|
||||
if (c.matches(site)) {
|
||||
@ -250,6 +253,27 @@ public class CallSite {
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayDeque<CallSite> findCallSite2(CallSite site) {
|
||||
if (calls == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (CallSite c : calls) {
|
||||
if (c.matches(site)) {
|
||||
ArrayDeque<CallSite> stack = new ArrayDeque<CallSite>();
|
||||
stack.push(c);
|
||||
return stack;
|
||||
} else {
|
||||
ArrayDeque<CallSite> stack = c.findCallSite2(site);
|
||||
if (stack != null) {
|
||||
stack.push(c);
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public long getInlineId() {
|
||||
return inlineId;
|
||||
}
|
||||
|
@ -49,6 +49,12 @@ public class Compilation implements LogEvent {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
void reset() {
|
||||
call = new CallSite();
|
||||
lateInlineCall = new CallSite();
|
||||
phases = new ArrayList<Phase>(4);
|
||||
}
|
||||
|
||||
Phase getPhase(String s) {
|
||||
for (Phase p : getPhases()) {
|
||||
if (p.getName().equals(s)) {
|
||||
@ -212,10 +218,6 @@ public class Compilation implements LogEvent {
|
||||
return phases;
|
||||
}
|
||||
|
||||
public void setPhases(ArrayList<Phase> phases) {
|
||||
this.setPhases(phases);
|
||||
}
|
||||
|
||||
public String getFailureReason() {
|
||||
return failureReason;
|
||||
}
|
||||
@ -240,10 +242,6 @@ public class Compilation implements LogEvent {
|
||||
return call;
|
||||
}
|
||||
|
||||
public void setCall(CallSite call) {
|
||||
this.call = call;
|
||||
}
|
||||
|
||||
public CallSite getLateInlineCall() {
|
||||
return lateInlineCall;
|
||||
}
|
||||
|
@ -395,6 +395,7 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||
compile.setEnd(Double.parseDouble(search(atts, "stamp")));
|
||||
if (Integer.parseInt(search(atts, "success")) == 0) {
|
||||
compile.setFailureReason(failureReason);
|
||||
failureReason = null;
|
||||
}
|
||||
} else if (qname.equals("make_not_entrant")) {
|
||||
String id = makeId(atts);
|
||||
@ -451,6 +452,12 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||
nmethods.put(id, nm);
|
||||
events.add(nm);
|
||||
} else if (qname.equals("parse")) {
|
||||
if (failureReason != null && scopes.size() == 0 && !lateInlining) {
|
||||
failureReason = null;
|
||||
compile.reset();
|
||||
site = compile.getCall();
|
||||
}
|
||||
|
||||
if (methodHandleSite != null) {
|
||||
throw new InternalError("method handle site should have been replaced");
|
||||
}
|
||||
@ -529,6 +536,18 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
||||
|
||||
site = compile.getCall().findCallSite(thisCallScopes);
|
||||
if (site == null) {
|
||||
System.out.println("call scopes:");
|
||||
for (CallSite c : thisCallScopes) {
|
||||
System.out.println(c.getMethod() + " " + c.getBci() + " " + c.getInlineId());
|
||||
}
|
||||
CallSite c = thisCallScopes.getLast();
|
||||
if (c.getInlineId() != 0) {
|
||||
System.out.println("Looking for call site in entire tree:");
|
||||
ArrayDeque<CallSite> stack = compile.getCall().findCallSite2(c);
|
||||
for (CallSite c2 : stack) {
|
||||
System.out.println(c2.getMethod() + " " + c2.getBci() + " " + c2.getInlineId());
|
||||
}
|
||||
}
|
||||
System.out.println(caller.getMethod() + " bci: " + bci);
|
||||
throw new InternalError("couldn't find call site");
|
||||
}
|
||||
|
@ -30,12 +30,13 @@
|
||||
//
|
||||
|
||||
// standard library constants
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include <iostream>
|
||||
#include "string.h"
|
||||
#include "ctype.h"
|
||||
#include "stdarg.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Make sure that we have the intptr_t and uintptr_t definitions */
|
||||
|
@ -64,8 +64,6 @@ class PeepMatch;
|
||||
class PeepConstraint;
|
||||
class PeepReplace;
|
||||
|
||||
// class ostream; // ostream is a typedef in some systems
|
||||
|
||||
extern char *toUpper(const char *str);
|
||||
|
||||
//---------------------------ADLParser-----------------------------------------
|
||||
|
@ -25,8 +25,6 @@
|
||||
// FILEBUFF.CPP - Routines for handling a parser file buffer
|
||||
#include "adlc.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//------------------------------FileBuff---------------------------------------
|
||||
// Create a new parsing buffer
|
||||
FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) {
|
||||
|
@ -26,9 +26,6 @@
|
||||
#define SHARE_VM_ADLC_FILEBUFF_HPP
|
||||
|
||||
// FILEBUFF.HPP - Definitions for parser file buffering routines
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
// STRUCTURE FOR HANDLING INPUT AND OUTPUT FILES
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 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
|
||||
@ -1322,7 +1322,7 @@ void InstructForm::rep_var_format(FILE *fp, const char *rep_var) {
|
||||
OperandForm* oper = form->is_operand();
|
||||
if (oper != NULL && oper->is_bound_register()) {
|
||||
const RegDef* first = oper->get_RegClass()->find_first_elem();
|
||||
fprintf(fp, " st->print(\"%s\");\n", first->_regname);
|
||||
fprintf(fp, " st->print_raw(\"%s\");\n", first->_regname);
|
||||
} else {
|
||||
globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var);
|
||||
}
|
||||
@ -2530,7 +2530,7 @@ void OperandForm::format_constant(FILE *fp, uint const_index, uint const_type) {
|
||||
case Form::idealP: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
|
||||
case Form::idealNKlass:
|
||||
case Form::idealN: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
|
||||
case Form::idealL: fprintf(fp," st->print(\"#%%lld\", _c%d);\n", const_index); break;
|
||||
case Form::idealL: fprintf(fp," st->print(\"#\" INT64_FORMAT, (int64_t)_c%d);\n", const_index); break;
|
||||
case Form::idealF: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break;
|
||||
case Form::idealD: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break;
|
||||
default:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 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
|
||||
@ -211,7 +211,7 @@ static void declareConstStorage(FILE *fp, FormDict &globals, OperandForm *oper)
|
||||
const char *type = oper->ideal_type(globals);
|
||||
if (!strcmp(type, "ConI")) {
|
||||
if (i > 0) fprintf(fp,", ");
|
||||
fprintf(fp," int32 _c%d;\n", i);
|
||||
fprintf(fp," int32_t _c%d;\n", i);
|
||||
}
|
||||
else if (!strcmp(type, "ConP")) {
|
||||
if (i > 0) fprintf(fp,", ");
|
||||
@ -307,7 +307,7 @@ static void defineConstructor(FILE *fp, const char *name, uint num_consts,
|
||||
assert(num_consts == 1, "Bad component list detected.\n");
|
||||
switch( constant_type ) {
|
||||
case Form::idealI : {
|
||||
fprintf(fp,is_ideal_bool ? "BoolTest::mask c%d" : "int32 c%d", i);
|
||||
fprintf(fp,is_ideal_bool ? "BoolTest::mask c%d" : "int32_t c%d", i);
|
||||
break;
|
||||
}
|
||||
case Form::idealN : { fprintf(fp,"const TypeNarrowOop *c%d", i); break; }
|
||||
@ -326,7 +326,7 @@ static void defineConstructor(FILE *fp, const char *name, uint num_consts,
|
||||
while((comp = lst.iter()) != NULL) {
|
||||
if (!strcmp(comp->base_type(globals), "ConI")) {
|
||||
if (i > 0) fprintf(fp,", ");
|
||||
fprintf(fp,"int32 c%d", i);
|
||||
fprintf(fp,"int32_t c%d", i);
|
||||
i++;
|
||||
}
|
||||
else if (!strcmp(comp->base_type(globals), "ConP")) {
|
||||
@ -386,14 +386,14 @@ static void defineConstructor(FILE *fp, const char *name, uint num_consts,
|
||||
static void defineCCodeDump(OperandForm* oper, FILE *fp, int i) {
|
||||
assert(oper != NULL, "what");
|
||||
CondInterface* cond = oper->_interface->is_CondInterface();
|
||||
fprintf(fp, " if( _c%d == BoolTest::eq ) st->print(\"%s\");\n",i,cond->_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::ne ) st->print(\"%s\");\n",i,cond->_not_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::le ) st->print(\"%s\");\n",i,cond->_less_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::ge ) st->print(\"%s\");\n",i,cond->_greater_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::lt ) st->print(\"%s\");\n",i,cond->_less_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::gt ) st->print(\"%s\");\n",i,cond->_greater_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::overflow ) st->print(\"%s\");\n",i,cond->_overflow_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::no_overflow ) st->print(\"%s\");\n",i,cond->_no_overflow_format);
|
||||
fprintf(fp, " if( _c%d == BoolTest::eq ) st->print_raw(\"%s\");\n",i,cond->_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::ne ) st->print_raw(\"%s\");\n",i,cond->_not_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::le ) st->print_raw(\"%s\");\n",i,cond->_less_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::ge ) st->print_raw(\"%s\");\n",i,cond->_greater_equal_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::lt ) st->print_raw(\"%s\");\n",i,cond->_less_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::gt ) st->print_raw(\"%s\");\n",i,cond->_greater_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::overflow ) st->print_raw(\"%s\");\n",i,cond->_overflow_format);
|
||||
fprintf(fp, " else if( _c%d == BoolTest::no_overflow ) st->print_raw(\"%s\");\n",i,cond->_no_overflow_format);
|
||||
}
|
||||
|
||||
// Output code that dumps constant values, increment "i" if type is constant
|
||||
@ -416,8 +416,8 @@ static uint dump_spec_constant(FILE *fp, const char *ideal_type, uint i, Operand
|
||||
++i;
|
||||
}
|
||||
else if (!strcmp(ideal_type, "ConL")) {
|
||||
fprintf(fp," st->print(\"#\" INT64_FORMAT, _c%d);\n", i);
|
||||
fprintf(fp," st->print(\"/\" PTR64_FORMAT, _c%d);\n", i);
|
||||
fprintf(fp," st->print(\"#\" INT64_FORMAT, (int64_t)_c%d);\n", i);
|
||||
fprintf(fp," st->print(\"/\" PTR64_FORMAT, (uint64_t)_c%d);\n", i);
|
||||
++i;
|
||||
}
|
||||
else if (!strcmp(ideal_type, "ConF")) {
|
||||
@ -429,7 +429,7 @@ static uint dump_spec_constant(FILE *fp, const char *ideal_type, uint i, Operand
|
||||
else if (!strcmp(ideal_type, "ConD")) {
|
||||
fprintf(fp," st->print(\"#%%f\", _c%d);\n", i);
|
||||
fprintf(fp," jlong _c%dl = JavaValue(_c%d).get_jlong();\n", i, i);
|
||||
fprintf(fp," st->print(\"/\" PTR64_FORMAT, _c%dl);\n", i);
|
||||
fprintf(fp," st->print(\"/\" PTR64_FORMAT, (uint64_t)_c%dl);\n", i);
|
||||
++i;
|
||||
}
|
||||
else if (!strcmp(ideal_type, "Bool")) {
|
||||
@ -471,7 +471,7 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
|
||||
if ( string != NameList::_signal ) {
|
||||
// Normal string
|
||||
// Pass through to st->print
|
||||
fprintf(fp," st->print(\"%s\");\n", string);
|
||||
fprintf(fp," st->print_raw(\"%s\");\n", string);
|
||||
} else {
|
||||
// Replacement variable
|
||||
const char *rep_var = oper._format->_rep_vars.iter();
|
||||
@ -542,7 +542,7 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
|
||||
if ( string != NameList::_signal ) {
|
||||
// Normal string
|
||||
// Pass through to st->print
|
||||
fprintf(fp," st->print(\"%s\");\n", string);
|
||||
fprintf(fp," st->print_raw(\"%s\");\n", string);
|
||||
} else {
|
||||
// Replacement variable
|
||||
const char *rep_var = oper._format->_rep_vars.iter();
|
||||
@ -669,7 +669,7 @@ void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &inst, bool for_c
|
||||
} else if( string == NameList::_signal2 ) // Raw program text
|
||||
fputs(inst._format->_strings.iter(), fp);
|
||||
else
|
||||
fprintf(fp,"st->print(\"%s\");\n", string);
|
||||
fprintf(fp,"st->print_raw(\"%s\");\n", string);
|
||||
} // Done with all format strings
|
||||
} // Done generating the user-defined portion of the format
|
||||
|
||||
@ -696,13 +696,13 @@ void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &inst, bool for_c
|
||||
default:
|
||||
assert(0,"ShouldNotReachHere");
|
||||
}
|
||||
fprintf(fp, " st->print_cr(\"\");\n" );
|
||||
fprintf(fp, " st->cr();\n" );
|
||||
fprintf(fp, " if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\" No JVM State Info\");\n" );
|
||||
fprintf(fp, " st->print(\" # \");\n" );
|
||||
fprintf(fp, " if( _jvms && _oop_map ) _oop_map->print_on(st);\n");
|
||||
}
|
||||
else if(inst.is_ideal_safepoint()) {
|
||||
fprintf(fp, " st->print(\"\");\n" );
|
||||
fprintf(fp, " st->print_raw(\"\");\n" );
|
||||
fprintf(fp, " if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\" No JVM State Info\");\n" );
|
||||
fprintf(fp, " st->print(\" # \");\n" );
|
||||
fprintf(fp, " if( _jvms && _oop_map ) _oop_map->print_on(st);\n");
|
||||
|
@ -119,7 +119,7 @@ void AbstractAssembler::bind(Label& L) {
|
||||
L.patch_instructions((MacroAssembler*)this);
|
||||
}
|
||||
|
||||
void AbstractAssembler::generate_stack_overflow_check( int frame_size_in_bytes) {
|
||||
void AbstractAssembler::generate_stack_overflow_check(int frame_size_in_bytes) {
|
||||
if (UseStackBanging) {
|
||||
// Each code entry causes one stack bang n pages down the stack where n
|
||||
// is configurable by StackShadowPages. The setting depends on the maximum
|
||||
@ -134,7 +134,7 @@ void AbstractAssembler::generate_stack_overflow_check( int frame_size_in_bytes)
|
||||
// is greater than a page.
|
||||
|
||||
const int page_size = os::vm_page_size();
|
||||
int bang_end = StackShadowPages*page_size;
|
||||
int bang_end = StackShadowPages * page_size;
|
||||
|
||||
// This is how far the previous frame's stack banging extended.
|
||||
const int bang_end_safe = bang_end;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -988,7 +988,7 @@ void CodeSection::dump() {
|
||||
for (csize_t step; ptr < end(); ptr += step) {
|
||||
step = end() - ptr;
|
||||
if (step > jintSize * 4) step = jintSize * 4;
|
||||
tty->print(PTR_FORMAT ": ", ptr);
|
||||
tty->print(INTPTR_FORMAT ": ", p2i(ptr));
|
||||
while (step > 0) {
|
||||
tty->print(" " PTR32_FORMAT, *(jint*)ptr);
|
||||
ptr += jintSize;
|
||||
@ -1098,7 +1098,7 @@ void CodeStrings::print_block_comment(outputStream* stream, intptr_t offset) con
|
||||
while (c && c->offset() == offset) {
|
||||
stream->bol();
|
||||
stream->print(" ;; ");
|
||||
stream->print_cr(c->string());
|
||||
stream->print_cr("%s", c->string());
|
||||
c = c->next_comment();
|
||||
}
|
||||
}
|
||||
@ -1154,10 +1154,10 @@ void CodeBuffer::decode_all() {
|
||||
void CodeSection::print(const char* name) {
|
||||
csize_t locs_size = locs_end() - locs_start();
|
||||
tty->print_cr(" %7s.code = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d)%s",
|
||||
name, start(), end(), limit(), size(), capacity(),
|
||||
name, p2i(start()), p2i(end()), p2i(limit()), size(), capacity(),
|
||||
is_frozen()? " [frozen]": "");
|
||||
tty->print_cr(" %7s.locs = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d) point=%d",
|
||||
name, locs_start(), locs_end(), locs_limit(), locs_size, locs_capacity(), locs_point_off());
|
||||
name, p2i(locs_start()), p2i(locs_end()), p2i(locs_limit()), locs_size, locs_capacity(), locs_point_off());
|
||||
if (PrintRelocations) {
|
||||
RelocIterator iter(this);
|
||||
iter.print();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -173,7 +173,7 @@ class CodeSection VALUE_OBJ_CLASS_SPEC {
|
||||
bool allocates(address pc) const { return pc >= _start && pc < _limit; }
|
||||
bool allocates2(address pc) const { return pc >= _start && pc <= _limit; }
|
||||
|
||||
void set_end(address pc) { assert(allocates2(pc), err_msg("not in CodeBuffer memory: " PTR_FORMAT " <= " PTR_FORMAT " <= " PTR_FORMAT, _start, pc, _limit)); _end = pc; }
|
||||
void set_end(address pc) { assert(allocates2(pc), err_msg("not in CodeBuffer memory: " INTPTR_FORMAT " <= " INTPTR_FORMAT " <= " INTPTR_FORMAT, p2i(_start), p2i(pc), p2i(_limit))); _end = pc; }
|
||||
void set_mark(address pc) { assert(contains2(pc), "not in codeBuffer");
|
||||
_mark = pc; }
|
||||
void set_mark_off(int offset) { assert(contains2(offset+_start),"not in codeBuffer");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -118,8 +118,8 @@ inline void assert_different_registers(
|
||||
) {
|
||||
assert(
|
||||
a != b,
|
||||
err_msg_res("registers must be different: a=%d, b=%d",
|
||||
a, b)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b))
|
||||
);
|
||||
}
|
||||
|
||||
@ -132,8 +132,9 @@ inline void assert_different_registers(
|
||||
assert(
|
||||
a != b && a != c
|
||||
&& b != c,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d",
|
||||
a, b, c)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c))
|
||||
);
|
||||
}
|
||||
|
||||
@ -148,8 +149,9 @@ inline void assert_different_registers(
|
||||
a != b && a != c && a != d
|
||||
&& b != c && b != d
|
||||
&& c != d,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d",
|
||||
a, b, c, d)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c), p2i(d))
|
||||
);
|
||||
}
|
||||
|
||||
@ -166,8 +168,9 @@ inline void assert_different_registers(
|
||||
&& b != c && b != d && b != e
|
||||
&& c != d && c != e
|
||||
&& d != e,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d",
|
||||
a, b, c, d, e)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c), p2i(d), p2i(e))
|
||||
);
|
||||
}
|
||||
|
||||
@ -186,8 +189,10 @@ inline void assert_different_registers(
|
||||
&& c != d && c != e && c != f
|
||||
&& d != e && d != f
|
||||
&& e != f,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d",
|
||||
a, b, c, d, e, f)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT
|
||||
", f=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f))
|
||||
);
|
||||
}
|
||||
|
||||
@ -208,8 +213,10 @@ inline void assert_different_registers(
|
||||
&& d != e && d != f && d != g
|
||||
&& e != f && e != g
|
||||
&& f != g,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d",
|
||||
a, b, c, d, e, f, g)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT
|
||||
", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g))
|
||||
);
|
||||
}
|
||||
|
||||
@ -232,8 +239,10 @@ inline void assert_different_registers(
|
||||
&& e != f && e != g && e != h
|
||||
&& f != g && f != h
|
||||
&& g != h,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d",
|
||||
a, b, c, d, e, f, g, h)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT
|
||||
", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT ", h=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g), p2i(h))
|
||||
);
|
||||
}
|
||||
|
||||
@ -258,8 +267,11 @@ inline void assert_different_registers(
|
||||
&& f != g && f != h && f != i
|
||||
&& g != h && g != i
|
||||
&& h != i,
|
||||
err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d",
|
||||
a, b, c, d, e, f, g, h, i)
|
||||
err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT
|
||||
", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT
|
||||
", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT ", h=" INTPTR_FORMAT
|
||||
", i=" INTPTR_FORMAT "",
|
||||
p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g), p2i(h), p2i(i))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -50,7 +50,7 @@ class CFGPrinterOutput : public CHeapObj<mtCompiler> {
|
||||
|
||||
void inc_indent();
|
||||
void dec_indent();
|
||||
void print(const char* format, ...);
|
||||
void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
|
||||
void print_begin(const char* tag);
|
||||
void print_end(const char* tag);
|
||||
|
||||
@ -161,7 +161,7 @@ void CFGPrinterOutput::print_compilation() {
|
||||
|
||||
print("name \"%s\"", method_name(_compilation->method(), true));
|
||||
print("method \"%s\"", method_name(_compilation->method()));
|
||||
print("date "INT64_FORMAT, os::javaTimeMillis());
|
||||
print("date "INT64_FORMAT, (int64_t) os::javaTimeMillis());
|
||||
|
||||
print_end("compilation");
|
||||
}
|
||||
|
@ -450,9 +450,11 @@ class PatchingStub: public CodeStub {
|
||||
class DeoptimizeStub : public CodeStub {
|
||||
private:
|
||||
CodeEmitInfo* _info;
|
||||
jint _trap_request;
|
||||
|
||||
public:
|
||||
DeoptimizeStub(CodeEmitInfo* info) : _info(new CodeEmitInfo(info)) {}
|
||||
DeoptimizeStub(CodeEmitInfo* info, Deoptimization::DeoptReason reason, Deoptimization::DeoptAction action) :
|
||||
_info(new CodeEmitInfo(info)), _trap_request(Deoptimization::make_trap_request(reason, action)) {}
|
||||
|
||||
virtual void emit_code(LIR_Assembler* e);
|
||||
virtual CodeEmitInfo* info() const { return _info; }
|
||||
|
@ -251,6 +251,10 @@ class Compilation: public StackObj {
|
||||
return env()->comp_level() == CompLevel_full_profile &&
|
||||
C1UpdateMethodData && MethodData::profile_return();
|
||||
}
|
||||
bool age_code() const {
|
||||
return _method->profile_aging();
|
||||
}
|
||||
|
||||
// will compilation make optimistic assumptions that might lead to
|
||||
// deoptimization and that the runtime will account for?
|
||||
bool is_optimistic() const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -134,23 +134,23 @@ void InstructionPrinter::print_object(Value obj) {
|
||||
if (value->is_null_object()) {
|
||||
output()->print("null");
|
||||
} else if (!value->is_loaded()) {
|
||||
output()->print("<unloaded object " PTR_FORMAT ">", value);
|
||||
output()->print("<unloaded object " INTPTR_FORMAT ">", p2i(value));
|
||||
} else {
|
||||
output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding());
|
||||
output()->print("<object " INTPTR_FORMAT " klass=", p2i(value->constant_encoding()));
|
||||
print_klass(value->klass());
|
||||
output()->print(">");
|
||||
}
|
||||
} else if (type->as_InstanceConstant() != NULL) {
|
||||
ciInstance* value = type->as_InstanceConstant()->value();
|
||||
if (value->is_loaded()) {
|
||||
output()->print("<instance " PTR_FORMAT " klass=", value->constant_encoding());
|
||||
output()->print("<instance " INTPTR_FORMAT " klass=", p2i(value->constant_encoding()));
|
||||
print_klass(value->klass());
|
||||
output()->print(">");
|
||||
} else {
|
||||
output()->print("<unloaded instance " PTR_FORMAT ">", value);
|
||||
output()->print("<unloaded instance " INTPTR_FORMAT ">", p2i(value));
|
||||
}
|
||||
} else if (type->as_ArrayConstant() != NULL) {
|
||||
output()->print("<array " PTR_FORMAT ">", type->as_ArrayConstant()->value()->constant_encoding());
|
||||
output()->print("<array " INTPTR_FORMAT ">", p2i(type->as_ArrayConstant()->value()->constant_encoding()));
|
||||
} else if (type->as_ClassConstant() != NULL) {
|
||||
ciInstanceKlass* klass = type->as_ClassConstant()->value();
|
||||
if (!klass->is_loaded()) {
|
||||
@ -268,7 +268,7 @@ void InstructionPrinter::print_inline_level(BlockBegin* block) {
|
||||
|
||||
|
||||
void InstructionPrinter::print_unsafe_op(UnsafeOp* op, const char* name) {
|
||||
output()->print(name);
|
||||
output()->print("%s", name);
|
||||
output()->print(".(");
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ void InstructionPrinter::do_TypeCast(TypeCast* x) {
|
||||
if (x->declared_type()->is_klass())
|
||||
print_klass(x->declared_type()->as_klass());
|
||||
else
|
||||
output()->print(type2name(x->declared_type()->basic_type()));
|
||||
output()->print("%s", type2name(x->declared_type()->basic_type()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 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
|
||||
@ -1083,7 +1083,7 @@ void LIR_OpLabel::emit_code(LIR_Assembler* masm) {
|
||||
|
||||
void LIR_OpArrayCopy::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_arraycopy(this);
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
|
||||
void LIR_OpUpdateCRC32::emit_code(LIR_Assembler* masm) {
|
||||
@ -1100,20 +1100,20 @@ void LIR_Op1::emit_code(LIR_Assembler* masm) {
|
||||
|
||||
void LIR_OpAllocObj::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_alloc_obj(this);
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
|
||||
void LIR_OpBranch::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_opBranch(this);
|
||||
if (stub()) {
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
}
|
||||
|
||||
void LIR_OpConvert::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_opConvert(this);
|
||||
if (stub() != NULL) {
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1123,13 +1123,13 @@ void LIR_Op2::emit_code(LIR_Assembler* masm) {
|
||||
|
||||
void LIR_OpAllocArray::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_alloc_array(this);
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
|
||||
void LIR_OpTypeCheck::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_opTypeCheck(this);
|
||||
if (stub()) {
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1144,7 +1144,7 @@ void LIR_Op3::emit_code(LIR_Assembler* masm) {
|
||||
void LIR_OpLock::emit_code(LIR_Assembler* masm) {
|
||||
masm->emit_lock(this);
|
||||
if (stub()) {
|
||||
masm->emit_code_stub(stub());
|
||||
masm->append_code_stub(stub());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1563,15 +1563,15 @@ void LIR_OprDesc::print(outputStream* out) const {
|
||||
} else if (is_virtual()) {
|
||||
out->print("R%d", vreg_number());
|
||||
} else if (is_single_cpu()) {
|
||||
out->print(as_register()->name());
|
||||
out->print("%s", as_register()->name());
|
||||
} else if (is_double_cpu()) {
|
||||
out->print(as_register_hi()->name());
|
||||
out->print(as_register_lo()->name());
|
||||
out->print("%s", as_register_hi()->name());
|
||||
out->print("%s", as_register_lo()->name());
|
||||
#if defined(X86)
|
||||
} else if (is_single_xmm()) {
|
||||
out->print(as_xmm_float_reg()->name());
|
||||
out->print("%s", as_xmm_float_reg()->name());
|
||||
} else if (is_double_xmm()) {
|
||||
out->print(as_xmm_double_reg()->name());
|
||||
out->print("%s", as_xmm_double_reg()->name());
|
||||
} else if (is_single_fpu()) {
|
||||
out->print("fpu%d", fpu_regnr());
|
||||
} else if (is_double_fpu()) {
|
||||
@ -1583,9 +1583,9 @@ void LIR_OprDesc::print(outputStream* out) const {
|
||||
out->print("d%d", fpu_regnrLo() >> 1);
|
||||
#else
|
||||
} else if (is_single_fpu()) {
|
||||
out->print(as_float_reg()->name());
|
||||
out->print("%s", as_float_reg()->name());
|
||||
} else if (is_double_fpu()) {
|
||||
out->print(as_double_reg()->name());
|
||||
out->print("%s", as_double_reg()->name());
|
||||
#endif
|
||||
|
||||
} else if (is_illegal()) {
|
||||
@ -1611,9 +1611,9 @@ void LIR_Const::print_value_on(outputStream* out) const {
|
||||
case T_LONG: out->print("lng:" JLONG_FORMAT, as_jlong()); break;
|
||||
case T_FLOAT: out->print("flt:%f", as_jfloat()); break;
|
||||
case T_DOUBLE: out->print("dbl:%f", as_jdouble()); break;
|
||||
case T_OBJECT: out->print("obj:0x%x", as_jobject()); break;
|
||||
case T_METADATA: out->print("metadata:0x%x", as_metadata());break;
|
||||
default: out->print("%3d:0x%x",type(), as_jdouble()); break;
|
||||
case T_OBJECT: out->print("obj:" INTPTR_FORMAT, p2i(as_jobject())); break;
|
||||
case T_METADATA: out->print("metadata:" INTPTR_FORMAT, p2i(as_metadata()));break;
|
||||
default: out->print("%3d:0x" UINT64_FORMAT_X, type(), (uint64_t)as_jlong()); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1629,7 +1629,7 @@ void LIR_Address::print_value_on(outputStream* out) const {
|
||||
case times_8: out->print(" * 8"); break;
|
||||
}
|
||||
}
|
||||
out->print(" Disp: %d", _disp);
|
||||
out->print(" Disp: " INTX_FORMAT, _disp);
|
||||
}
|
||||
|
||||
// debug output of block header without InstructionPrinter
|
||||
@ -1703,7 +1703,7 @@ void LIR_Op::print_on(outputStream* out) const {
|
||||
} else {
|
||||
out->print(" ");
|
||||
}
|
||||
out->print(name()); out->print(" ");
|
||||
out->print("%s ", name());
|
||||
print_instr(out);
|
||||
if (info() != NULL) out->print(" [bci:%d]", info()->stack()->bci());
|
||||
#ifdef ASSERT
|
||||
@ -1833,7 +1833,7 @@ const char * LIR_Op::name() const {
|
||||
// LIR_OpJavaCall
|
||||
void LIR_OpJavaCall::print_instr(outputStream* out) const {
|
||||
out->print("call: ");
|
||||
out->print("[addr: 0x%x]", address());
|
||||
out->print("[addr: " INTPTR_FORMAT "]", p2i(address()));
|
||||
if (receiver()->is_valid()) {
|
||||
out->print(" [recv: "); receiver()->print(out); out->print("]");
|
||||
}
|
||||
@ -1844,7 +1844,7 @@ void LIR_OpJavaCall::print_instr(outputStream* out) const {
|
||||
|
||||
// LIR_OpLabel
|
||||
void LIR_OpLabel::print_instr(outputStream* out) const {
|
||||
out->print("[label:0x%x]", _label);
|
||||
out->print("[label:" INTPTR_FORMAT "]", p2i(_label));
|
||||
}
|
||||
|
||||
// LIR_OpArrayCopy
|
||||
@ -1911,7 +1911,7 @@ void LIR_Op1::print_instr(outputStream* out) const {
|
||||
// LIR_Op1
|
||||
void LIR_OpRTCall::print_instr(outputStream* out) const {
|
||||
intx a = (intx)addr();
|
||||
out->print(Runtime1::name_for_address(addr()));
|
||||
out->print("%s", Runtime1::name_for_address(addr()));
|
||||
out->print(" ");
|
||||
tmp()->print(out);
|
||||
}
|
||||
@ -1934,10 +1934,10 @@ void LIR_OpBranch::print_instr(outputStream* out) const {
|
||||
} else if (stub() != NULL) {
|
||||
out->print("[");
|
||||
stub()->print_name(out);
|
||||
out->print(": 0x%x]", stub());
|
||||
out->print(": " INTPTR_FORMAT "]", p2i(stub()));
|
||||
if (stub()->info() != NULL) out->print(" [bci:%d]", stub()->info()->stack()->bci());
|
||||
} else {
|
||||
out->print("[label:0x%x] ", label());
|
||||
out->print("[label:" INTPTR_FORMAT "] ", p2i(label()));
|
||||
}
|
||||
if (ublock() != NULL) {
|
||||
out->print("unordered: [B%d] ", ublock()->block_id());
|
||||
@ -2004,7 +2004,7 @@ void LIR_OpAllocObj::print_instr(outputStream* out) const {
|
||||
tmp4()->print(out); out->print(" ");
|
||||
out->print("[hdr:%d]", header_size()); out->print(" ");
|
||||
out->print("[obj:%d]", object_size()); out->print(" ");
|
||||
out->print("[lbl:0x%x]", stub()->entry());
|
||||
out->print("[lbl:" INTPTR_FORMAT "]", p2i(stub()->entry()));
|
||||
}
|
||||
|
||||
void LIR_OpRoundFP::print_instr(outputStream* out) const {
|
||||
@ -2037,7 +2037,7 @@ void LIR_OpAllocArray::print_instr(outputStream* out) const {
|
||||
tmp3()->print(out); out->print(" ");
|
||||
tmp4()->print(out); out->print(" ");
|
||||
out->print("[type:0x%x]", type()); out->print(" ");
|
||||
out->print("[label:0x%x]", stub()->entry());
|
||||
out->print("[label:" INTPTR_FORMAT "]", p2i(stub()->entry()));
|
||||
}
|
||||
|
||||
|
||||
@ -2074,7 +2074,7 @@ void LIR_OpLock::print_instr(outputStream* out) const {
|
||||
if (_scratch->is_valid()) {
|
||||
_scratch->print(out); out->print(" ");
|
||||
}
|
||||
out->print("[lbl:0x%x]", stub()->entry());
|
||||
out->print("[lbl:" INTPTR_FORMAT "]", p2i(stub()->entry()));
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
@ -2082,7 +2082,7 @@ void LIR_OpAssert::print_instr(outputStream* out) const {
|
||||
print_condition(out, condition()); out->print(" ");
|
||||
in_opr1()->print(out); out->print(" ");
|
||||
in_opr2()->print(out); out->print(", \"");
|
||||
out->print(msg()); out->print("\"");
|
||||
out->print("%s", msg()); out->print("\"");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1127,6 +1127,7 @@ class LIR_Op: public CompilationResourceObj {
|
||||
virtual void print_instr(outputStream* out) const = 0;
|
||||
virtual void print_on(outputStream* st) const PRODUCT_RETURN;
|
||||
|
||||
virtual bool is_patching() { return false; }
|
||||
virtual LIR_OpCall* as_OpCall() { return NULL; }
|
||||
virtual LIR_OpJavaCall* as_OpJavaCall() { return NULL; }
|
||||
virtual LIR_OpLabel* as_OpLabel() { return NULL; }
|
||||
@ -1387,6 +1388,7 @@ class LIR_Op1: public LIR_Op {
|
||||
return (LIR_MoveKind)_flags;
|
||||
}
|
||||
|
||||
virtual bool is_patching() { return _patch != lir_patch_none; }
|
||||
virtual void emit_code(LIR_Assembler* masm);
|
||||
virtual LIR_Op1* as_Op1() { return this; }
|
||||
virtual const char * name() const PRODUCT_RETURN0;
|
||||
@ -1619,6 +1621,7 @@ public:
|
||||
int profiled_bci() const { return _profiled_bci; }
|
||||
bool should_profile() const { return _should_profile; }
|
||||
|
||||
virtual bool is_patching() { return _info_for_patch != NULL; }
|
||||
virtual void emit_code(LIR_Assembler* masm);
|
||||
virtual LIR_OpTypeCheck* as_OpTypeCheck() { return this; }
|
||||
void print_instr(outputStream* out) const PRODUCT_RETURN;
|
||||
|
@ -58,7 +58,7 @@ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_cod
|
||||
_masm->nop();
|
||||
}
|
||||
patch->install(_masm, patch_code, obj, info);
|
||||
append_patching_stub(patch);
|
||||
append_code_stub(patch);
|
||||
|
||||
#ifdef ASSERT
|
||||
Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci());
|
||||
@ -131,11 +131,6 @@ LIR_Assembler::~LIR_Assembler() {
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::append_patching_stub(PatchingStub* stub) {
|
||||
_slow_case_stubs->append(stub);
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::check_codespace() {
|
||||
CodeSection* cs = _masm->code_section();
|
||||
if (cs->remaining() < (int)(NOT_LP64(1*K)LP64_ONLY(2*K))) {
|
||||
@ -144,7 +139,7 @@ void LIR_Assembler::check_codespace() {
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::emit_code_stub(CodeStub* stub) {
|
||||
void LIR_Assembler::append_code_stub(CodeStub* stub) {
|
||||
_slow_case_stubs->append(stub);
|
||||
}
|
||||
|
||||
@ -442,7 +437,7 @@ void LIR_Assembler::add_debug_info_for_null_check_here(CodeEmitInfo* cinfo) {
|
||||
|
||||
void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) {
|
||||
ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo);
|
||||
emit_code_stub(stub);
|
||||
append_code_stub(stub);
|
||||
}
|
||||
|
||||
void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {
|
||||
@ -451,7 +446,7 @@ void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {
|
||||
|
||||
void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
|
||||
DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo);
|
||||
emit_code_stub(stub);
|
||||
append_code_stub(stub);
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) {
|
||||
|
@ -144,7 +144,7 @@ class LIR_Assembler: public CompilationResourceObj {
|
||||
// stubs
|
||||
void emit_slow_case_stubs();
|
||||
void emit_static_call_stub();
|
||||
void emit_code_stub(CodeStub* op);
|
||||
void append_code_stub(CodeStub* op);
|
||||
void add_call_info_here(CodeEmitInfo* info) { add_call_info(code_offset(), info); }
|
||||
|
||||
// code patterns
|
||||
|
@ -2782,7 +2782,10 @@ void LIRGenerator::do_Base(Base* x) {
|
||||
__ lock_object(syncTempOpr(), obj, lock, new_register(T_OBJECT), slow_path, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (compilation()->age_code()) {
|
||||
CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state()->copy(ValueStack::StateBefore, 0), NULL, false);
|
||||
decrement_age(info);
|
||||
}
|
||||
// increment invocation counters if needed
|
||||
if (!method()->is_accessor()) { // Accessors do not have MDOs, so no counting.
|
||||
profile_parameters(x);
|
||||
@ -3328,6 +3331,27 @@ void LIRGenerator::increment_event_counter(CodeEmitInfo* info, int bci, bool bac
|
||||
increment_event_counter_impl(info, info->scope()->method(), (1 << freq_log) - 1, bci, backedge, true);
|
||||
}
|
||||
|
||||
void LIRGenerator::decrement_age(CodeEmitInfo* info) {
|
||||
ciMethod* method = info->scope()->method();
|
||||
MethodCounters* mc_adr = method->ensure_method_counters();
|
||||
if (mc_adr != NULL) {
|
||||
LIR_Opr mc = new_pointer_register();
|
||||
__ move(LIR_OprFact::intptrConst(mc_adr), mc);
|
||||
int offset = in_bytes(MethodCounters::nmethod_age_offset());
|
||||
LIR_Address* counter = new LIR_Address(mc, offset, T_INT);
|
||||
LIR_Opr result = new_register(T_INT);
|
||||
__ load(counter, result);
|
||||
__ sub(result, LIR_OprFact::intConst(1), result);
|
||||
__ store(result, counter);
|
||||
// DeoptimizeStub will reexecute from the current state in code info.
|
||||
CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_tenured,
|
||||
Deoptimization::Action_make_not_entrant);
|
||||
__ cmp(lir_cond_lessEqual, result, LIR_OprFact::intConst(0));
|
||||
__ branch(lir_cond_lessEqual, T_INT, deopt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::increment_event_counter_impl(CodeEmitInfo* info,
|
||||
ciMethod *method, int frequency,
|
||||
int bci, bool backedge, bool notify) {
|
||||
|
@ -372,7 +372,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
|
||||
increment_event_counter(info, bci, true);
|
||||
}
|
||||
}
|
||||
|
||||
void decrement_age(CodeEmitInfo* info);
|
||||
CodeEmitInfo* state_for(Instruction* x, ValueStack* state, bool ignore_xhandler = false);
|
||||
CodeEmitInfo* state_for(Instruction* x);
|
||||
|
||||
|
@ -2382,16 +2382,6 @@ OopMap* LinearScan::compute_oop_map(IntervalWalker* iw, LIR_Op* op, CodeEmitInfo
|
||||
int arg_count = frame_map()->oop_map_arg_count();
|
||||
OopMap* map = new OopMap(frame_size, arg_count);
|
||||
|
||||
// Check if this is a patch site.
|
||||
bool is_patch_info = false;
|
||||
if (op->code() == lir_move) {
|
||||
assert(!is_call_site, "move must not be a call site");
|
||||
assert(op->as_Op1() != NULL, "move must be LIR_Op1");
|
||||
LIR_Op1* move = (LIR_Op1*)op;
|
||||
|
||||
is_patch_info = move->patch_code() != lir_patch_none;
|
||||
}
|
||||
|
||||
// Iterate through active intervals
|
||||
for (Interval* interval = iw->active_first(fixedKind); interval != Interval::end(); interval = interval->next()) {
|
||||
int assigned_reg = interval->assigned_reg();
|
||||
@ -2406,7 +2396,7 @@ OopMap* LinearScan::compute_oop_map(IntervalWalker* iw, LIR_Op* op, CodeEmitInfo
|
||||
// moves, any intervals which end at this instruction are included
|
||||
// in the oop map since we may safepoint while doing the patch
|
||||
// before we've consumed the inputs.
|
||||
if (is_patch_info || op->id() < interval->current_to()) {
|
||||
if (op->is_patching() || op->id() < interval->current_to()) {
|
||||
|
||||
// caller-save registers must not be included into oop-maps at calls
|
||||
assert(!is_call_site || assigned_reg >= nof_regs || !is_caller_save(assigned_reg), "interval is in a caller-save register at a call -> register will be overwritten");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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
|
||||
@ -62,10 +62,10 @@ RangeCheckEliminator::RangeCheckEliminator(IR *ir) :
|
||||
_optimistic = ir->compilation()->is_optimistic();
|
||||
|
||||
TRACE_RANGE_CHECK_ELIMINATION(
|
||||
tty->print_cr("");
|
||||
tty->cr();
|
||||
tty->print_cr("Range check elimination");
|
||||
ir->method()->print_name(tty);
|
||||
tty->print_cr("");
|
||||
tty->cr();
|
||||
);
|
||||
|
||||
TRACE_RANGE_CHECK_ELIMINATION(
|
||||
@ -1024,7 +1024,7 @@ void RangeCheckEliminator::dump_condition_stack(BlockBegin *block) {
|
||||
tty->print("i%d", phi->id());
|
||||
tty->print(": ");
|
||||
bound->print();
|
||||
tty->print_cr("");
|
||||
tty->cr();
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -1039,7 +1039,7 @@ void RangeCheckEliminator::dump_condition_stack(BlockBegin *block) {
|
||||
tty->print("i%d", instr->id());
|
||||
tty->print(": ");
|
||||
bound->print();
|
||||
tty->print_cr("");
|
||||
tty->cr();
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1400,7 +1400,7 @@ Value RangeCheckEliminator::Bound::lower_instr() {
|
||||
|
||||
// print
|
||||
void RangeCheckEliminator::Bound::print() {
|
||||
tty->print("");
|
||||
tty->print("%s", "");
|
||||
if (this->_lower_instr || this->_lower != min_jint) {
|
||||
if (this->_lower_instr) {
|
||||
tty->print("i%d", this->_lower_instr->id());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user