Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
ad40f981
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ad40f981
编写于
5月 07, 2009
作者:
T
trims
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
d8e174ba
7a27a00c
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
325 addition
and
548 deletion
+325
-548
agent/src/os/linux/Makefile
agent/src/os/linux/Makefile
+8
-0
agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
...rc/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
+0
-2
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+9
-4
make/jprt.config
make/jprt.config
+0
-275
make/jprt.properties
make/jprt.properties
+27
-4
make/linux/makefiles/gcc.make
make/linux/makefiles/gcc.make
+5
-0
make/linux/makefiles/jsig.make
make/linux/makefiles/jsig.make
+1
-1
make/linux/makefiles/saproc.make
make/linux/makefiles/saproc.make
+1
-1
src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp
...hare/vm/gc_implementation/g1/concurrentG1RefineThread.cpp
+6
-4
src/share/vm/gc_implementation/g1/concurrentMark.cpp
src/share/vm/gc_implementation/g1/concurrentMark.cpp
+8
-7
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
+0
-14
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+10
-32
src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
+3
-2
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+22
-21
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
+1
-1
src/share/vm/gc_implementation/g1/g1RemSet.cpp
src/share/vm/gc_implementation/g1/g1RemSet.cpp
+29
-14
src/share/vm/gc_implementation/g1/g1_globals.hpp
src/share/vm/gc_implementation/g1/g1_globals.hpp
+27
-61
src/share/vm/gc_implementation/g1/heapRegion.cpp
src/share/vm/gc_implementation/g1/heapRegion.cpp
+2
-20
src/share/vm/opto/connode.cpp
src/share/vm/opto/connode.cpp
+4
-0
src/share/vm/opto/divnode.cpp
src/share/vm/opto/divnode.cpp
+3
-1
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+6
-2
src/share/vm/runtime/dtraceJSDT.cpp
src/share/vm/runtime/dtraceJSDT.cpp
+5
-0
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+5
-1
src/share/vm/runtime/sharedRuntime.cpp
src/share/vm/runtime/sharedRuntime.cpp
+96
-80
src/share/vm/runtime/sharedRuntime.hpp
src/share/vm/runtime/sharedRuntime.hpp
+2
-1
test/compiler/6837011/Test6837011.java
test/compiler/6837011/Test6837011.java
+45
-0
未找到文件。
agent/src/os/linux/Makefile
浏览文件 @
ad40f981
...
@@ -60,6 +60,14 @@ ifndef LDNOMAP
...
@@ -60,6 +60,14 @@ ifndef LDNOMAP
LFLAGS_LIBSA
=
-Xlinker
--version-script
=
mapfile
LFLAGS_LIBSA
=
-Xlinker
--version-script
=
mapfile
endif
endif
# If this is a --hash-style=gnu system, use --hash-style=both
# The gnu .hash section won't work on some Linux systems like SuSE 10.
_HAS_HASH_STYLE_GNU
:=
$(
shell
$(CC)
-dumpspecs
|
grep
--
'--hash-style=gnu'
)
ifneq
($(_HAS_HASH_STYLE_GNU),)
LDFLAGS_HASH_STYLE
=
-Wl
,--hash-style
=
both
endif
LFLAGS_LIBSA
+=
$(LDFLAGS_HASH_STYLE)
$(LIBSA)
:
$(OBJS) mapfile
$(LIBSA)
:
$(OBJS) mapfile
if
[
!
-d
$(ARCH)
]
;
then
mkdir
$(ARCH)
;
fi
if
[
!
-d
$(ARCH)
]
;
then
mkdir
$(ARCH)
;
fi
$(GCC)
-shared
$(LFLAGS_LIBSA)
-o
$(LIBSA)
$(OBJS)
$(LIBS)
$(GCC)
-shared
$(LFLAGS_LIBSA)
-o
$(LIBSA)
$(OBJS)
$(LIBS)
...
...
agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java
浏览文件 @
ad40f981
...
@@ -306,8 +306,6 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
...
@@ -306,8 +306,6 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
entryAddr
=
entryAddr
.
addOffsetTo
(
intConstantEntryArrayStride
);
entryAddr
=
entryAddr
.
addOffsetTo
(
intConstantEntryArrayStride
);
}
while
(
nameAddr
!=
null
);
}
while
(
nameAddr
!=
null
);
String
symbol
=
"heapOopSize"
;
// global int constant and value is initialized at runtime.
addIntConstant
(
symbol
,
(
int
)
lookupInProcess
(
symbol
).
getCIntegerAt
(
0
,
4
,
false
));
}
}
private
void
readVMLongConstants
()
{
private
void
readVMLongConstants
()
{
...
...
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
浏览文件 @
ad40f981
...
@@ -318,11 +318,17 @@ public class VM {
...
@@ -318,11 +318,17 @@ public class VM {
logMinObjAlignmentInBytes
=
db
.
lookupIntConstant
(
"LogMinObjAlignmentInBytes"
).
intValue
();
logMinObjAlignmentInBytes
=
db
.
lookupIntConstant
(
"LogMinObjAlignmentInBytes"
).
intValue
();
heapWordSize
=
db
.
lookupIntConstant
(
"HeapWordSize"
).
intValue
();
heapWordSize
=
db
.
lookupIntConstant
(
"HeapWordSize"
).
intValue
();
oopSize
=
db
.
lookupIntConstant
(
"oopSize"
).
intValue
();
oopSize
=
db
.
lookupIntConstant
(
"oopSize"
).
intValue
();
heapOopSize
=
db
.
lookupIntConstant
(
"heapOopSize"
).
intValue
();
intxType
=
db
.
lookupType
(
"intx"
);
intxType
=
db
.
lookupType
(
"intx"
);
uintxType
=
db
.
lookupType
(
"uintx"
);
uintxType
=
db
.
lookupType
(
"uintx"
);
boolType
=
(
CIntegerType
)
db
.
lookupType
(
"bool"
);
boolType
=
(
CIntegerType
)
db
.
lookupType
(
"bool"
);
if
(
isCompressedOopsEnabled
())
{
// Size info for oops within java objects is fixed
heapOopSize
=
(
int
)
getIntSize
();
}
else
{
heapOopSize
=
(
int
)
getOopSize
();
}
}
}
/** This could be used by a reflective runtime system */
/** This could be used by a reflective runtime system */
...
@@ -343,13 +349,12 @@ public class VM {
...
@@ -343,13 +349,12 @@ public class VM {
}
}
soleInstance
=
new
VM
(
db
,
debugger
,
debugger
.
getMachineDescription
().
isBigEndian
());
soleInstance
=
new
VM
(
db
,
debugger
,
debugger
.
getMachineDescription
().
isBigEndian
());
debugger
.
putHeapConst
(
soleInstance
.
getHeapOopSize
(),
Universe
.
getNarrowOopBase
(),
Universe
.
getNarrowOopShift
());
for
(
Iterator
iter
=
vmInitializedObservers
.
iterator
();
iter
.
hasNext
();
)
{
for
(
Iterator
iter
=
vmInitializedObservers
.
iterator
();
iter
.
hasNext
();
)
{
((
Observer
)
iter
.
next
()).
update
(
null
,
null
);
((
Observer
)
iter
.
next
()).
update
(
null
,
null
);
}
}
debugger
.
putHeapConst
(
soleInstance
.
getHeapOopSize
(),
Universe
.
getNarrowOopBase
(),
Universe
.
getNarrowOopShift
());
}
}
/** This is used by the debugging system */
/** This is used by the debugging system */
...
...
make/jprt.config
已删除
100644 → 0
浏览文件 @
d8e174ba
#!echo "This is not a shell script"
#
# Copyright 2006-2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
#
#############################################################################
# Error
error
()
# message
{
echo
"ERROR: $1"
exit
6
}
# Directory must exist
dirMustExist
()
# dir name
{
if
[ ! -
d
"$1"
] ;
then
error
"Directory for $2 does not exist: $1"
fi
}
# File must exist
fileMustExist
()
# dir name
{
if
[ ! -
f
"$1"
] ;
then
error
"File for $2 does not exist: $1"
fi
}
#############################################################################
# Should be set by JPRT as the 3 basic inputs
bootdir
=
"${ALT_BOOTDIR}"
slashjava
=
"${ALT_SLASH_JAVA}"
jdk_import
=
"${ALT_JDK_IMPORT_PATH}"
# Check input
dirMustExist
"${bootdir}"
ALT_BOOTDIR
dirMustExist
"${slashjava}"
ALT_SLASH_JAVA
dirMustExist
"${jdk_import}"
ALT_JDK_IMPORT_PATH
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
osname
=`
uname
-
s
`
if
[
"${osname}"
=
SunOS
] ;
then
# SOLARIS: Sparc or X86
osarch
=`
uname
-
p
`
if
[
"${osarch}"
=
sparc
] ;
then
solaris_arch
=
sparc
else
solaris_arch
=
i386
fi
if
[
"${JPRT_SOLARIS_COMPILER_NAME}"
!=
""
] ;
then
compiler_name
=${
JPRT_SOLARIS_COMPILER_NAME
}
else
if
[
"${JPRT_JOB_PRODUCT_RELEASE}"
=
"jdk6"
-
o
\
"${JPRT_JOB_PRODUCT_RELEASE}"
=
"jdk6u10"
-
o
\
"${JPRT_JOB_PRODUCT_RELEASE}"
=
"jdk6u14"
-
o
\
"${JPRT_JOB_PRODUCT_RELEASE}"
=
"jdk6perf"
] ;
then
# All jdk6 builds use SS11
compiler_name
=
SS11
else
compiler_name
=
SS12
fi
fi
# Get into path (make sure it matches ALT setting)
compiler_path
=${
slashjava
}/
devtools
/${
solaris_arch
}/
SUNWspro
/${
compiler_name
}/
bin
dirMustExist
"${compiler_path}"
COMPILER_PATH
path4sdk
=${
compiler_path
}
# Add basic solaris system paths
path4sdk
=${
path4sdk
}:/
usr
/
ccs
/
bin
:/
usr
/
ccs
/
lib
:/
usr
/
bin
:/
bin
:/
usr
/
sfw
/
bin
# Get the previous JDK to be used to bootstrap the build
path4sdk
=${
bootdir
}/
bin
:${
path4sdk
}
# Find GNU make
make
=/
usr
/
sfw
/
bin
/
gmake
if
[ ! -
f
${
make
} ] ;
then
make
=/
opt
/
sfw
/
bin
/
gmake
if
[ ! -
f
${
make
} ] ;
then
make
=${
slashjava
}/
devtools
/${
solaris_arch
}/
bin
/
gnumake
fi
fi
fileMustExist
"${make}"
make
# File creation mask
umask
002
elif
[
"${osname}"
=
Linux
] ;
then
# LINUX: X86, AMD64
osarch
=`
uname
-
m
`
if
[
"${osarch}"
=
i686
] ;
then
linux_arch
=
i586
elif
[
"${osarch}"
=
x86_64
] ;
then
linux_arch
=
amd64
fi
# Get the compilers into path (make sure it matches ALT setting)
compiler_path
=/
usr
/
bin
dirMustExist
"${compiler_path}"
COMPILER_PATH
path4sdk
=${
compiler_path
}
# Add basic paths
path4sdk
=${
path4sdk
}:/
usr
/
bin
:/
bin
:/
usr
/
sbin
:/
sbin
# Get the previous JDK to be used to bootstrap the build
path4sdk
=${
bootdir
}/
bin
:${
path4sdk
}
# Find GNU make
make
=/
usr
/
bin
/
make
fileMustExist
"${make}"
make
umask
002
else
# Windows: Differs on CYGWIN vs. MKS, and the compiler available.
# Also, blanks in pathnames gives GNU make headaches, so anything placed
# in any ALT_* variable should be the short windows dosname.
# WINDOWS: Install and use MKS or CYGWIN (should have already been done)
# Assumption here is that you are in a shell window via MKS or cygwin.
# MKS install should have defined the environment variable ROOTDIR.
# We also need to figure out which one we have: X86, AMD64
if
[
"`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`"
!=
""
] ;
then
windows_arch
=
amd64
else
windows_arch
=
i586
fi
# We need to determine if we are running a CYGWIN shell or an MKS shell
# (if uname isn't available, then it will be unix_toolset=unknown)
unix_toolset
=
unknown
if
[
"`uname -a | fgrep Cygwin`"
=
""
-
a
-
d
"${ROOTDIR}"
] ;
then
# We kind of assume ROOTDIR is where MKS is and it's ok
unix_toolset
=
MKS
mkshome
=`
dosname
-
s
"${ROOTDIR}"
`
# Utility to convert to short pathnames without spaces
dosname
=
"${mkshome}/mksnt/dosname -s"
# Most unix utilities are in the mksnt directory of ROOTDIR
unixcommand_path
=
"${mkshome}/mksnt"
path4sdk
=
"${unixcommand_path}"
dirMustExist
"${unixcommand_path}"
UNIXCOMMAND_PATH
devtools_path
=
"${slashjava}/devtools/win32/bin"
path4sdk
=
"${devtools_path};${path4sdk}"
dirMustExist
"${devtools_path}"
DEVTOOLS_PATH
# Find GNU make
make
=
"${devtools_path}/gnumake.exe"
fileMustExist
"${make}"
make
elif
[
"`uname -a | fgrep Cygwin`"
!=
""
-
a
-
f
/
bin
/
cygpath
] ;
then
# For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
unix_toolset
=
CYGWIN
# Utility to convert to short pathnames without spaces
dosname
=
"/usr/bin/cygpath -a -m -s"
# Most unix utilities are in the /usr/bin
unixcommand_path
=
"/usr/bin"
path4sdk
=
"${unixcommand_path}"
dirMustExist
"${unixcommand_path}"
UNIXCOMMAND_PATH
# Find GNU make
make
=
"${unixcommand_path}/make.exe"
fileMustExist
"${make}"
make
else
echo
"WARNING: Cannot figure out if this is MKS or CYGWIN"
fi
# WINDOWS: Compiler setup (nasty part)
# NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
# NOTE: CYGWIN has a link.exe too, make sure the compilers are first
if
[
"${windows_arch}"
=
i586
] ;
then
# 32bit Windows compiler settings
# VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
vs_root
=`${
dosname
}
"${VS71COMNTOOLS}/../.."
`
# Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
vc7_root
=
"${vs_root}/Vc7"
compiler_path
=
"${vc7_root}/bin"
platform_sdk
=
"${vc7_root}/PlatformSDK"
# LIB and INCLUDE must use ; as a separator
include4sdk
=
"${vc7_root}/atlmfc/include"
include4sdk
=
"${include4sdk};${vc7_root}/include"
include4sdk
=
"${include4sdk};${platform_sdk}/include/prerelease"
include4sdk
=
"${include4sdk};${platform_sdk}/include"
include4sdk
=
"${include4sdk};${vs_root}/SDK/v1.1/include"
lib4sdk
=
"${vc7_root}/atlmfc/lib"
lib4sdk
=
"${lib4sdk};${vc7_root}/lib"
lib4sdk
=
"${lib4sdk};${platform_sdk}/lib/prerelease"
lib4sdk
=
"${lib4sdk};${platform_sdk}/lib"
lib4sdk
=
"${lib4sdk};${vs_root}/SDK/v1.1/lib"
# Search path and DLL locating path
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
path4sdk
=
"${vs_root}/Common7/Tools/bin;${path4sdk}"
path4sdk
=
"${vs_root}/SDK/v1.1/bin;${path4sdk}"
path4sdk
=
"${vs_root}/Common7/Tools;${path4sdk}"
path4sdk
=
"${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
path4sdk
=
"${vs_root}/Common7/IDE;${path4sdk}"
path4sdk
=
"${compiler_path};${path4sdk}"
elif
[
"${windows_arch}"
=
amd64
] ;
then
# AMD64 64bit Windows compiler settings
if
[
"${MSSDK}"
!=
""
] ;
then
platform_sdk
=
"${MSSDK}"
else
platform_sdk
=`${
dosname
}
"C:/Program Files/Microsoft Platform SDK/"
`
fi
compiler_path
=
"${platform_sdk}/Bin/win64/x86/AMD64"
# LIB and INCLUDE must use ; as a separator
include4sdk
=
"${platform_sdk}/Include"
include4sdk
=
"${include4sdk};${platform_sdk}/Include/crt/sys"
include4sdk
=
"${include4sdk};${platform_sdk}/Include/mfc"
include4sdk
=
"${include4sdk};${platform_sdk}/Include/atl"
include4sdk
=
"${include4sdk};${platform_sdk}/Include/crt"
lib4sdk
=
"${platform_sdk}/Lib/AMD64"
lib4sdk
=
"${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
# Search path and DLL locating path
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
path4sdk
=
"${platform_sdk}/bin;${path4sdk}"
path4sdk
=
"${compiler_path};${path4sdk}"
fi
# Export LIB and INCLUDE
unset
lib
unset
Lib
LIB
=
"${lib4sdk}"
export
LIB
unset
include
unset
Include
INCLUDE
=
"${include4sdk}"
export
INCLUDE
# Set the ALT variable
dirMustExist
"${compiler_path}"
COMPILER_PATH
# WINDOWS: Get the previous JDK to be used to bootstrap the build
path4sdk
=
"${bootdir}/bin;${path4sdk}"
# Turn all \\ into /, remove duplicates and trailing /
slash_path
=
"`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
# For windows, it's hard to know where the system is, so we just add this
# to PATH.
path4sdk
=
"${slash_path};${PATH}"
# Convert path4sdk to cygwin style
if
[
"${unix_toolset}"
=
CYGWIN
] ;
then
path4sdk
=
"`/usr/bin/cygpath -p ${path4sdk}`"
fi
fi
# Export PATH setting
PATH
=
"${path4sdk}"
export
PATH
# Unset certain vars
unset
LD_LIBRARY_PATH
unset
LD_LIBRARY_PATH_32
unset
LD_LIBRARY_PATH_64
make/jprt.properties
浏览文件 @
ad40f981
...
@@ -70,10 +70,33 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
...
@@ -70,10 +70,33 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
jprt.my.solaris.x64.jdk6u14
=
solaris_x64_5.10
jprt.my.solaris.x64.jdk6u14
=
solaris_x64_5.10
jprt.my.solaris.x64
=
${jprt.my.solaris.x64.${jprt.tools.default.release}}
jprt.my.solaris.x64
=
${jprt.my.solaris.x64.${jprt.tools.default.release}}
jprt.my.linux.i586
=
linux_i586
jprt.my.linux.i586.jdk7
=
linux_i586_2.6
jprt.my.linux.x64
=
linux_x64
jprt.my.linux.i586.jdk6
=
linux_i586_2.4
jprt.my.windows.i586
=
windows_i586
jprt.my.linux.i586.jdk6perf
=
linux_i586_2.4
jprt.my.windows.x64
=
windows_x64
jprt.my.linux.i586.jdk6u10
=
linux_i586_2.4
jprt.my.linux.i586.jdk6u14
=
linux_i586_2.4
jprt.my.linux.i586
=
${jprt.my.linux.i586.${jprt.tools.default.release}}
jprt.my.linux.x64.jdk7
=
linux_x64_2.6
jprt.my.linux.x64.jdk6
=
linux_x64_2.4
jprt.my.linux.x64.jdk6perf
=
linux_x64_2.4
jprt.my.linux.x64.jdk6u10
=
linux_x64_2.4
jprt.my.linux.x64.jdk6u14
=
linux_x64_2.4
jprt.my.linux.x64
=
${jprt.my.linux.x64.${jprt.tools.default.release}}
jprt.my.windows.i586.jdk7
=
windows_i586_5.0
jprt.my.windows.i586.jdk6
=
windows_i586_5.0
jprt.my.windows.i586.jdk6perf
=
windows_i586_5.0
jprt.my.windows.i586.jdk6u10
=
windows_i586_5.0
jprt.my.windows.i586.jdk6u14
=
windows_i586_5.0
jprt.my.windows.i586
=
${jprt.my.windows.i586.${jprt.tools.default.release}}
jprt.my.windows.x64.jdk7
=
windows_x64_5.2
jprt.my.windows.x64.jdk6
=
windows_x64_5.2
jprt.my.windows.x64.jdk6perf
=
windows_x64_5.2
jprt.my.windows.x64.jdk6u10
=
windows_x64_5.2
jprt.my.windows.x64.jdk6u14
=
windows_x64_5.2
jprt.my.windows.x64
=
${jprt.my.windows.x64.${jprt.tools.default.release}}
# Standard list of jprt build targets for this source tree
# Standard list of jprt build targets for this source tree
...
...
make/linux/makefiles/gcc.make
浏览文件 @
ad40f981
...
@@ -113,6 +113,11 @@ endif
...
@@ -113,6 +113,11 @@ endif
OPT_CFLAGS/
NOOPT
=
-O0
OPT_CFLAGS/
NOOPT
=
-O0
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
ifneq
"$(shell expr \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) = 3 \) \))" "0"
OPT_CFLAGS/
mulnode.o
+=
-O0
endif
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# Linker flags
# Linker flags
...
...
make/linux/makefiles/jsig.make
浏览文件 @
ad40f981
...
@@ -39,7 +39,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
...
@@ -39,7 +39,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
# cause problems with interposing. See CR: 6466665
# cause problems with interposing. See CR: 6466665
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
LFLAGS_JSIG
+=
-D_GNU_SOURCE
-D_REENTRANT
LFLAGS_JSIG
+=
-D_GNU_SOURCE
-D_REENTRANT
$(LDFLAGS_HASH_STYLE)
$(LIBJSIG)
:
$(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
$(LIBJSIG)
:
$(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@
echo
Making signal interposition lib...
@
echo
Making signal interposition lib...
...
...
make/linux/makefiles/saproc.make
浏览文件 @
ad40f981
...
@@ -51,7 +51,7 @@ checkAndBuildSA:
...
@@ -51,7 +51,7 @@ checkAndBuildSA:
$(MAKE)
-f
vm.make
$(LIBSAPROC)
;
\
$(MAKE)
-f
vm.make
$(LIBSAPROC)
;
\
fi
fi
SA_LFLAGS
=
$
(
MAPFLAG:FILENAME
=
$(SAMAPFILE)
)
SA_LFLAGS
=
$
(
MAPFLAG:FILENAME
=
$(SAMAPFILE)
)
$(LDFLAGS_HASH_STYLE)
$(LIBSAPROC)
:
$(SASRCFILES) $(SAMAPFILE)
$(LIBSAPROC)
:
$(SASRCFILES) $(SAMAPFILE)
$(QUIETLY)
if
[
"
$(BOOT_JAVA_HOME)
"
=
""
]
;
then
\
$(QUIETLY)
if
[
"
$(BOOT_JAVA_HOME)
"
=
""
]
;
then
\
...
...
src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp
浏览文件 @
ad40f981
...
@@ -53,7 +53,9 @@ void ConcurrentG1RefineThread::traversalBasedRefinement() {
...
@@ -53,7 +53,9 @@ void ConcurrentG1RefineThread::traversalBasedRefinement() {
ResourceMark
rm
;
ResourceMark
rm
;
HandleMark
hm
;
HandleMark
hm
;
if
(
TraceG1Refine
)
gclog_or_tty
->
print_cr
(
"G1-Refine starting pass"
);
if
(
G1TraceConcurrentRefinement
)
{
gclog_or_tty
->
print_cr
(
"G1-Refine starting pass"
);
}
_sts
.
join
();
_sts
.
join
();
bool
no_sleep
=
_cg1r
->
refine
();
bool
no_sleep
=
_cg1r
->
refine
();
_sts
.
leave
();
_sts
.
leave
();
...
@@ -207,9 +209,9 @@ void ConcurrentG1RefineThread::run() {
...
@@ -207,9 +209,9 @@ void ConcurrentG1RefineThread::run() {
void
ConcurrentG1RefineThread
::
yield
()
{
void
ConcurrentG1RefineThread
::
yield
()
{
if
(
TraceG1Refine
)
gclog_or_tty
->
print_cr
(
"G1-Refine-yield"
);
if
(
G1TraceConcurrentRefinement
)
gclog_or_tty
->
print_cr
(
"G1-Refine-yield"
);
_sts
.
yield
(
"G1 refine"
);
_sts
.
yield
(
"G1 refine"
);
if
(
TraceG1Refine
)
gclog_or_tty
->
print_cr
(
"G1-Refine-yield-end"
);
if
(
G1TraceConcurrentRefinement
)
gclog_or_tty
->
print_cr
(
"G1-Refine-yield-end"
);
}
}
void
ConcurrentG1RefineThread
::
stop
()
{
void
ConcurrentG1RefineThread
::
stop
()
{
...
@@ -230,7 +232,7 @@ void ConcurrentG1RefineThread::stop() {
...
@@ -230,7 +232,7 @@ void ConcurrentG1RefineThread::stop() {
Terminator_lock
->
wait
();
Terminator_lock
->
wait
();
}
}
}
}
if
(
TraceG1Refine
)
gclog_or_tty
->
print_cr
(
"G1-Refine-stop"
);
if
(
G1TraceConcurrentRefinement
)
gclog_or_tty
->
print_cr
(
"G1-Refine-stop"
);
}
}
void
ConcurrentG1RefineThread
::
print
()
{
void
ConcurrentG1RefineThread
::
print
()
{
...
...
src/share/vm/gc_implementation/g1/concurrentMark.cpp
浏览文件 @
ad40f981
...
@@ -448,8 +448,8 @@ ConcurrentMark::ConcurrentMark(ReservedSpace rs,
...
@@ -448,8 +448,8 @@ ConcurrentMark::ConcurrentMark(ReservedSpace rs,
gclog_or_tty
->
print_cr
(
"[global] init, heap start = "
PTR_FORMAT
", "
gclog_or_tty
->
print_cr
(
"[global] init, heap start = "
PTR_FORMAT
", "
"heap end = "
PTR_FORMAT
,
_heap_start
,
_heap_end
);
"heap end = "
PTR_FORMAT
,
_heap_start
,
_heap_end
);
_markStack
.
allocate
(
G1
CM
StackSize
);
_markStack
.
allocate
(
G1
Mark
StackSize
);
_regionStack
.
allocate
(
G1
CM
RegionStackSize
);
_regionStack
.
allocate
(
G1
Mark
RegionStackSize
);
// Create & start a ConcurrentMark thread.
// Create & start a ConcurrentMark thread.
if
(
G1ConcMark
)
{
if
(
G1ConcMark
)
{
...
@@ -499,20 +499,21 @@ ConcurrentMark::ConcurrentMark(ReservedSpace rs,
...
@@ -499,20 +499,21 @@ ConcurrentMark::ConcurrentMark(ReservedSpace rs,
_marking_task_overhead
=
1.0
;
_marking_task_overhead
=
1.0
;
}
else
{
}
else
{
if
(
ParallelMarkingThreads
>
0
)
{
if
(
ParallelMarkingThreads
>
0
)
{
// notice that ParallelMarkingThreads overwrites G1MarkingOverheadPerc
// notice that ParallelMarkingThreads overwrites G1MarkingOverheadPerc
ent
// if both are set
// if both are set
_parallel_marking_threads
=
ParallelMarkingThreads
;
_parallel_marking_threads
=
ParallelMarkingThreads
;
_sleep_factor
=
0.0
;
_sleep_factor
=
0.0
;
_marking_task_overhead
=
1.0
;
_marking_task_overhead
=
1.0
;
}
else
if
(
G1MarkingOverheadPerc
>
0
)
{
}
else
if
(
G1MarkingOverheadPerc
ent
>
0
)
{
// we will calculate the number of parallel marking threads
// we will calculate the number of parallel marking threads
// based on a target overhead with respect to the soft real-time
// based on a target overhead with respect to the soft real-time
// goal
// goal
double
marking_overhead
=
(
double
)
G1MarkingOverheadPerc
/
100.0
;
double
marking_overhead
=
(
double
)
G1MarkingOverheadPerc
ent
/
100.0
;
double
overall_cm_overhead
=
double
overall_cm_overhead
=
(
double
)
G1MaxPauseTimeMS
*
marking_overhead
/
(
double
)
G1TimeSliceMS
;
(
double
)
MaxGCPauseMillis
*
marking_overhead
/
(
double
)
GCPauseIntervalMillis
;
double
cpu_ratio
=
1.0
/
(
double
)
os
::
processor_count
();
double
cpu_ratio
=
1.0
/
(
double
)
os
::
processor_count
();
double
marking_thread_num
=
ceil
(
overall_cm_overhead
/
cpu_ratio
);
double
marking_thread_num
=
ceil
(
overall_cm_overhead
/
cpu_ratio
);
double
marking_task_overhead
=
double
marking_task_overhead
=
...
@@ -1747,7 +1748,7 @@ void ConcurrentMark::cleanup() {
...
@@ -1747,7 +1748,7 @@ void ConcurrentMark::cleanup() {
g1h
->
increment_total_collections
();
g1h
->
increment_total_collections
();
#ifndef PRODUCT
#ifndef PRODUCT
if
(
G1VerifyConcMark
)
{
if
(
VerifyDuringGC
)
{
G1CollectedHeap
::
heap
()
->
prepare_for_verify
();
G1CollectedHeap
::
heap
()
->
prepare_for_verify
();
G1CollectedHeap
::
heap
()
->
verify
(
true
,
false
);
G1CollectedHeap
::
heap
()
->
verify
(
true
,
false
);
}
}
...
...
src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
浏览文件 @
ad40f981
...
@@ -136,9 +136,6 @@ void ConcurrentMarkThread::run() {
...
@@ -136,9 +136,6 @@ void ConcurrentMarkThread::run() {
iter
++
;
iter
++
;
if
(
!
cm
()
->
has_aborted
())
{
if
(
!
cm
()
->
has_aborted
())
{
_cm
->
markFromRoots
();
_cm
->
markFromRoots
();
}
else
{
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-skip-mark-from-roots"
);
}
}
double
mark_end_time
=
os
::
elapsedVTime
();
double
mark_end_time
=
os
::
elapsedVTime
();
...
@@ -163,9 +160,6 @@ void ConcurrentMarkThread::run() {
...
@@ -163,9 +160,6 @@ void ConcurrentMarkThread::run() {
sprintf
(
verbose_str
,
"GC remark"
);
sprintf
(
verbose_str
,
"GC remark"
);
VM_CGC_Operation
op
(
&
final_cl
,
verbose_str
);
VM_CGC_Operation
op
(
&
final_cl
,
verbose_str
);
VMThread
::
execute
(
&
op
);
VMThread
::
execute
(
&
op
);
}
else
{
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-skip-remark"
);
}
}
if
(
cm
()
->
restart_for_overflow
()
&&
if
(
cm
()
->
restart_for_overflow
()
&&
G1TraceMarkStackOverflow
)
{
G1TraceMarkStackOverflow
)
{
...
@@ -208,8 +202,6 @@ void ConcurrentMarkThread::run() {
...
@@ -208,8 +202,6 @@ void ConcurrentMarkThread::run() {
count_end_sec
-
count_start_sec
);
count_end_sec
-
count_start_sec
);
}
}
}
}
}
else
{
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-skip-end-game"
);
}
}
double
end_time
=
os
::
elapsedVTime
();
double
end_time
=
os
::
elapsedVTime
();
_vtime_count_accum
+=
(
end_time
-
counting_start_time
);
_vtime_count_accum
+=
(
end_time
-
counting_start_time
);
...
@@ -230,7 +222,6 @@ void ConcurrentMarkThread::run() {
...
@@ -230,7 +222,6 @@ void ConcurrentMarkThread::run() {
VM_CGC_Operation
op
(
&
cl_cl
,
verbose_str
);
VM_CGC_Operation
op
(
&
cl_cl
,
verbose_str
);
VMThread
::
execute
(
&
op
);
VMThread
::
execute
(
&
op
);
}
else
{
}
else
{
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-skip-cleanup"
);
G1CollectedHeap
::
heap
()
->
set_marking_complete
();
G1CollectedHeap
::
heap
()
->
set_marking_complete
();
}
}
...
@@ -287,9 +278,7 @@ void ConcurrentMarkThread::run() {
...
@@ -287,9 +278,7 @@ void ConcurrentMarkThread::run() {
void
ConcurrentMarkThread
::
yield
()
{
void
ConcurrentMarkThread
::
yield
()
{
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-yield"
);
_sts
.
yield
(
"Concurrent Mark"
);
_sts
.
yield
(
"Concurrent Mark"
);
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-yield-end"
);
}
}
void
ConcurrentMarkThread
::
stop
()
{
void
ConcurrentMarkThread
::
stop
()
{
...
@@ -299,7 +288,6 @@ void ConcurrentMarkThread::stop() {
...
@@ -299,7 +288,6 @@ void ConcurrentMarkThread::stop() {
while
(
!
_has_terminated
)
{
while
(
!
_has_terminated
)
{
Terminator_lock
->
wait
();
Terminator_lock
->
wait
();
}
}
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-stop"
);
}
}
void
ConcurrentMarkThread
::
print
()
{
void
ConcurrentMarkThread
::
print
()
{
...
@@ -314,12 +302,10 @@ void ConcurrentMarkThread::sleepBeforeNextCycle() {
...
@@ -314,12 +302,10 @@ void ConcurrentMarkThread::sleepBeforeNextCycle() {
// below while the world is otherwise stopped.
// below while the world is otherwise stopped.
MutexLockerEx
x
(
CGC_lock
,
Mutex
::
_no_safepoint_check_flag
);
MutexLockerEx
x
(
CGC_lock
,
Mutex
::
_no_safepoint_check_flag
);
while
(
!
started
())
{
while
(
!
started
())
{
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-sleeping"
);
CGC_lock
->
wait
(
Mutex
::
_no_safepoint_check_flag
);
CGC_lock
->
wait
(
Mutex
::
_no_safepoint_check_flag
);
}
}
set_in_progress
();
set_in_progress
();
clear_started
();
clear_started
();
if
(
TraceConcurrentMark
)
gclog_or_tty
->
print_cr
(
"CM-starting"
);
}
}
// Note: this method, although exported by the ConcurrentMarkSweepThread,
// Note: this method, although exported by the ConcurrentMarkSweepThread,
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
ad40f981
...
@@ -528,7 +528,7 @@ HeapRegion* G1CollectedHeap::newAllocRegion_work(size_t word_size,
...
@@ -528,7 +528,7 @@ HeapRegion* G1CollectedHeap::newAllocRegion_work(size_t word_size,
res
->
zero_fill_state
()
==
HeapRegion
::
Allocated
)),
res
->
zero_fill_state
()
==
HeapRegion
::
Allocated
)),
"Non-young alloc Regions must be zero filled (and non-H)"
);
"Non-young alloc Regions must be zero filled (and non-H)"
);
if
(
G1
Trace
Regions
)
{
if
(
G1
Print
Regions
)
{
if
(
res
!=
NULL
)
{
if
(
res
!=
NULL
)
{
gclog_or_tty
->
print_cr
(
"new alloc region %d:["
PTR_FORMAT
", "
PTR_FORMAT
"], "
gclog_or_tty
->
print_cr
(
"new alloc region %d:["
PTR_FORMAT
", "
PTR_FORMAT
"], "
"top "
PTR_FORMAT
,
"top "
PTR_FORMAT
,
...
@@ -2282,13 +2282,13 @@ void G1CollectedHeap::print_tracing_info() const {
...
@@ -2282,13 +2282,13 @@ void G1CollectedHeap::print_tracing_info() const {
// to that.
// to that.
g1_policy
()
->
print_tracing_info
();
g1_policy
()
->
print_tracing_info
();
}
}
if
(
SummarizeG1RS
Stats
)
{
if
(
G1SummarizeRSet
Stats
)
{
g1_rem_set
()
->
print_summary_info
();
g1_rem_set
()
->
print_summary_info
();
}
}
if
(
SummarizeG1Conc
Mark
)
{
if
(
G1SummarizeConcurrent
Mark
)
{
concurrent_mark
()
->
print_summary_info
();
concurrent_mark
()
->
print_summary_info
();
}
}
if
(
SummarizeG1
ZFStats
)
{
if
(
G1Summarize
ZFStats
)
{
ConcurrentZFThread
::
print_summary_info
();
ConcurrentZFThread
::
print_summary_info
();
}
}
g1_policy
()
->
print_yg_surv_rate_info
();
g1_policy
()
->
print_yg_surv_rate_info
();
...
@@ -3255,7 +3255,7 @@ void G1CollectedHeap::handle_evacuation_failure_common(oop old, markOop m) {
...
@@ -3255,7 +3255,7 @@ void G1CollectedHeap::handle_evacuation_failure_common(oop old, markOop m) {
HeapRegion
*
r
=
heap_region_containing
(
old
);
HeapRegion
*
r
=
heap_region_containing
(
old
);
if
(
!
r
->
evacuation_failed
())
{
if
(
!
r
->
evacuation_failed
())
{
r
->
set_evacuation_failed
(
true
);
r
->
set_evacuation_failed
(
true
);
if
(
G1
Trace
Regions
)
{
if
(
G1
Print
Regions
)
{
gclog_or_tty
->
print
(
"evacuation failed in heap region "
PTR_FORMAT
" "
gclog_or_tty
->
print
(
"evacuation failed in heap region "
PTR_FORMAT
" "
"["
PTR_FORMAT
","
PTR_FORMAT
")
\n
"
,
"["
PTR_FORMAT
","
PTR_FORMAT
")
\n
"
,
r
,
r
->
bottom
(),
r
->
end
());
r
,
r
->
bottom
(),
r
->
end
());
...
@@ -3466,7 +3466,7 @@ private:
...
@@ -3466,7 +3466,7 @@ private:
}
}
static
size_t
gclab_word_size
()
{
static
size_t
gclab_word_size
()
{
return
ParallelGCG1
AllocBufferSize
/
HeapWordSize
;
return
G1ParallelGC
AllocBufferSize
/
HeapWordSize
;
}
}
static
size_t
bitmap_size_in_bits
()
{
static
size_t
bitmap_size_in_bits
()
{
...
@@ -3616,7 +3616,7 @@ private:
...
@@ -3616,7 +3616,7 @@ private:
public:
public:
G1ParGCAllocBuffer
()
:
G1ParGCAllocBuffer
()
:
ParGCAllocBuffer
(
ParallelGCG1
AllocBufferSize
/
HeapWordSize
),
ParGCAllocBuffer
(
G1ParallelGC
AllocBufferSize
/
HeapWordSize
),
_during_marking
(
G1CollectedHeap
::
heap
()
->
mark_in_progress
()),
_during_marking
(
G1CollectedHeap
::
heap
()
->
mark_in_progress
()),
_bitmap
(
G1CollectedHeap
::
heap
()
->
reserved_region
().
start
()),
_bitmap
(
G1CollectedHeap
::
heap
()
->
reserved_region
().
start
()),
_retired
(
false
)
_retired
(
false
)
...
@@ -3812,14 +3812,14 @@ public:
...
@@ -3812,14 +3812,14 @@ public:
HeapWord
*
obj
=
NULL
;
HeapWord
*
obj
=
NULL
;
if
(
word_sz
*
100
<
if
(
word_sz
*
100
<
(
size_t
)(
ParallelGCG1
AllocBufferSize
/
HeapWordSize
)
*
(
size_t
)(
G1ParallelGC
AllocBufferSize
/
HeapWordSize
)
*
ParallelGCBufferWastePct
)
{
ParallelGCBufferWastePct
)
{
G1ParGCAllocBuffer
*
alloc_buf
=
alloc_buffer
(
purpose
);
G1ParGCAllocBuffer
*
alloc_buf
=
alloc_buffer
(
purpose
);
add_to_alloc_buffer_waste
(
alloc_buf
->
words_remaining
());
add_to_alloc_buffer_waste
(
alloc_buf
->
words_remaining
());
alloc_buf
->
retire
(
false
,
false
);
alloc_buf
->
retire
(
false
,
false
);
HeapWord
*
buf
=
HeapWord
*
buf
=
_g1h
->
par_allocate_during_gc
(
purpose
,
ParallelGCG1
AllocBufferSize
/
HeapWordSize
);
_g1h
->
par_allocate_during_gc
(
purpose
,
G1ParallelGC
AllocBufferSize
/
HeapWordSize
);
if
(
buf
==
NULL
)
return
NULL
;
// Let caller handle allocation failure.
if
(
buf
==
NULL
)
return
NULL
;
// Let caller handle allocation failure.
// Otherwise.
// Otherwise.
alloc_buf
->
set_buf
(
buf
);
alloc_buf
->
set_buf
(
buf
);
...
@@ -4331,7 +4331,7 @@ public:
...
@@ -4331,7 +4331,7 @@ public:
_g1h
->
g1_policy
()
->
record_obj_copy_time
(
i
,
elapsed_ms
-
term_ms
);
_g1h
->
g1_policy
()
->
record_obj_copy_time
(
i
,
elapsed_ms
-
term_ms
);
_g1h
->
g1_policy
()
->
record_termination_time
(
i
,
term_ms
);
_g1h
->
g1_policy
()
->
record_termination_time
(
i
,
term_ms
);
}
}
if
(
G1UseSurvivorSpace
)
{
if
(
G1UseSurvivorSpace
s
)
{
_g1h
->
g1_policy
()
->
record_thread_age_table
(
pss
.
age_table
());
_g1h
->
g1_policy
()
->
record_thread_age_table
(
pss
.
age_table
());
}
}
_g1h
->
update_surviving_young_words
(
pss
.
surviving_young_words
()
+
1
);
_g1h
->
update_surviving_young_words
(
pss
.
surviving_young_words
()
+
1
);
...
@@ -4435,28 +4435,6 @@ g1_process_strong_roots(bool collecting_perm_gen,
...
@@ -4435,28 +4435,6 @@ g1_process_strong_roots(bool collecting_perm_gen,
// XXX What should this be doing in the parallel case?
// XXX What should this be doing in the parallel case?
g1_policy
()
->
record_collection_pause_end_CH_strong_roots
();
g1_policy
()
->
record_collection_pause_end_CH_strong_roots
();
if
(
G1VerifyRemSet
)
{
// :::: FIXME ::::
// The stupid remembered set doesn't know how to filter out dead
// objects, which the smart one does, and so when it is created
// and then compared the number of entries in each differs and
// the verification code fails.
guarantee
(
false
,
"verification code is broken, see note"
);
// Let's make sure that the current rem set agrees with the stupidest
// one possible!
bool
refs_enabled
=
ref_processor
()
->
discovery_enabled
();
if
(
refs_enabled
)
ref_processor
()
->
disable_discovery
();
StupidG1RemSet
stupid
(
this
);
count_closure
.
n
=
0
;
stupid
.
oops_into_collection_set_do
(
&
count_closure
,
worker_i
);
int
stupid_n
=
count_closure
.
n
;
count_closure
.
n
=
0
;
g1_rem_set
()
->
oops_into_collection_set_do
(
&
count_closure
,
worker_i
);
guarantee
(
count_closure
.
n
==
stupid_n
,
"Old and new rem sets differ."
);
gclog_or_tty
->
print_cr
(
"
\n
Found %d pointers in heap RS."
,
count_closure
.
n
);
if
(
refs_enabled
)
ref_processor
()
->
enable_discovery
();
}
if
(
scan_so
!=
NULL
)
{
if
(
scan_so
!=
NULL
)
{
scan_scan_only_set
(
scan_so
,
worker_i
);
scan_scan_only_set
(
scan_so
,
worker_i
);
}
}
...
...
src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
浏览文件 @
ad40f981
...
@@ -37,8 +37,9 @@ G1CollectedHeap::heap_region_containing(const void* addr) const {
...
@@ -37,8 +37,9 @@ G1CollectedHeap::heap_region_containing(const void* addr) const {
inline
HeapRegion
*
inline
HeapRegion
*
G1CollectedHeap
::
heap_region_containing_raw
(
const
void
*
addr
)
const
{
G1CollectedHeap
::
heap_region_containing_raw
(
const
void
*
addr
)
const
{
assert
(
_g1_reserved
.
contains
(
addr
),
"invariant"
);
assert
(
_g1_reserved
.
contains
(
addr
),
"invariant"
);
size_t
index
=
((
intptr_t
)
addr
-
(
intptr_t
)
_g1_reserved
.
start
())
size_t
index
=
pointer_delta
(
addr
,
_g1_reserved
.
start
(),
1
)
>>
HeapRegion
::
LogOfHRGrainBytes
;
>>
HeapRegion
::
LogOfHRGrainBytes
;
HeapRegion
*
res
=
_hrs
->
at
(
index
);
HeapRegion
*
res
=
_hrs
->
at
(
index
);
assert
(
res
==
_hrs
->
addr_to_region
(
addr
),
"sanity"
);
assert
(
res
==
_hrs
->
addr_to_region
(
addr
),
"sanity"
);
return
res
;
return
res
;
...
...
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
浏览文件 @
ad40f981
...
@@ -136,7 +136,7 @@ G1CollectorPolicy::G1CollectorPolicy() :
...
@@ -136,7 +136,7 @@ G1CollectorPolicy::G1CollectorPolicy() :
_scanned_cards_seq
(
new
TruncatedSeq
(
TruncatedSeqLength
)),
_scanned_cards_seq
(
new
TruncatedSeq
(
TruncatedSeqLength
)),
_rs_lengths_seq
(
new
TruncatedSeq
(
TruncatedSeqLength
)),
_rs_lengths_seq
(
new
TruncatedSeq
(
TruncatedSeqLength
)),
_pause_time_target_ms
((
double
)
G1MaxPauseTimeMS
),
_pause_time_target_ms
((
double
)
MaxGCPauseMillis
),
// </NEW PREDICTION>
// </NEW PREDICTION>
...
@@ -220,7 +220,7 @@ G1CollectorPolicy::G1CollectorPolicy() :
...
@@ -220,7 +220,7 @@ G1CollectorPolicy::G1CollectorPolicy() :
_par_last_termination_times_ms
=
new
double
[
_parallel_gc_threads
];
_par_last_termination_times_ms
=
new
double
[
_parallel_gc_threads
];
// start conservatively
// start conservatively
_expensive_region_limit_ms
=
0.5
*
(
double
)
G1MaxPauseTimeMS
;
_expensive_region_limit_ms
=
0.5
*
(
double
)
MaxGCPauseMillis
;
// <NEW PREDICTION>
// <NEW PREDICTION>
...
@@ -249,12 +249,12 @@ G1CollectorPolicy::G1CollectorPolicy() :
...
@@ -249,12 +249,12 @@ G1CollectorPolicy::G1CollectorPolicy() :
// </NEW PREDICTION>
// </NEW PREDICTION>
double
time_slice
=
(
double
)
G
1TimeSliceMS
/
1000.0
;
double
time_slice
=
(
double
)
G
CPauseIntervalMillis
/
1000.0
;
double
max_gc_time
=
(
double
)
G1MaxPauseTimeMS
/
1000.0
;
double
max_gc_time
=
(
double
)
MaxGCPauseMillis
/
1000.0
;
guarantee
(
max_gc_time
<
time_slice
,
guarantee
(
max_gc_time
<
time_slice
,
"Max GC time should not be greater than the time slice"
);
"Max GC time should not be greater than the time slice"
);
_mmu_tracker
=
new
G1MMUTrackerQueue
(
time_slice
,
max_gc_time
);
_mmu_tracker
=
new
G1MMUTrackerQueue
(
time_slice
,
max_gc_time
);
_sigma
=
(
double
)
G1ConfidencePerc
/
100.0
;
_sigma
=
(
double
)
G1ConfidencePerc
ent
/
100.0
;
// start conservatively (around 50ms is about right)
// start conservatively (around 50ms is about right)
_concurrent_mark_init_times_ms
->
add
(
0.05
);
_concurrent_mark_init_times_ms
->
add
(
0.05
);
...
@@ -262,7 +262,7 @@ G1CollectorPolicy::G1CollectorPolicy() :
...
@@ -262,7 +262,7 @@ G1CollectorPolicy::G1CollectorPolicy() :
_concurrent_mark_cleanup_times_ms
->
add
(
0.20
);
_concurrent_mark_cleanup_times_ms
->
add
(
0.20
);
_tenuring_threshold
=
MaxTenuringThreshold
;
_tenuring_threshold
=
MaxTenuringThreshold
;
if
(
G1UseSurvivorSpace
)
{
if
(
G1UseSurvivorSpace
s
)
{
// if G1FixedSurvivorSpaceSize is 0 which means the size is not
// if G1FixedSurvivorSpaceSize is 0 which means the size is not
// fixed, then _max_survivor_regions will be calculated at
// fixed, then _max_survivor_regions will be calculated at
// calculate_young_list_target_config during initialization
// calculate_young_list_target_config during initialization
...
@@ -451,7 +451,7 @@ void G1CollectorPolicy::calculate_young_list_target_config(size_t rs_lengths) {
...
@@ -451,7 +451,7 @@ void G1CollectorPolicy::calculate_young_list_target_config(size_t rs_lengths) {
guarantee
(
adaptive_young_list_length
(),
"pre-condition"
);
guarantee
(
adaptive_young_list_length
(),
"pre-condition"
);
double
start_time_sec
=
os
::
elapsedTime
();
double
start_time_sec
=
os
::
elapsedTime
();
size_t
min_reserve_perc
=
MAX2
((
size_t
)
2
,
(
size_t
)
G1MinReservePerc
);
size_t
min_reserve_perc
=
MAX2
((
size_t
)
2
,
(
size_t
)
G1MinReservePerc
ent
);
min_reserve_perc
=
MIN2
((
size_t
)
50
,
min_reserve_perc
);
min_reserve_perc
=
MIN2
((
size_t
)
50
,
min_reserve_perc
);
size_t
reserve_regions
=
size_t
reserve_regions
=
(
size_t
)
((
double
)
min_reserve_perc
*
(
double
)
_g1
->
n_regions
()
/
100.0
);
(
size_t
)
((
double
)
min_reserve_perc
*
(
double
)
_g1
->
n_regions
()
/
100.0
);
...
@@ -1109,7 +1109,7 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec,
...
@@ -1109,7 +1109,7 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec,
_short_lived_surv_rate_group
->
record_scan_only_prefix
(
short_lived_so_length
);
_short_lived_surv_rate_group
->
record_scan_only_prefix
(
short_lived_so_length
);
tag_scan_only
(
short_lived_so_length
);
tag_scan_only
(
short_lived_so_length
);
if
(
G1UseSurvivorSpace
)
{
if
(
G1UseSurvivorSpace
s
)
{
_survivors_age_table
.
clear
();
_survivors_age_table
.
clear
();
}
}
...
@@ -1826,11 +1826,11 @@ void G1CollectorPolicy::record_collection_pause_end(bool abandoned) {
...
@@ -1826,11 +1826,11 @@ void G1CollectorPolicy::record_collection_pause_end(bool abandoned) {
_rs_lengths_seq
->
add
((
double
)
_max_rs_lengths
);
_rs_lengths_seq
->
add
((
double
)
_max_rs_lengths
);
double
expensive_region_limit_ms
=
double
expensive_region_limit_ms
=
(
double
)
G1MaxPauseTimeMS
-
predict_constant_other_time_ms
();
(
double
)
MaxGCPauseMillis
-
predict_constant_other_time_ms
();
if
(
expensive_region_limit_ms
<
0.0
)
{
if
(
expensive_region_limit_ms
<
0.0
)
{
// this means that the other time was predicted to be longer than
// this means that the other time was predicted to be longer than
// than the max pause time
// than the max pause time
expensive_region_limit_ms
=
(
double
)
G1MaxPauseTimeMS
;
expensive_region_limit_ms
=
(
double
)
MaxGCPauseMillis
;
}
}
_expensive_region_limit_ms
=
expensive_region_limit_ms
;
_expensive_region_limit_ms
=
expensive_region_limit_ms
;
...
@@ -2093,24 +2093,24 @@ void G1CollectorPolicy::update_recent_gc_times(double end_time_sec,
...
@@ -2093,24 +2093,24 @@ void G1CollectorPolicy::update_recent_gc_times(double end_time_sec,
}
}
double
G1CollectorPolicy
::
recent_avg_time_for_pauses_ms
()
{
double
G1CollectorPolicy
::
recent_avg_time_for_pauses_ms
()
{
if
(
_recent_pause_times_ms
->
num
()
==
0
)
return
(
double
)
G1MaxPauseTimeMS
;
if
(
_recent_pause_times_ms
->
num
()
==
0
)
return
(
double
)
MaxGCPauseMillis
;
else
return
_recent_pause_times_ms
->
avg
();
else
return
_recent_pause_times_ms
->
avg
();
}
}
double
G1CollectorPolicy
::
recent_avg_time_for_CH_strong_ms
()
{
double
G1CollectorPolicy
::
recent_avg_time_for_CH_strong_ms
()
{
if
(
_recent_CH_strong_roots_times_ms
->
num
()
==
0
)
if
(
_recent_CH_strong_roots_times_ms
->
num
()
==
0
)
return
(
double
)
G1MaxPauseTimeMS
/
3.0
;
return
(
double
)
MaxGCPauseMillis
/
3.0
;
else
return
_recent_CH_strong_roots_times_ms
->
avg
();
else
return
_recent_CH_strong_roots_times_ms
->
avg
();
}
}
double
G1CollectorPolicy
::
recent_avg_time_for_G1_strong_ms
()
{
double
G1CollectorPolicy
::
recent_avg_time_for_G1_strong_ms
()
{
if
(
_recent_G1_strong_roots_times_ms
->
num
()
==
0
)
if
(
_recent_G1_strong_roots_times_ms
->
num
()
==
0
)
return
(
double
)
G1MaxPauseTimeMS
/
3.0
;
return
(
double
)
MaxGCPauseMillis
/
3.0
;
else
return
_recent_G1_strong_roots_times_ms
->
avg
();
else
return
_recent_G1_strong_roots_times_ms
->
avg
();
}
}
double
G1CollectorPolicy
::
recent_avg_time_for_evac_ms
()
{
double
G1CollectorPolicy
::
recent_avg_time_for_evac_ms
()
{
if
(
_recent_evac_times_ms
->
num
()
==
0
)
return
(
double
)
G1MaxPauseTimeMS
/
3.0
;
if
(
_recent_evac_times_ms
->
num
()
==
0
)
return
(
double
)
MaxGCPauseMillis
/
3.0
;
else
return
_recent_evac_times_ms
->
avg
();
else
return
_recent_evac_times_ms
->
avg
();
}
}
...
@@ -2197,17 +2197,18 @@ G1CollectorPolicy::conservative_avg_survival_fraction_work(double avg,
...
@@ -2197,17 +2197,18 @@ G1CollectorPolicy::conservative_avg_survival_fraction_work(double avg,
}
}
size_t
G1CollectorPolicy
::
expansion_amount
()
{
size_t
G1CollectorPolicy
::
expansion_amount
()
{
if
((
int
)(
recent_avg_pause_time_ratio
()
*
100.0
)
>
G1GCPct
)
{
if
((
int
)(
recent_avg_pause_time_ratio
()
*
100.0
)
>
G1GCPercent
)
{
// We will double the existing space, or take G1ExpandByPctOfAvail % of
// We will double the existing space, or take
// the available expansion space, whichever is smaller, bounded below
// G1ExpandByPercentOfAvailable % of the available expansion
// by a minimum expansion (unless that's all that's left.)
// space, whichever is smaller, bounded below by a minimum
// expansion (unless that's all that's left.)
const
size_t
min_expand_bytes
=
1
*
M
;
const
size_t
min_expand_bytes
=
1
*
M
;
size_t
reserved_bytes
=
_g1
->
g1_reserved_obj_bytes
();
size_t
reserved_bytes
=
_g1
->
g1_reserved_obj_bytes
();
size_t
committed_bytes
=
_g1
->
capacity
();
size_t
committed_bytes
=
_g1
->
capacity
();
size_t
uncommitted_bytes
=
reserved_bytes
-
committed_bytes
;
size_t
uncommitted_bytes
=
reserved_bytes
-
committed_bytes
;
size_t
expand_bytes
;
size_t
expand_bytes
;
size_t
expand_bytes_via_pct
=
size_t
expand_bytes_via_pct
=
uncommitted_bytes
*
G1ExpandByP
ctOfAvail
/
100
;
uncommitted_bytes
*
G1ExpandByP
ercentOfAvailable
/
100
;
expand_bytes
=
MIN2
(
expand_bytes_via_pct
,
committed_bytes
);
expand_bytes
=
MIN2
(
expand_bytes_via_pct
,
committed_bytes
);
expand_bytes
=
MAX2
(
expand_bytes
,
min_expand_bytes
);
expand_bytes
=
MAX2
(
expand_bytes
,
min_expand_bytes
);
expand_bytes
=
MIN2
(
expand_bytes
,
uncommitted_bytes
);
expand_bytes
=
MIN2
(
expand_bytes
,
uncommitted_bytes
);
...
@@ -2591,7 +2592,7 @@ size_t G1CollectorPolicy::max_regions(int purpose) {
...
@@ -2591,7 +2592,7 @@ size_t G1CollectorPolicy::max_regions(int purpose) {
// Calculates survivor space parameters.
// Calculates survivor space parameters.
void
G1CollectorPolicy
::
calculate_survivors_policy
()
void
G1CollectorPolicy
::
calculate_survivors_policy
()
{
{
if
(
!
G1UseSurvivorSpace
)
{
if
(
!
G1UseSurvivorSpace
s
)
{
return
;
return
;
}
}
if
(
G1FixedSurvivorSpaceSize
==
0
)
{
if
(
G1FixedSurvivorSpaceSize
==
0
)
{
...
@@ -2851,7 +2852,7 @@ record_concurrent_mark_cleanup_end(size_t freed_bytes,
...
@@ -2851,7 +2852,7 @@ record_concurrent_mark_cleanup_end(size_t freed_bytes,
// estimate of the number of live bytes.
// estimate of the number of live bytes.
void
G1CollectorPolicy
::
void
G1CollectorPolicy
::
add_to_collection_set
(
HeapRegion
*
hr
)
{
add_to_collection_set
(
HeapRegion
*
hr
)
{
if
(
G1
Trace
Regions
)
{
if
(
G1
Print
Regions
)
{
gclog_or_tty
->
print_cr
(
"added region to cset %d:["
PTR_FORMAT
", "
PTR_FORMAT
"], "
gclog_or_tty
->
print_cr
(
"added region to cset %d:["
PTR_FORMAT
", "
PTR_FORMAT
"], "
"top "
PTR_FORMAT
", young %s"
,
"top "
PTR_FORMAT
", young %s"
,
hr
->
hrs_index
(),
hr
->
bottom
(),
hr
->
end
(),
hr
->
hrs_index
(),
hr
->
bottom
(),
hr
->
end
(),
...
...
src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
浏览文件 @
ad40f981
...
@@ -57,7 +57,7 @@ void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
...
@@ -57,7 +57,7 @@ void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
mark_sweep_phase1
(
marked_for_unloading
,
clear_all_softrefs
);
mark_sweep_phase1
(
marked_for_unloading
,
clear_all_softrefs
);
if
(
G1VerifyConcMark
)
{
if
(
VerifyDuringGC
)
{
G1CollectedHeap
*
g1h
=
G1CollectedHeap
::
heap
();
G1CollectedHeap
*
g1h
=
G1CollectedHeap
::
heap
();
g1h
->
checkConcurrentMark
();
g1h
->
checkConcurrentMark
();
}
}
...
...
src/share/vm/gc_implementation/g1/g1RemSet.cpp
浏览文件 @
ad40f981
...
@@ -180,6 +180,7 @@ class ScanRSClosure : public HeapRegionClosure {
...
@@ -180,6 +180,7 @@ class ScanRSClosure : public HeapRegionClosure {
CardTableModRefBS
*
_ct_bs
;
CardTableModRefBS
*
_ct_bs
;
int
_worker_i
;
int
_worker_i
;
bool
_try_claimed
;
bool
_try_claimed
;
size_t
_min_skip_distance
,
_max_skip_distance
;
public:
public:
ScanRSClosure
(
OopsInHeapRegionClosure
*
oc
,
int
worker_i
)
:
ScanRSClosure
(
OopsInHeapRegionClosure
*
oc
,
int
worker_i
)
:
_oc
(
oc
),
_oc
(
oc
),
...
@@ -191,6 +192,8 @@ public:
...
@@ -191,6 +192,8 @@ public:
_g1h
=
G1CollectedHeap
::
heap
();
_g1h
=
G1CollectedHeap
::
heap
();
_bot_shared
=
_g1h
->
bot_shared
();
_bot_shared
=
_g1h
->
bot_shared
();
_ct_bs
=
(
CardTableModRefBS
*
)
(
_g1h
->
barrier_set
());
_ct_bs
=
(
CardTableModRefBS
*
)
(
_g1h
->
barrier_set
());
_min_skip_distance
=
16
;
_max_skip_distance
=
2
*
_g1h
->
n_par_threads
()
*
_min_skip_distance
;
}
}
void
set_try_claimed
()
{
_try_claimed
=
true
;
}
void
set_try_claimed
()
{
_try_claimed
=
true
;
}
...
@@ -245,9 +248,13 @@ public:
...
@@ -245,9 +248,13 @@ public:
HeapRegionRemSetIterator
*
iter
=
_g1h
->
rem_set_iterator
(
_worker_i
);
HeapRegionRemSetIterator
*
iter
=
_g1h
->
rem_set_iterator
(
_worker_i
);
hrrs
->
init_iterator
(
iter
);
hrrs
->
init_iterator
(
iter
);
size_t
card_index
;
size_t
card_index
;
size_t
skip_distance
=
0
,
current_card
=
0
,
jump_to_card
=
0
;
while
(
iter
->
has_next
(
card_index
))
{
while
(
iter
->
has_next
(
card_index
))
{
if
(
current_card
<
jump_to_card
)
{
++
current_card
;
continue
;
}
HeapWord
*
card_start
=
_g1h
->
bot_shared
()
->
address_for_index
(
card_index
);
HeapWord
*
card_start
=
_g1h
->
bot_shared
()
->
address_for_index
(
card_index
);
#if 0
#if 0
gclog_or_tty->print("Rem set iteration yielded card [" PTR_FORMAT ", " PTR_FORMAT ").\n",
gclog_or_tty->print("Rem set iteration yielded card [" PTR_FORMAT ", " PTR_FORMAT ").\n",
card_start, card_start + CardTableModRefBS::card_size_in_words);
card_start, card_start + CardTableModRefBS::card_size_in_words);
...
@@ -257,20 +264,28 @@ public:
...
@@ -257,20 +264,28 @@ public:
assert
(
card_region
!=
NULL
,
"Yielding cards not in the heap?"
);
assert
(
card_region
!=
NULL
,
"Yielding cards not in the heap?"
);
_cards
++
;
_cards
++
;
if
(
!
card_region
->
in_collection_set
())
{
// If the card is dirty, then we will scan it during updateRS.
// If the card is dirty, then we will scan it during updateRS.
if
(
!
card_region
->
in_collection_set
()
&&
!
_ct_bs
->
is_card_dirty
(
card_index
))
{
if
(
!
_ct_bs
->
is_card_claimed
(
card_index
)
&&
if
(
!
_ct_bs
->
is_card_claimed
(
card_index
)
&&
_ct_bs
->
claim_card
(
card_index
))
{
!
_ct_bs
->
is_card_dirty
(
card_index
))
{
assert
(
_ct_bs
->
is_card_clean
(
card_index
)
||
_ct_bs
->
is_card_claimed
(
card_index
)
||
_ct_bs
->
is_card_deferred
(
card_index
),
"Card is either clean, claimed or deferred"
);
if
(
_ct_bs
->
claim_card
(
card_index
))
scanCard
(
card_index
,
card_region
);
scanCard
(
card_index
,
card_region
);
}
}
else
if
(
_try_claimed
)
{
if
(
jump_to_card
==
0
||
jump_to_card
!=
current_card
)
{
// We did some useful work in the previous iteration.
// Decrease the distance.
skip_distance
=
MAX2
(
skip_distance
>>
1
,
_min_skip_distance
);
}
else
{
// Previous iteration resulted in a claim failure.
// Increase the distance.
skip_distance
=
MIN2
(
skip_distance
<<
1
,
_max_skip_distance
);
}
jump_to_card
=
current_card
+
skip_distance
;
}
}
}
++
current_card
;
}
if
(
!
_try_claimed
)
{
hrrs
->
set_iter_complete
();
}
}
hrrs
->
set_iter_complete
();
return
false
;
return
false
;
}
}
// Set all cards back to clean.
// Set all cards back to clean.
...
@@ -508,7 +523,7 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
...
@@ -508,7 +523,7 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
// and they are causing failures. When we resolve said race
// and they are causing failures. When we resolve said race
// conditions, we'll revert back to parallel remembered set
// conditions, we'll revert back to parallel remembered set
// updating and scanning. See CRs 6677707 and 6677708.
// updating and scanning. See CRs 6677707 and 6677708.
if
(
G1
EnableParallelRSetUpdating
||
(
worker_i
==
0
))
{
if
(
G1
ParallelRSetUpdatingEnabled
||
(
worker_i
==
0
))
{
updateRS
(
worker_i
);
updateRS
(
worker_i
);
scanNewRefsRS
(
oc
,
worker_i
);
scanNewRefsRS
(
oc
,
worker_i
);
}
else
{
}
else
{
...
@@ -517,7 +532,7 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
...
@@ -517,7 +532,7 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
_g1p
->
record_update_rs_time
(
worker_i
,
0.0
);
_g1p
->
record_update_rs_time
(
worker_i
,
0.0
);
_g1p
->
record_scan_new_refs_time
(
worker_i
,
0.0
);
_g1p
->
record_scan_new_refs_time
(
worker_i
,
0.0
);
}
}
if
(
G1
EnableParallelRSetScanning
||
(
worker_i
==
0
))
{
if
(
G1
ParallelRSetScanningEnabled
||
(
worker_i
==
0
))
{
scanRS
(
oc
,
worker_i
);
scanRS
(
oc
,
worker_i
);
}
else
{
}
else
{
_g1p
->
record_scan_rs_start_time
(
worker_i
,
os
::
elapsedTime
());
_g1p
->
record_scan_rs_start_time
(
worker_i
,
os
::
elapsedTime
());
...
...
src/share/vm/gc_implementation/g1/g1_globals.hpp
浏览文件 @
ad40f981
...
@@ -28,87 +28,65 @@
...
@@ -28,87 +28,65 @@
#define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw) \
#define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw) \
\
\
product(intx,
ParallelGCG1
AllocBufferSize, 8*K, \
product(intx,
G1ParallelGC
AllocBufferSize, 8*K, \
"Size of parallel G1 allocation buffers in to-space.") \
"Size of parallel G1 allocation buffers in to-space.") \
\
\
product(intx, G1TimeSliceMS, 500, \
product(intx, G1ConfidencePercent, 50, \
"Time slice for MMU specification") \
\
product(intx, G1MaxPauseTimeMS, 200, \
"Max GC time per MMU time slice") \
\
product(intx, G1ConfidencePerc, 50, \
"Confidence level for MMU/pause predictions") \
"Confidence level for MMU/pause predictions") \
\
\
product(intx, G1MarkingOverheadPerc
, 0, \
develop(intx, G1MarkingOverheadPercent
, 0, \
"Overhead of concurrent marking") \
"Overhead of concurrent marking") \
\
\
product
(bool, G1AccountConcurrentOverhead, false, \
develop
(bool, G1AccountConcurrentOverhead, false, \
"Whether soft real-time compliance in G1 will take into account" \
"Whether soft real-time compliance in G1 will take into account" \
"concurrent overhead") \
"concurrent overhead") \
\
\
product(intx, G1YoungGenSize, 0, \
product(intx, G1YoungGenSize, 0, \
"Size of the G1 young generation, 0 is the adaptive policy") \
"Size of the G1 young generation, 0 is the adaptive policy") \
\
\
product
(bool, G1Gen, true, \
develop
(bool, G1Gen, true, \
"If true, it will enable the generational G1") \
"If true, it will enable the generational G1") \
\
\
develop(intx, G1GCP
c
t, 10, \
develop(intx, G1GCP
ercen
t, 10, \
"The desired percent time spent on GC") \
"The desired percent time spent on GC") \
\
\
product
(intx, G1PolicyVerbose, 0, \
develop
(intx, G1PolicyVerbose, 0, \
"The verbosity level on G1 policy decisions") \
"The verbosity level on G1 policy decisions") \
\
\
develop(bool, G1UseHRIntoRS, true, \
develop(bool, G1UseHRIntoRS, true, \
"Determines whether the 'advanced' HR Into rem set is used.") \
"Determines whether the 'advanced' HR Into rem set is used.") \
\
\
product(bool, G1VerifyRemSet, false, \
"If true, verify the rem set functioning at each GC") \
\
product(bool, G1VerifyConcMark, false, \
"If true, verify the conc marking code at full GC time") \
\
develop(intx, G1MarkingVerboseLevel, 0, \
develop(intx, G1MarkingVerboseLevel, 0, \
"Level (0-4) of verboseness of the marking code") \
"Level (0-4) of verboseness of the marking code") \
\
\
develop(bool, G1VerifyConcMarkPrintReachable,
true,
\
develop(bool, G1VerifyConcMarkPrintReachable,
false,
\
"If conc mark verification fails, print reachable objects") \
"If conc mark verification fails, print reachable objects") \
\
\
develop(bool, G1TraceMarkStackOverflow, false, \
develop(bool, G1TraceMarkStackOverflow, false, \
"If true, extra debugging code for CM restart for ovflw.") \
"If true, extra debugging code for CM restart for ovflw.") \
\
\
product(bool, G1VerifyMarkingInEvac, false, \
"If true, verify marking info during evacuation") \
\
develop(intx, G1PausesBtwnConcMark, -1, \
develop(intx, G1PausesBtwnConcMark, -1, \
"If positive, fixed number of pauses between conc markings") \
"If positive, fixed number of pauses between conc markings") \
\
\
product(intx, G1EfficiencyPctCausesMark, 80, \
diagnostic(bool, G1SummarizeConcurrentMark, false, \
"The cum gc efficiency since mark fall-off that causes " \
"new marking") \
\
product(bool, TraceConcurrentMark, false, \
"Trace concurrent mark") \
\
product(bool, SummarizeG1ConcMark, false, \
"Summarize concurrent mark info") \
"Summarize concurrent mark info") \
\
\
product(bool, SummarizeG1RSStats, false,
\
diagnostic(bool, G1SummarizeRSetStats, false,
\
"Summarize remembered set processing info") \
"Summarize remembered set processing info") \
\
\
product(bool, SummarizeG1ZFStats, false,
\
diagnostic(bool, G1SummarizeZFStats, false,
\
"Summarize zero-filling info") \
"Summarize zero-filling info") \
\
\
product(bool, TraceG1Refine, false,
\
develop(bool, G1TraceConcurrentRefinement, false,
\
"Trace G1 concurrent refinement") \
"Trace G1 concurrent refinement") \
\
\
develop(bool, G1ConcMark, true, \
develop(bool, G1ConcMark, true, \
"If true, run concurrent marking for G1") \
"If true, run concurrent marking for G1") \
\
\
product(intx, G1
CMStackSize, 2 * 1024 * 1024,
\
product(intx, G1
MarkStackSize, 2 * 1024 * 1024,
\
"Size of the mark stack for concurrent marking.") \
"Size of the mark stack for concurrent marking.") \
\
\
product(intx, G1
CMRegionStackSize, 1024 * 1024,
\
product(intx, G1
MarkRegionStackSize, 1024 * 1024,
\
"Size of the region stack for concurrent marking.") \
"Size of the region stack for concurrent marking.") \
\
\
develop(bool, G1ConcRefine, true, \
develop(bool, G1ConcRefine, true, \
...
@@ -121,7 +99,7 @@
...
@@ -121,7 +99,7 @@
"Number of heap regions of alloc ahead of starting collection " \
"Number of heap regions of alloc ahead of starting collection " \
"pause to start concurrent refinement (initially)") \
"pause to start concurrent refinement (initially)") \
\
\
product
(bool, G1SmoothConcRefine, true, \
develop
(bool, G1SmoothConcRefine, true, \
"Attempts to smooth out the overhead of concurrent refinement") \
"Attempts to smooth out the overhead of concurrent refinement") \
\
\
develop(bool, G1ConcZeroFill, true, \
develop(bool, G1ConcZeroFill, true, \
...
@@ -157,7 +135,7 @@
...
@@ -157,7 +135,7 @@
develop(bool, G1SATBPrintStubs, false, \
develop(bool, G1SATBPrintStubs, false, \
"If true, print generated stubs for the SATB barrier") \
"If true, print generated stubs for the SATB barrier") \
\
\
product(intx, G1ExpandByP
ctOfAvail, 20,
\
product(intx, G1ExpandByP
ercentOfAvailable, 20,
\
"When expanding, % of uncommitted space to claim.") \
"When expanding, % of uncommitted space to claim.") \
\
\
develop(bool, G1RSBarrierRegionFilter, true, \
develop(bool, G1RSBarrierRegionFilter, true, \
...
@@ -179,18 +157,9 @@
...
@@ -179,18 +157,9 @@
"If true, verify that no dirty cards remain after RS log " \
"If true, verify that no dirty cards remain after RS log " \
"processing.") \
"processing.") \
\
\
product(intx, G1MinPausesBetweenMarks, 2, \
"Number of inefficient pauses necessary to trigger marking.") \
\
product(intx, G1InefficientPausePct, 80, \
"Threshold of an 'inefficient' pauses (as % of cum efficiency.") \
\
develop(bool, G1RSCountHisto, false, \
develop(bool, G1RSCountHisto, false, \
"If true, print a histogram of RS occupancies after each pause") \
"If true, print a histogram of RS occupancies after each pause") \
\
\
product(bool, G1TraceFileOverwrite, false, \
"Allow the trace file to be overwritten") \
\
develop(intx, G1PrintRegionLivenessInfo, 0, \
develop(intx, G1PrintRegionLivenessInfo, 0, \
"When > 0, print the occupancies of the <n> best and worst" \
"When > 0, print the occupancies of the <n> best and worst" \
"regions.") \
"regions.") \
...
@@ -198,9 +167,6 @@
...
@@ -198,9 +167,6 @@
develop(bool, G1PrintParCleanupStats, false, \
develop(bool, G1PrintParCleanupStats, false, \
"When true, print extra stats about parallel cleanup.") \
"When true, print extra stats about parallel cleanup.") \
\
\
product(bool, G1DoAgeCohortChecks, false, \
"When true, check well-formedness of age cohort structures.") \
\
develop(bool, G1DisablePreBarrier, false, \
develop(bool, G1DisablePreBarrier, false, \
"Disable generation of pre-barrier (i.e., marking barrier) ") \
"Disable generation of pre-barrier (i.e., marking barrier) ") \
\
\
...
@@ -214,17 +180,17 @@
...
@@ -214,17 +180,17 @@
develop(intx, G1ConcRSLogCacheSize, 10, \
develop(intx, G1ConcRSLogCacheSize, 10, \
"Log base 2 of the length of conc RS hot-card cache.") \
"Log base 2 of the length of conc RS hot-card cache.") \
\
\
product
(bool, G1ConcRSCountTraversals, false, \
develop
(bool, G1ConcRSCountTraversals, false, \
"If true, gather data about the number of times CR traverses " \
"If true, gather data about the number of times CR traverses " \
"cards ") \
"cards ") \
\
\
product
(intx, G1ConcRSHotCardLimit, 4, \
develop
(intx, G1ConcRSHotCardLimit, 4, \
"The threshold that defines (>=) a hot card.") \
"The threshold that defines (>=) a hot card.") \
\
\
develop(bool, G1PrintOopAppls, false, \
develop(bool, G1PrintOopAppls, false, \
"When true, print applications of closures to external locs.") \
"When true, print applications of closures to external locs.") \
\
\
product
(intx, G1LogRSRegionEntries, 7, \
develop
(intx, G1LogRSRegionEntries, 7, \
"Log_2 of max number of regions for which we keep bitmaps.") \
"Log_2 of max number of regions for which we keep bitmaps.") \
\
\
develop(bool, G1RecordHRRSOops, false, \
develop(bool, G1RecordHRRSOops, false, \
...
@@ -254,11 +220,11 @@
...
@@ -254,11 +220,11 @@
"It determines whether the system will calculate an optimum " \
"It determines whether the system will calculate an optimum " \
"scan-only set.") \
"scan-only set.") \
\
\
product(intx, G1MinReservePerc
, 10,
\
product(intx, G1MinReservePerc
ent, 10,
\
"It determines the minimum reserve we should have in the heap " \
"It determines the minimum reserve we should have in the heap " \
"to minimize the probability of promotion failure.") \
"to minimize the probability of promotion failure.") \
\
\
product(bool, G1TraceRegions, false,
\
diagnostic(bool, G1PrintRegions, false,
\
"If set G1 will print information on which regions are being " \
"If set G1 will print information on which regions are being " \
"allocated and which are reclaimed.") \
"allocated and which are reclaimed.") \
\
\
...
@@ -268,24 +234,24 @@
...
@@ -268,24 +234,24 @@
develop(bool, G1HRRSFlushLogBuffersOnVerify, false, \
develop(bool, G1HRRSFlushLogBuffersOnVerify, false, \
"Forces flushing of log buffers before verification.") \
"Forces flushing of log buffers before verification.") \
\
\
product(bool, G1UseSurvivorSpace
, true,
\
product(bool, G1UseSurvivorSpace
s, true,
\
"When true, use survivor space.") \
"When true, use survivor space.") \
\
\
product
(bool, G1FixedTenuringThreshold, false, \
develop
(bool, G1FixedTenuringThreshold, false, \
"When set, G1 will not adjust the tenuring threshold") \
"When set, G1 will not adjust the tenuring threshold") \
\
\
product
(bool, G1FixedEdenSize, false, \
develop
(bool, G1FixedEdenSize, false, \
"When set, G1 will not allocate unused survivor space regions") \
"When set, G1 will not allocate unused survivor space regions") \
\
\
product
(uintx, G1FixedSurvivorSpaceSize, 0, \
develop
(uintx, G1FixedSurvivorSpaceSize, 0, \
"If non-0 is the size of the G1 survivor space, " \
"If non-0 is the size of the G1 survivor space, " \
"otherwise SurvivorRatio is used to determine the size") \
"otherwise SurvivorRatio is used to determine the size") \
\
\
experimental(bool, G1
EnableParallelRSetUpdating, false,
\
experimental(bool, G1
ParallelRSetUpdatingEnabled, false,
\
"Enables the parallelization of remembered set updating " \
"Enables the parallelization of remembered set updating " \
"during evacuation pauses") \
"during evacuation pauses") \
\
\
experimental(bool, G1
EnableParallelRSetScanning, false,
\
experimental(bool, G1
ParallelRSetScanningEnabled, false,
\
"Enables the parallelization of remembered set scanning " \
"Enables the parallelization of remembered set scanning " \
"during evacuation pauses")
"during evacuation pauses")
...
...
src/share/vm/gc_implementation/g1/heapRegion.cpp
浏览文件 @
ad40f981
...
@@ -160,12 +160,6 @@ HeapWord* walk_mem_region_loop(ClosureType* cl, G1CollectedHeap* g1h,
...
@@ -160,12 +160,6 @@ HeapWord* walk_mem_region_loop(ClosureType* cl, G1CollectedHeap* g1h,
if
(
!
g1h
->
is_obj_dead
(
cur_oop
,
hr
))
{
if
(
!
g1h
->
is_obj_dead
(
cur_oop
,
hr
))
{
// Bottom lies entirely below top, so we can call the
// Bottom lies entirely below top, so we can call the
// non-memRegion version of oop_iterate below.
// non-memRegion version of oop_iterate below.
#ifndef PRODUCT
if
(
G1VerifyMarkingInEvac
)
{
VerifyLiveClosure
vl_cl
(
g1h
);
cur_oop
->
oop_iterate
(
&
vl_cl
);
}
#endif
cur_oop
->
oop_iterate
(
cl
);
cur_oop
->
oop_iterate
(
cl
);
}
}
cur
=
next_obj
;
cur
=
next_obj
;
...
@@ -197,12 +191,6 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
...
@@ -197,12 +191,6 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
// or it was allocated after marking finished, then we add it. Otherwise
// or it was allocated after marking finished, then we add it. Otherwise
// we can safely ignore the object.
// we can safely ignore the object.
if
(
!
g1h
->
is_obj_dead
(
oop
(
bottom
),
_hr
))
{
if
(
!
g1h
->
is_obj_dead
(
oop
(
bottom
),
_hr
))
{
#ifndef PRODUCT
if
(
G1VerifyMarkingInEvac
)
{
VerifyLiveClosure
vl_cl
(
g1h
);
oop
(
bottom
)
->
oop_iterate
(
&
vl_cl
,
mr
);
}
#endif
oop_size
=
oop
(
bottom
)
->
oop_iterate
(
cl2
,
mr
);
oop_size
=
oop
(
bottom
)
->
oop_iterate
(
cl2
,
mr
);
}
else
{
}
else
{
oop_size
=
oop
(
bottom
)
->
size
();
oop_size
=
oop
(
bottom
)
->
size
();
...
@@ -232,12 +220,6 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
...
@@ -232,12 +220,6 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
// Last object. Need to do dead-obj filtering here too.
// Last object. Need to do dead-obj filtering here too.
if
(
!
g1h
->
is_obj_dead
(
oop
(
bottom
),
_hr
))
{
if
(
!
g1h
->
is_obj_dead
(
oop
(
bottom
),
_hr
))
{
#ifndef PRODUCT
if
(
G1VerifyMarkingInEvac
)
{
VerifyLiveClosure
vl_cl
(
g1h
);
oop
(
bottom
)
->
oop_iterate
(
&
vl_cl
,
mr
);
}
#endif
oop
(
bottom
)
->
oop_iterate
(
cl2
,
mr
);
oop
(
bottom
)
->
oop_iterate
(
cl2
,
mr
);
}
}
}
}
...
@@ -713,12 +695,12 @@ void HeapRegion::verify(bool allow_dirty) const {
...
@@ -713,12 +695,12 @@ void HeapRegion::verify(bool allow_dirty) const {
G1CollectedHeap
::
heap
()
->
print
();
G1CollectedHeap
::
heap
()
->
print
();
gclog_or_tty
->
print_cr
(
""
);
gclog_or_tty
->
print_cr
(
""
);
}
}
if
(
G1VerifyConcMark
&&
if
(
VerifyDuringGC
&&
G1VerifyConcMarkPrintReachable
&&
G1VerifyConcMarkPrintReachable
&&
vl_cl
.
failures
())
{
vl_cl
.
failures
())
{
g1
->
concurrent_mark
()
->
print_prev_bitmap_reachable
();
g1
->
concurrent_mark
()
->
print_prev_bitmap_reachable
();
}
}
guarantee
(
!
vl_cl
.
failures
(),
"
should not have had any failures
"
);
guarantee
(
!
vl_cl
.
failures
(),
"
region verification failed
"
);
guarantee
(
p
==
top
(),
"end of last object must match end of space"
);
guarantee
(
p
==
top
(),
"end of last object must match end of space"
);
}
}
...
...
src/share/vm/opto/connode.cpp
浏览文件 @
ad40f981
...
@@ -128,6 +128,10 @@ Node *CMoveNode::is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f
...
@@ -128,6 +128,10 @@ Node *CMoveNode::is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f
// Swapped Cmp is OK
// Swapped Cmp is OK
(
phase
->
eqv
(
cmp
->
in
(
2
),
f
)
&&
(
phase
->
eqv
(
cmp
->
in
(
2
),
f
)
&&
phase
->
eqv
(
cmp
->
in
(
1
),
t
))
)
{
phase
->
eqv
(
cmp
->
in
(
1
),
t
))
)
{
// Give up this identity check for floating points because it may choose incorrect
// value around 0.0 and -0.0
if
(
cmp
->
Opcode
()
==
Op_CmpF
||
cmp
->
Opcode
()
==
Op_CmpD
)
return
NULL
;
// Check for "(t==f)?t:f;" and replace with "f"
// Check for "(t==f)?t:f;" and replace with "f"
if
(
b
->
_test
.
_test
==
BoolTest
::
eq
)
if
(
b
->
_test
.
_test
==
BoolTest
::
eq
)
return
f
;
return
f
;
...
...
src/share/vm/opto/divnode.cpp
浏览文件 @
ad40f981
...
@@ -298,8 +298,10 @@ static Node* long_by_long_mulhi(PhaseGVN* phase, Node* dividend, jlong magic_con
...
@@ -298,8 +298,10 @@ static Node* long_by_long_mulhi(PhaseGVN* phase, Node* dividend, jlong magic_con
// 6732154: Construct both w1 and w2 before transforming, so t
// 6732154: Construct both w1 and w2 before transforming, so t
// doesn't go dead prematurely.
// doesn't go dead prematurely.
w1
=
phase
->
transform
(
w1
);
// 6837011: We need to transform w2 before w1 because the
// transformation of w1 could return t.
w2
=
phase
->
transform
(
w2
);
w2
=
phase
->
transform
(
w2
);
w1
=
phase
->
transform
(
w1
);
// w1 = u0*v1 + w1;
// w1 = u0*v1 + w1;
Node
*
u0v1
=
phase
->
transform
(
new
(
phase
->
C
,
3
)
MulLNode
(
u0
,
v1
));
Node
*
u0v1
=
phase
->
transform
(
new
(
phase
->
C
,
3
)
MulLNode
(
u0
,
v1
));
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
ad40f981
...
@@ -1288,10 +1288,14 @@ void Arguments::set_g1_gc_flags() {
...
@@ -1288,10 +1288,14 @@ void Arguments::set_g1_gc_flags() {
Abstract_VM_Version
::
parallel_worker_threads
());
Abstract_VM_Version
::
parallel_worker_threads
());
if
(
ParallelGCThreads
==
0
)
{
if
(
ParallelGCThreads
==
0
)
{
FLAG_SET_DEFAULT
(
ParallelGCThreads
,
FLAG_SET_DEFAULT
(
ParallelGCThreads
,
Abstract_VM_Version
::
parallel_worker_threads
Abstract_VM_Version
::
parallel_worker_threads
());
());
}
}
no_shared_spaces
();
no_shared_spaces
();
// Set the maximum pause time goal to be a reasonable default.
if
(
FLAG_IS_DEFAULT
(
MaxGCPauseMillis
))
{
FLAG_SET_DEFAULT
(
MaxGCPauseMillis
,
200
);
}
}
}
void
Arguments
::
set_server_heap_size
()
{
void
Arguments
::
set_server_heap_size
()
{
...
...
src/share/vm/runtime/dtraceJSDT.cpp
浏览文件 @
ad40f981
...
@@ -60,6 +60,11 @@ jlong DTraceJSDT::activate(
...
@@ -60,6 +60,11 @@ jlong DTraceJSDT::activate(
methodHandle
h_method
=
methodHandle
h_method
=
methodHandle
(
THREAD
,
JNIHandles
::
resolve_jmethod_id
(
probe
->
method
));
methodHandle
(
THREAD
,
JNIHandles
::
resolve_jmethod_id
(
probe
->
method
));
nmethod
*
nm
=
AdapterHandlerLibrary
::
create_dtrace_nmethod
(
h_method
);
nmethod
*
nm
=
AdapterHandlerLibrary
::
create_dtrace_nmethod
(
h_method
);
if
(
nm
==
NULL
)
{
delete
probes
;
THROW_MSG_0
(
vmSymbols
::
java_lang_RuntimeException
(),
"Unable to register DTrace probes (CodeCache: no room for DTrace nmethods)."
);
}
h_method
()
->
set_not_compilable
(
CompLevel_highest_tier
);
h_method
()
->
set_not_compilable
(
CompLevel_highest_tier
);
h_method
()
->
set_code
(
h_method
,
nm
);
h_method
()
->
set_code
(
h_method
,
nm
);
probes
->
nmethod_at_put
(
count
++
,
nm
);
probes
->
nmethod_at_put
(
count
++
,
nm
);
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
ad40f981
...
@@ -1819,7 +1819,11 @@ class CommandLineFlags {
...
@@ -1819,7 +1819,11 @@ class CommandLineFlags {
"Decay factor to TenuredGenerationSizeIncrement") \
"Decay factor to TenuredGenerationSizeIncrement") \
\
\
product(uintx, MaxGCPauseMillis, max_uintx, \
product(uintx, MaxGCPauseMillis, max_uintx, \
"Adaptive size policy maximum GC pause time goal in msec") \
"Adaptive size policy maximum GC pause time goal in msec, " \
"or (G1 Only) the max. GC time per MMU time slice") \
\
product(intx, GCPauseIntervalMillis, 500, \
"Time slice for MMU specification") \
\
\
product(uintx, MaxGCMinorPauseMillis, max_uintx, \
product(uintx, MaxGCMinorPauseMillis, max_uintx, \
"Adaptive size policy maximum GC minor pause time goal in msec") \
"Adaptive size policy maximum GC minor pause time goal in msec") \
...
...
src/share/vm/runtime/sharedRuntime.cpp
浏览文件 @
ad40f981
...
@@ -1776,7 +1776,14 @@ const char* AdapterHandlerEntry::name = "I2C/C2I adapters";
...
@@ -1776,7 +1776,14 @@ const char* AdapterHandlerEntry::name = "I2C/C2I adapters";
GrowableArray
<
uint64_t
>*
AdapterHandlerLibrary
::
_fingerprints
=
NULL
;
GrowableArray
<
uint64_t
>*
AdapterHandlerLibrary
::
_fingerprints
=
NULL
;
GrowableArray
<
AdapterHandlerEntry
*
>*
AdapterHandlerLibrary
::
_handlers
=
NULL
;
GrowableArray
<
AdapterHandlerEntry
*
>*
AdapterHandlerLibrary
::
_handlers
=
NULL
;
const
int
AdapterHandlerLibrary_size
=
16
*
K
;
const
int
AdapterHandlerLibrary_size
=
16
*
K
;
u_char
AdapterHandlerLibrary
::
_buffer
[
AdapterHandlerLibrary_size
+
32
];
BufferBlob
*
AdapterHandlerLibrary
::
_buffer
=
NULL
;
BufferBlob
*
AdapterHandlerLibrary
::
buffer_blob
()
{
// Should be called only when AdapterHandlerLibrary_lock is active.
if
(
_buffer
==
NULL
)
// Initialize lazily
_buffer
=
BufferBlob
::
create
(
"adapters"
,
AdapterHandlerLibrary_size
);
return
_buffer
;
}
void
AdapterHandlerLibrary
::
initialize
()
{
void
AdapterHandlerLibrary
::
initialize
()
{
if
(
_fingerprints
!=
NULL
)
return
;
if
(
_fingerprints
!=
NULL
)
return
;
...
@@ -1812,7 +1819,9 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
...
@@ -1812,7 +1819,9 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
assert
(
ic_miss
!=
NULL
,
"must have handler"
);
assert
(
ic_miss
!=
NULL
,
"must have handler"
);
int
result
;
int
result
;
NOT_PRODUCT
(
int
code_size
);
BufferBlob
*
B
=
NULL
;
BufferBlob
*
B
=
NULL
;
AdapterHandlerEntry
*
entry
=
NULL
;
uint64_t
fingerprint
;
uint64_t
fingerprint
;
{
{
MutexLocker
mu
(
AdapterHandlerLibrary_lock
);
MutexLocker
mu
(
AdapterHandlerLibrary_lock
);
...
@@ -1850,42 +1859,45 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
...
@@ -1850,42 +1859,45 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
// Create I2C & C2I handlers
// Create I2C & C2I handlers
ResourceMark
rm
;
ResourceMark
rm
;
// Improve alignment slightly
u_char
*
buf
=
(
u_char
*
)(((
intptr_t
)
_buffer
+
CodeEntryAlignment
-
1
)
&
~
(
CodeEntryAlignment
-
1
));
CodeBuffer
buffer
(
buf
,
AdapterHandlerLibrary_size
);
short
buffer_locs
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
((
relocInfo
*
)
buffer_locs
,
sizeof
(
buffer_locs
)
/
sizeof
(
relocInfo
));
MacroAssembler
_masm
(
&
buffer
);
// Fill in the signature array, for the calling-convention call.
int
total_args_passed
=
method
->
size_of_parameters
();
// All args on stack
BasicType
*
sig_bt
=
NEW_RESOURCE_ARRAY
(
BasicType
,
total_args_passed
);
VMRegPair
*
regs
=
NEW_RESOURCE_ARRAY
(
VMRegPair
,
total_args_passed
);
int
i
=
0
;
if
(
!
method
->
is_static
()
)
// Pass in receiver first
sig_bt
[
i
++
]
=
T_OBJECT
;
for
(
SignatureStream
ss
(
method
->
signature
());
!
ss
.
at_return_type
();
ss
.
next
())
{
sig_bt
[
i
++
]
=
ss
.
type
();
// Collect remaining bits of signature
if
(
ss
.
type
()
==
T_LONG
||
ss
.
type
()
==
T_DOUBLE
)
sig_bt
[
i
++
]
=
T_VOID
;
// Longs & doubles take 2 Java slots
}
assert
(
i
==
total_args_passed
,
""
);
// Now get the re-packed compiled-Java layout.
BufferBlob
*
buf
=
buffer_blob
();
// the temporary code buffer in CodeCache
int
comp_args_on_stack
;
if
(
buf
!=
NULL
)
{
CodeBuffer
buffer
(
buf
->
instructions_begin
(),
buf
->
instructions_size
());
short
buffer_locs
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
((
relocInfo
*
)
buffer_locs
,
sizeof
(
buffer_locs
)
/
sizeof
(
relocInfo
));
MacroAssembler
_masm
(
&
buffer
);
// Fill in the signature array, for the calling-convention call.
int
total_args_passed
=
method
->
size_of_parameters
();
// All args on stack
BasicType
*
sig_bt
=
NEW_RESOURCE_ARRAY
(
BasicType
,
total_args_passed
);
VMRegPair
*
regs
=
NEW_RESOURCE_ARRAY
(
VMRegPair
,
total_args_passed
);
int
i
=
0
;
if
(
!
method
->
is_static
()
)
// Pass in receiver first
sig_bt
[
i
++
]
=
T_OBJECT
;
for
(
SignatureStream
ss
(
method
->
signature
());
!
ss
.
at_return_type
();
ss
.
next
())
{
sig_bt
[
i
++
]
=
ss
.
type
();
// Collect remaining bits of signature
if
(
ss
.
type
()
==
T_LONG
||
ss
.
type
()
==
T_DOUBLE
)
sig_bt
[
i
++
]
=
T_VOID
;
// Longs & doubles take 2 Java slots
}
assert
(
i
==
total_args_passed
,
""
);
// Get a description of the compiled java calling convention and the largest used (VMReg) stack slot usage
// Now get the re-packed compiled-Java layout.
comp_args_on_stack
=
SharedRuntime
::
java_calling_convention
(
sig_bt
,
regs
,
total_args_passed
,
false
)
;
int
comp_args_on_stack
;
AdapterHandlerEntry
*
entry
=
SharedRuntime
::
generate_i2c2i_adapters
(
&
_masm
,
// Get a description of the compiled java calling convention and the largest used (VMReg) stack slot usage
total_args_passed
,
comp_args_on_stack
=
SharedRuntime
::
java_calling_convention
(
sig_bt
,
regs
,
total_args_passed
,
false
);
comp_args_on_stack
,
sig_bt
,
regs
);
B
=
BufferBlob
::
create
(
AdapterHandlerEntry
::
name
,
&
buffer
);
entry
=
SharedRuntime
::
generate_i2c2i_adapters
(
&
_masm
,
total_args_passed
,
comp_args_on_stack
,
sig_bt
,
regs
);
B
=
BufferBlob
::
create
(
AdapterHandlerEntry
::
name
,
&
buffer
);
NOT_PRODUCT
(
code_size
=
buffer
.
code_size
());
}
if
(
B
==
NULL
)
{
if
(
B
==
NULL
)
{
// CodeCache is full, disable compilation
// CodeCache is full, disable compilation
// Ought to log this but compile log is only per compile thread
// Ought to log this but compile log is only per compile thread
...
@@ -1912,9 +1924,9 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
...
@@ -1912,9 +1924,9 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
tty
->
cr
();
tty
->
cr
();
tty
->
print_cr
(
"i2c argument handler #%d for: %s %s (fingerprint = 0x%llx, %d bytes generated)"
,
tty
->
print_cr
(
"i2c argument handler #%d for: %s %s (fingerprint = 0x%llx, %d bytes generated)"
,
_handlers
->
length
(),
(
method
->
is_static
()
?
"static"
:
"receiver"
),
_handlers
->
length
(),
(
method
->
is_static
()
?
"static"
:
"receiver"
),
method
->
signature
()
->
as_C_string
(),
fingerprint
,
buffer
.
code_size
()
);
method
->
signature
()
->
as_C_string
(),
fingerprint
,
code_size
);
tty
->
print_cr
(
"c2i argument handler starts at %p"
,
entry
->
get_c2i_entry
());
tty
->
print_cr
(
"c2i argument handler starts at %p"
,
entry
->
get_c2i_entry
());
Disassembler
::
decode
(
entry
->
get_i2c_entry
(),
entry
->
get_i2c_entry
()
+
buffer
.
code_size
()
);
Disassembler
::
decode
(
entry
->
get_i2c_entry
(),
entry
->
get_i2c_entry
()
+
code_size
);
}
}
#endif
#endif
...
@@ -1982,42 +1994,44 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
...
@@ -1982,42 +1994,44 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method) {
return
nm
;
return
nm
;
}
}
// Improve alignment slightly
ResourceMark
rm
;
u_char
*
buf
=
(
u_char
*
)(((
intptr_t
)
_buffer
+
CodeEntryAlignment
-
1
)
&
~
(
CodeEntryAlignment
-
1
));
CodeBuffer
buffer
(
buf
,
AdapterHandlerLibrary_size
);
// Need a few relocation entries
double
locs_buf
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
((
relocInfo
*
)
locs_buf
,
sizeof
(
locs_buf
)
/
sizeof
(
relocInfo
));
MacroAssembler
_masm
(
&
buffer
);
// Fill in the signature array, for the calling-convention call.
int
total_args_passed
=
method
->
size_of_parameters
();
BasicType
*
sig_bt
=
NEW_RESOURCE_ARRAY
(
BasicType
,
total_args_passed
);
VMRegPair
*
regs
=
NEW_RESOURCE_ARRAY
(
VMRegPair
,
total_args_passed
);
int
i
=
0
;
if
(
!
method
->
is_static
()
)
// Pass in receiver first
sig_bt
[
i
++
]
=
T_OBJECT
;
SignatureStream
ss
(
method
->
signature
());
for
(
;
!
ss
.
at_return_type
();
ss
.
next
())
{
sig_bt
[
i
++
]
=
ss
.
type
();
// Collect remaining bits of signature
if
(
ss
.
type
()
==
T_LONG
||
ss
.
type
()
==
T_DOUBLE
)
sig_bt
[
i
++
]
=
T_VOID
;
// Longs & doubles take 2 Java slots
}
assert
(
i
==
total_args_passed
,
""
);
BasicType
ret_type
=
ss
.
type
();
// Now get the compiled-Java layout as input arguments
int
comp_args_on_stack
;
comp_args_on_stack
=
SharedRuntime
::
java_calling_convention
(
sig_bt
,
regs
,
total_args_passed
,
false
);
// Generate the compiled-to-native wrapper code
BufferBlob
*
buf
=
buffer_blob
();
// the temporary code buffer in CodeCache
nm
=
SharedRuntime
::
generate_native_wrapper
(
&
_masm
,
if
(
buf
!=
NULL
)
{
method
,
CodeBuffer
buffer
(
buf
->
instructions_begin
(),
buf
->
instructions_size
());
total_args_passed
,
double
locs_buf
[
20
];
comp_args_on_stack
,
buffer
.
insts
()
->
initialize_shared_locs
((
relocInfo
*
)
locs_buf
,
sizeof
(
locs_buf
)
/
sizeof
(
relocInfo
));
sig_bt
,
regs
,
MacroAssembler
_masm
(
&
buffer
);
ret_type
);
// Fill in the signature array, for the calling-convention call.
int
total_args_passed
=
method
->
size_of_parameters
();
BasicType
*
sig_bt
=
NEW_RESOURCE_ARRAY
(
BasicType
,
total_args_passed
);
VMRegPair
*
regs
=
NEW_RESOURCE_ARRAY
(
VMRegPair
,
total_args_passed
);
int
i
=
0
;
if
(
!
method
->
is_static
()
)
// Pass in receiver first
sig_bt
[
i
++
]
=
T_OBJECT
;
SignatureStream
ss
(
method
->
signature
());
for
(
;
!
ss
.
at_return_type
();
ss
.
next
())
{
sig_bt
[
i
++
]
=
ss
.
type
();
// Collect remaining bits of signature
if
(
ss
.
type
()
==
T_LONG
||
ss
.
type
()
==
T_DOUBLE
)
sig_bt
[
i
++
]
=
T_VOID
;
// Longs & doubles take 2 Java slots
}
assert
(
i
==
total_args_passed
,
""
);
BasicType
ret_type
=
ss
.
type
();
// Now get the compiled-Java layout as input arguments
int
comp_args_on_stack
;
comp_args_on_stack
=
SharedRuntime
::
java_calling_convention
(
sig_bt
,
regs
,
total_args_passed
,
false
);
// Generate the compiled-to-native wrapper code
nm
=
SharedRuntime
::
generate_native_wrapper
(
&
_masm
,
method
,
total_args_passed
,
comp_args_on_stack
,
sig_bt
,
regs
,
ret_type
);
}
}
}
// Must unlock before calling set_code
// Must unlock before calling set_code
...
@@ -2077,18 +2091,20 @@ nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
...
@@ -2077,18 +2091,20 @@ nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
return
nm
;
return
nm
;
}
}
// Improve alignment slightly
ResourceMark
rm
;
u_char
*
buf
=
(
u_char
*
)
(((
intptr_t
)
_buffer
+
CodeEntryAlignment
-
1
)
&
~
(
CodeEntryAlignment
-
1
));
BufferBlob
*
buf
=
buffer_blob
();
// the temporary code buffer in CodeCache
CodeBuffer
buffer
(
buf
,
AdapterHandlerLibrary_size
);
if
(
buf
!=
NULL
)
{
// Need a few relocation entries
CodeBuffer
buffer
(
buf
->
instructions_begin
(),
buf
->
instructions_size
());
double
locs_buf
[
20
];
// Need a few relocation entries
buffer
.
insts
()
->
initialize_shared_locs
(
double
locs_buf
[
20
];
buffer
.
insts
()
->
initialize_shared_locs
(
(
relocInfo
*
)
locs_buf
,
sizeof
(
locs_buf
)
/
sizeof
(
relocInfo
));
(
relocInfo
*
)
locs_buf
,
sizeof
(
locs_buf
)
/
sizeof
(
relocInfo
));
MacroAssembler
_masm
(
&
buffer
);
MacroAssembler
_masm
(
&
buffer
);
// Generate the compiled-to-native wrapper code
// Generate the compiled-to-native wrapper code
nm
=
SharedRuntime
::
generate_dtrace_nmethod
(
&
_masm
,
method
);
nm
=
SharedRuntime
::
generate_dtrace_nmethod
(
&
_masm
,
method
);
}
}
}
return
nm
;
return
nm
;
}
}
...
...
src/share/vm/runtime/sharedRuntime.hpp
浏览文件 @
ad40f981
...
@@ -557,12 +557,13 @@ class AdapterHandlerEntry : public CHeapObj {
...
@@ -557,12 +557,13 @@ class AdapterHandlerEntry : public CHeapObj {
class
AdapterHandlerLibrary
:
public
AllStatic
{
class
AdapterHandlerLibrary
:
public
AllStatic
{
private:
private:
static
u_char
_buffer
[];
// the temporary code buffer
static
BufferBlob
*
_buffer
;
// the temporary code buffer in CodeCache
static
GrowableArray
<
uint64_t
>*
_fingerprints
;
// the fingerprint collection
static
GrowableArray
<
uint64_t
>*
_fingerprints
;
// the fingerprint collection
static
GrowableArray
<
AdapterHandlerEntry
*>
*
_handlers
;
// the corresponding handlers
static
GrowableArray
<
AdapterHandlerEntry
*>
*
_handlers
;
// the corresponding handlers
enum
{
enum
{
AbstractMethodHandler
=
1
// special handler for abstract methods
AbstractMethodHandler
=
1
// special handler for abstract methods
};
};
static
BufferBlob
*
buffer_blob
();
static
void
initialize
();
static
void
initialize
();
static
int
get_create_adapter_index
(
methodHandle
method
);
static
int
get_create_adapter_index
(
methodHandle
method
);
static
address
get_i2c_entry
(
int
index
)
{
static
address
get_i2c_entry
(
int
index
)
{
...
...
test/compiler/6837011/Test6837011.java
0 → 100644
浏览文件 @
ad40f981
/*
* Copyright 2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/**
* @test
* @bug 6837011
* @summary SIGSEGV in PhaseIdealLoop in 32bit jvm
*
* @run main/othervm -Xcomp -XX:CompileOnly=Test6837011.main Test6837011
*/
public
class
Test6837011
{
static
boolean
var_3
=
true
;
public
static
void
main
(
String
[]
args
)
{
double
var_5
;
char
var_7
=
1
;
double
var_11
=
0
;
do
{
var_11
++;
var_5
=
(
var_7
/=
(
var_3
?
~
1L
:
3
)
);
}
while
(
var_11
<
1
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录