提交 c42d9eae 编写于 作者: C coleenp

Merge

...@@ -513,3 +513,5 @@ fbc31318922c31488c0464ccd864d2cd1d9e21a7 hs25.40-b06 ...@@ -513,3 +513,5 @@ fbc31318922c31488c0464ccd864d2cd1d9e21a7 hs25.40-b06
38539608359a6dfc5740abb66f878af643757c3b jdk8u40-b03 38539608359a6dfc5740abb66f878af643757c3b jdk8u40-b03
c3990b8c710e4c1996b5cd579681645d9f0408c1 hs25.40-b07 c3990b8c710e4c1996b5cd579681645d9f0408c1 hs25.40-b07
3f1b3f2dd1cb224747a11a6788e58b5cb7683d57 hs25.40-b08 3f1b3f2dd1cb224747a11a6788e58b5cb7683d57 hs25.40-b08
fd4dbaff30027832dd21bcc7171ddb466ca2924f jdk8u40-b04
c9635cad4a5d794a96b4a26d3e7ad1d783133add hs25.40-b09
...@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2014 ...@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2014
HS_MAJOR_VER=25 HS_MAJOR_VER=25
HS_MINOR_VER=40 HS_MINOR_VER=40
HS_BUILD_NUMBER=09 HS_BUILD_NUMBER=10
JDK_MAJOR_VER=1 JDK_MAJOR_VER=1
JDK_MINOR_VER=8 JDK_MINOR_VER=8
......
...@@ -159,6 +159,7 @@ BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make ...@@ -159,6 +159,7 @@ BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
BUILDTREE_VARS += HS_ALT_MAKE=$(HS_ALT_MAKE)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
......
...@@ -1093,6 +1093,9 @@ bool Node::has_special_unique_user() const { ...@@ -1093,6 +1093,9 @@ bool Node::has_special_unique_user() const {
if( this->is_Store() ) { if( this->is_Store() ) {
// Condition for back-to-back stores folding. // Condition for back-to-back stores folding.
return n->Opcode() == op && n->in(MemNode::Memory) == this; return n->Opcode() == op && n->in(MemNode::Memory) == this;
} else if (this->is_Load()) {
// Condition for removing an unused LoadNode from the MemBarAcquire precedence input
return n->Opcode() == Op_MemBarAcquire;
} else if( op == Op_AddL ) { } else if( op == Op_AddL ) {
// Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y)) // Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
return n->Opcode() == Op_ConvL2I && n->in(1) == this; return n->Opcode() == Op_ConvL2I && n->in(1) == this;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp" #include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
#include "runtime/arguments_ext.hpp"
#include "runtime/globals_extension.hpp" #include "runtime/globals_extension.hpp"
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "services/management.hpp" #include "services/management.hpp"
...@@ -1544,7 +1545,7 @@ void Arguments::select_gc_ergonomically() { ...@@ -1544,7 +1545,7 @@ void Arguments::select_gc_ergonomically() {
void Arguments::select_gc() { void Arguments::select_gc() {
if (!gc_selected()) { if (!gc_selected()) {
select_gc_ergonomically(); ArgumentsExt::select_gc_ergonomically();
} }
} }
...@@ -2033,7 +2034,7 @@ bool Arguments::verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_hea ...@@ -2033,7 +2034,7 @@ bool Arguments::verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_hea
} }
// Check consistency of GC selection // Check consistency of GC selection
bool Arguments::check_gc_consistency() { bool Arguments::check_gc_consistency_user() {
check_gclog_consistency(); check_gclog_consistency();
bool status = true; bool status = true;
// Ensure that the user has not selected conflicting sets // Ensure that the user has not selected conflicting sets
...@@ -2199,7 +2200,7 @@ bool Arguments::check_vm_args_consistency() { ...@@ -2199,7 +2200,7 @@ bool Arguments::check_vm_args_consistency() {
FLAG_SET_DEFAULT(UseGCOverheadLimit, false); FLAG_SET_DEFAULT(UseGCOverheadLimit, false);
} }
status = status && check_gc_consistency(); status = status && ArgumentsExt::check_gc_consistency_user();
status = status && check_stack_pages(); status = status && check_stack_pages();
if (CMSIncrementalMode) { if (CMSIncrementalMode) {
...@@ -2447,8 +2448,6 @@ bool Arguments::check_vm_args_consistency() { ...@@ -2447,8 +2448,6 @@ bool Arguments::check_vm_args_consistency() {
warning("The VM option CICompilerCountPerCPU overrides CICompilerCount."); warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
} }
status &= check_vm_args_consistency_ext();
return status; return status;
} }
...@@ -3419,7 +3418,7 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req ...@@ -3419,7 +3418,7 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
} }
} }
if (!check_vm_args_consistency()) { if (!ArgumentsExt::check_vm_args_consistency()) {
return JNI_ERR; return JNI_ERR;
} }
...@@ -3793,7 +3792,7 @@ jint Arguments::apply_ergo() { ...@@ -3793,7 +3792,7 @@ jint Arguments::apply_ergo() {
set_shared_spaces_flags(); set_shared_spaces_flags();
// Check the GC selections again. // Check the GC selections again.
if (!check_gc_consistency()) { if (!ArgumentsExt::check_gc_consistency_ergo()) {
return JNI_EINVAL; return JNI_EINVAL;
} }
......
...@@ -465,12 +465,12 @@ class Arguments : AllStatic { ...@@ -465,12 +465,12 @@ class Arguments : AllStatic {
static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio); static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
// Check for consistency in the selection of the garbage collector. // Check for consistency in the selection of the garbage collector.
static bool check_gc_consistency(); static bool check_gc_consistency_user(); // Check user-selected gc
static inline bool check_gc_consistency_ergo(); // Check ergonomic-selected gc
static void check_deprecated_gcs(); static void check_deprecated_gcs();
static void check_deprecated_gc_flags(); static void check_deprecated_gc_flags();
// Check consistecy or otherwise of VM argument settings // Check consistecy or otherwise of VM argument settings
static bool check_vm_args_consistency(); static bool check_vm_args_consistency();
static bool check_vm_args_consistency_ext();
// Check stack pages settings // Check stack pages settings
static bool check_stack_pages(); static bool check_stack_pages();
// Used by os_solaris // Used by os_solaris
...@@ -611,4 +611,9 @@ bool Arguments::gc_selected() { ...@@ -611,4 +611,9 @@ bool Arguments::gc_selected() {
return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC || return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC ||
UseParNewGC || UseSerialGC; UseParNewGC || UseSerialGC;
} }
bool Arguments::check_gc_consistency_ergo() {
return check_gc_consistency_user();
}
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
...@@ -22,9 +22,34 @@ ...@@ -22,9 +22,34 @@
* *
*/ */
#include "precompiled.hpp" #ifndef SHARE_VM_RUNTIME_ARGUMENTS_EXT_HPP
#define SHARE_VM_RUNTIME_ARGUMENTS_EXT_HPP
#include "memory/allocation.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
bool Arguments::check_vm_args_consistency_ext() { class ArgumentsExt: AllStatic {
return true; public:
static inline void select_gc_ergonomically();
static inline bool check_gc_consistency_user();
static inline bool check_gc_consistency_ergo();
static inline bool check_vm_args_consistency();
};
void ArgumentsExt::select_gc_ergonomically() {
Arguments::select_gc_ergonomically();
} }
bool ArgumentsExt::check_gc_consistency_user() {
return Arguments::check_gc_consistency_user();
}
bool ArgumentsExt::check_gc_consistency_ergo() {
return Arguments::check_gc_consistency_ergo();
}
bool ArgumentsExt::check_vm_args_consistency() {
return Arguments::check_vm_args_consistency();
}
#endif // SHARE_VM_RUNTIME_ARGUMENTS_EXT_HPP
...@@ -162,10 +162,7 @@ static jint jcmd(AttachOperation* op, outputStream* out) { ...@@ -162,10 +162,7 @@ static jint jcmd(AttachOperation* op, outputStream* out) {
java_lang_Throwable::print(PENDING_EXCEPTION, out); java_lang_Throwable::print(PENDING_EXCEPTION, out);
out->cr(); out->cr();
CLEAR_PENDING_EXCEPTION; CLEAR_PENDING_EXCEPTION;
// The exception has been printed on the output stream return JNI_ERR;
// If the JVM returns JNI_ERR, the attachAPI throws a generic I/O
// exception and the content of the output stream is not processed.
// By returning JNI_OK, the exception will be displayed on the client side
} }
return JNI_OK; return JNI_OK;
} }
......
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test TestMemBarAcquire
* @bug 8048879
* @summary "Tests optimization of MemBarAcquireNodes"
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation TestMemBarAcquire
*/
public class TestMemBarAcquire {
private volatile static Object defaultObj = new Object();
private Object obj;
public TestMemBarAcquire(Object param) {
// Volatile load. MemBarAcquireNode is added after the
// load to prevent following loads from floating up past.
// StoreNode is added to store result of load in 'obj'.
this.obj = defaultObj;
// Overrides 'obj' and therefore makes previous StoreNode
// and the corresponding LoadNode useless. However, the
// LoadNode is still connected to the MemBarAcquireNode
// that should now release the reference.
this.obj = param;
}
public static void main(String[] args) throws Exception {
// Make sure TestMemBarAcquire::<init> is compiled
for (int i = 0; i < 100000; ++i) {
TestMemBarAcquire p = new TestMemBarAcquire(new Object());
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册