提交 c42d9eae 编写于 作者: C coleenp

Merge

......@@ -513,3 +513,5 @@ fbc31318922c31488c0464ccd864d2cd1d9e21a7 hs25.40-b06
38539608359a6dfc5740abb66f878af643757c3b jdk8u40-b03
c3990b8c710e4c1996b5cd579681645d9f0408c1 hs25.40-b07
3f1b3f2dd1cb224747a11a6788e58b5cb7683d57 hs25.40-b08
fd4dbaff30027832dd21bcc7171ddb466ca2924f jdk8u40-b04
c9635cad4a5d794a96b4a26d3e7ad1d783133add hs25.40-b09
......@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2014
HS_MAJOR_VER=25
HS_MINOR_VER=40
HS_BUILD_NUMBER=09
HS_BUILD_NUMBER=10
JDK_MAJOR_VER=1
JDK_MINOR_VER=8
......
......@@ -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 += 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 += HS_ALT_MAKE=$(HS_ALT_MAKE)
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
......
......@@ -1093,6 +1093,9 @@ bool Node::has_special_unique_user() const {
if( this->is_Store() ) {
// Condition for back-to-back stores folding.
return n->Opcode() == op && n->in(MemNode::Memory) == this;
} else if (this->is_Load()) {
// Condition for removing an unused LoadNode from the MemBarAcquire precedence input
return n->Opcode() == Op_MemBarAcquire;
} else if( op == Op_AddL ) {
// Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
return n->Opcode() == Op_ConvL2I && n->in(1) == this;
......
......@@ -35,6 +35,7 @@
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/arguments.hpp"
#include "runtime/arguments_ext.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/java.hpp"
#include "services/management.hpp"
......@@ -1544,7 +1545,7 @@ void Arguments::select_gc_ergonomically() {
void Arguments::select_gc() {
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
}
// Check consistency of GC selection
bool Arguments::check_gc_consistency() {
bool Arguments::check_gc_consistency_user() {
check_gclog_consistency();
bool status = true;
// Ensure that the user has not selected conflicting sets
......@@ -2199,7 +2200,7 @@ bool Arguments::check_vm_args_consistency() {
FLAG_SET_DEFAULT(UseGCOverheadLimit, false);
}
status = status && check_gc_consistency();
status = status && ArgumentsExt::check_gc_consistency_user();
status = status && check_stack_pages();
if (CMSIncrementalMode) {
......@@ -2447,8 +2448,6 @@ bool Arguments::check_vm_args_consistency() {
warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
}
status &= check_vm_args_consistency_ext();
return status;
}
......@@ -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;
}
......@@ -3793,7 +3792,7 @@ jint Arguments::apply_ergo() {
set_shared_spaces_flags();
// Check the GC selections again.
if (!check_gc_consistency()) {
if (!ArgumentsExt::check_gc_consistency_ergo()) {
return JNI_EINVAL;
}
......
......@@ -465,12 +465,12 @@ class Arguments : AllStatic {
static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
// 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_gc_flags();
// Check consistecy or otherwise of VM argument settings
static bool check_vm_args_consistency();
static bool check_vm_args_consistency_ext();
// Check stack pages settings
static bool check_stack_pages();
// Used by os_solaris
......@@ -611,4 +611,9 @@ bool Arguments::gc_selected() {
return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC ||
UseParNewGC || UseSerialGC;
}
bool Arguments::check_gc_consistency_ergo() {
return check_gc_consistency_user();
}
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
......@@ -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"
bool Arguments::check_vm_args_consistency_ext() {
return true;
class ArgumentsExt: AllStatic {
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) {
java_lang_Throwable::print(PENDING_EXCEPTION, out);
out->cr();
CLEAR_PENDING_EXCEPTION;
// The exception has been printed on the output stream
// 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_ERR;
}
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.
先完成此消息的编辑!
想要评论请 注册