This commit is contained in:
Tobias Hartmann 2016-01-28 09:49:17 +01:00
commit 832443d3b0
436 changed files with 12437 additions and 6911 deletions

View file

@ -165,7 +165,7 @@ bool AdvancedThresholdPolicy::is_method_profiled(Method* method) {
// Called with the queue locked and with at least one element
CompileTask* AdvancedThresholdPolicy::select_task(CompileQueue* compile_queue) {
#if INCLUDE_JVMCI
CompileTask *max_non_jvmci_task = NULL;
CompileTask *max_blocking_task = NULL;
#endif
CompileTask *max_task = NULL;
Method* max_method = NULL;
@ -197,13 +197,25 @@ CompileTask* AdvancedThresholdPolicy::select_task(CompileQueue* compile_queue) {
max_method = method;
}
}
#if INCLUDE_JVMCI
if (UseJVMCICompiler && task->is_blocking()) {
if (max_blocking_task == NULL || compare_methods(method, max_blocking_task->method())) {
max_blocking_task = task;
}
}
#endif
task = next_task;
}
#if INCLUDE_JVMCI
if (UseJVMCICompiler) {
if (max_non_jvmci_task != NULL) {
max_task = max_non_jvmci_task;
if (max_blocking_task != NULL) {
// In blocking compilation mode, the CompileBroker will make
// compilations submitted by a JVMCI compiler thread non-blocking. These
// compilations should be scheduled after all blocking compilations
// to service non-compiler related compilations sooner and reduce the
// chance of such compilations timing out.
max_task = max_blocking_task;
max_method = max_task->method();
}
}

View file

@ -159,6 +159,26 @@ bool CompilationPolicy::is_compilation_enabled() {
return !delay_compilation_during_startup() && CompileBroker::should_compile_new_jobs();
}
CompileTask* CompilationPolicy::select_task_helper(CompileQueue* compile_queue) {
#if INCLUDE_JVMCI
if (UseJVMCICompiler && !BackgroundCompilation) {
/*
* In blocking compilation mode, the CompileBroker will make
* compilations submitted by a JVMCI compiler thread non-blocking. These
* compilations should be scheduled after all blocking compilations
* to service non-compiler related compilations sooner and reduce the
* chance of such compilations timing out.
*/
for (CompileTask* task = compile_queue->first(); task != NULL; task = task->next()) {
if (task->is_blocking()) {
return task;
}
}
}
#endif
return compile_queue->first();
}
#ifndef PRODUCT
void CompilationPolicy::print_time() {
tty->print_cr ("Accumulated compilationPolicy times:");
@ -339,7 +359,7 @@ void NonTieredCompPolicy::disable_compilation(Method* method) {
}
CompileTask* NonTieredCompPolicy::select_task(CompileQueue* compile_queue) {
return compile_queue->first();
return select_task_helper(compile_queue);
}
bool NonTieredCompPolicy::is_mature(Method* method) {

View file

@ -58,6 +58,8 @@ public:
static void set_policy(CompilationPolicy* policy) { _policy = policy; }
static CompilationPolicy* policy() { return _policy; }
static CompileTask* select_task_helper(CompileQueue* compile_queue);
// Profiling
elapsedTimer* accumulated_time() { return &_accumulated_time; }
void print_time() PRODUCT_RETURN;

View file

@ -826,9 +826,6 @@ public:
notproduct(bool, StressCriticalJNINatives, false, \
"Exercise register saving code in critical natives") \
\
product(bool, UseSSE42Intrinsics, false, \
"SSE4.2 versions of intrinsics") \
\
product(bool, UseAESIntrinsics, false, \
"Use intrinsics for AES versions of crypto") \
\

View file

@ -432,8 +432,7 @@ void before_exit(JavaThread* thread) {
if (HAS_PENDING_EXCEPTION) {
Handle exception(THREAD, PENDING_EXCEPTION);
CLEAR_PENDING_EXCEPTION;
ttyLocker ttyl;
java_lang_Throwable::print_stack_trace(exception, tty);
java_lang_Throwable::java_printStackTrace(exception, THREAD);
}
#endif

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2014 SAP AG. All rights reserved.
* Copyright (c) 2014 SAP SE. 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

View file

@ -726,6 +726,7 @@ address SharedRuntime::compute_compiled_exc_handler(nmethod* nm, address ret_pc,
#endif
if (t == NULL) {
ttyLocker ttyl;
tty->print_cr("MISSING EXCEPTION HANDLER for pc " INTPTR_FORMAT " and handler bci %d", p2i(ret_pc), handler_bci);
tty->print_cr(" Exception:");
exception->print();
@ -2759,7 +2760,7 @@ void AdapterHandlerLibrary::create_native_wrapper(const methodHandle& method) {
DirectiveSet* directive = DirectivesStack::getDefaultDirective(CompileBroker::compiler(CompLevel_simple));
if (directive->PrintAssemblyOption) {
Disassembler::decode(nm, tty);
nm->print_code();
}
DirectivesStack::release(directive);
}

View file

@ -168,7 +168,7 @@ void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
// Called with the queue locked and with at least one element
CompileTask* SimpleThresholdPolicy::select_task(CompileQueue* compile_queue) {
return compile_queue->first();
return select_task_helper(compile_queue);
}
void SimpleThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) {

View file

@ -155,6 +155,10 @@ address StubRoutines::_vectorizedMismatch = NULL;
address StubRoutines::_dexp = NULL;
address StubRoutines::_dlog = NULL;
address StubRoutines::_dpow = NULL;
address StubRoutines::_dsin = NULL;
address StubRoutines::_dcos = NULL;
address StubRoutines::_dlibm_sin_cos_huge = NULL;
address StubRoutines::_dlibm_reduce_pi04l = NULL;
double (* StubRoutines::_intrinsic_log10 )(double) = NULL;
double (* StubRoutines::_intrinsic_sin )(double) = NULL;

View file

@ -214,6 +214,10 @@ class StubRoutines: AllStatic {
static address _dexp;
static address _dlog;
static address _dpow;
static address _dsin;
static address _dcos;
static address _dlibm_sin_cos_huge;
static address _dlibm_reduce_pi04l;
// These are versions of the java.lang.Math methods which perform
// the same operations as the intrinsic version. They are used for
@ -388,6 +392,10 @@ class StubRoutines: AllStatic {
static address dexp() { return _dexp; }
static address dlog() { return _dlog; }
static address dpow() { return _dpow; }
static address dsin() { return _dsin; }
static address dcos() { return _dcos; }
static address dlibm_reduce_pi04l() { return _dlibm_reduce_pi04l; }
static address dlibm_sin_cos_huge() { return _dlibm_sin_cos_huge; }
static address select_fill_function(BasicType t, bool aligned, const char* &name);

View file

@ -406,6 +406,7 @@ inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) {
// as it were a native compiled frame (no Java-level assumptions).
#ifdef ASSERT
if (WizardMode) {
ttyLocker ttyl;
tty->print_cr("Error in fill_from_frame: pc_desc for "
INTPTR_FORMAT " not found or invalid at %d",
p2i(_frame.pc()), decode_offset);

View file

@ -861,6 +861,8 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
static_field(StubRoutines, _dexp, address) \
static_field(StubRoutines, _dlog, address) \
static_field(StubRoutines, _dpow, address) \
static_field(StubRoutines, _dsin, address) \
static_field(StubRoutines, _dcos, address) \
static_field(StubRoutines, _vectorizedMismatch, address) \
static_field(StubRoutines, _jbyte_arraycopy, address) \
static_field(StubRoutines, _jshort_arraycopy, address) \
@ -2055,8 +2057,6 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
declare_c2_type(NegNode, Node) \
declare_c2_type(NegFNode, NegNode) \
declare_c2_type(NegDNode, NegNode) \
declare_c2_type(CosDNode, Node) \
declare_c2_type(SinDNode, Node) \
declare_c2_type(TanDNode, Node) \
declare_c2_type(AtanDNode, Node) \
declare_c2_type(SqrtDNode, Node) \
@ -2397,7 +2397,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
declare_constant(JVM_ACC_HAS_MIRANDA_METHODS) \
declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR) \
declare_constant(JVM_ACC_HAS_FINALIZER) \
declare_constant(JVM_ACC_IS_CLONEABLE) \
declare_constant(JVM_ACC_IS_CLONEABLE_FAST) \
declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE) \
declare_constant(JVM_ACC_PROMOTED_FLAGS) \
declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED) \