mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
Merge
This commit is contained in:
commit
bd885cddf0
278 changed files with 768 additions and 352 deletions
|
@ -53,6 +53,7 @@
|
||||||
#include "runtime/reflection.hpp"
|
#include "runtime/reflection.hpp"
|
||||||
#include "runtime/sharedRuntime.hpp"
|
#include "runtime/sharedRuntime.hpp"
|
||||||
#include "runtime/thread.inline.hpp"
|
#include "runtime/thread.inline.hpp"
|
||||||
|
#include "trace/tracing.hpp"
|
||||||
#include "utilities/dtrace.hpp"
|
#include "utilities/dtrace.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#ifdef COMPILER1
|
#ifdef COMPILER1
|
||||||
|
@ -1141,6 +1142,16 @@ void ciEnv::record_failure(const char* reason) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ciEnv::report_failure(const char* reason) {
|
||||||
|
// Create and fire JFR event
|
||||||
|
EventCompilerFailure event;
|
||||||
|
if (event.should_commit()) {
|
||||||
|
event.set_compileID(compile_id());
|
||||||
|
event.set_failure(reason);
|
||||||
|
event.commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// ciEnv::record_method_not_compilable()
|
// ciEnv::record_method_not_compilable()
|
||||||
void ciEnv::record_method_not_compilable(const char* reason, bool all_tiers) {
|
void ciEnv::record_method_not_compilable(const char* reason, bool all_tiers) {
|
||||||
|
|
|
@ -450,7 +450,8 @@ public:
|
||||||
// Check for changes to the system dictionary during compilation
|
// Check for changes to the system dictionary during compilation
|
||||||
bool system_dictionary_modification_counter_changed();
|
bool system_dictionary_modification_counter_changed();
|
||||||
|
|
||||||
void record_failure(const char* reason);
|
void record_failure(const char* reason); // Record failure and report later
|
||||||
|
void report_failure(const char* reason); // Report failure immediately
|
||||||
void record_method_not_compilable(const char* reason, bool all_tiers = true);
|
void record_method_not_compilable(const char* reason, bool all_tiers = true);
|
||||||
void record_out_of_memory_failure();
|
void record_out_of_memory_failure();
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "interpreter/bytecode.hpp"
|
#include "interpreter/bytecode.hpp"
|
||||||
#include "interpreter/bytecodes.hpp"
|
#include "interpreter/bytecodes.hpp"
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
|
#include "opto/compile.hpp"
|
||||||
#include "runtime/deoptimization.hpp"
|
#include "runtime/deoptimization.hpp"
|
||||||
#include "utilities/growableArray.hpp"
|
#include "utilities/growableArray.hpp"
|
||||||
|
|
||||||
|
@ -2646,7 +2647,7 @@ void ciTypeFlow::df_flow_types(Block* start,
|
||||||
assert (!blk->has_pre_order(), "");
|
assert (!blk->has_pre_order(), "");
|
||||||
blk->set_next_pre_order();
|
blk->set_next_pre_order();
|
||||||
|
|
||||||
if (_next_pre_order >= MaxNodeLimit / 2) {
|
if (_next_pre_order >= (int)Compile::current()->max_node_limit() / 2) {
|
||||||
// Too many basic blocks. Bail out.
|
// Too many basic blocks. Bail out.
|
||||||
// This can happen when try/finally constructs are nested to depth N,
|
// This can happen when try/finally constructs are nested to depth N,
|
||||||
// and there is O(2**N) cloning of jsr bodies. See bug 4697245!
|
// and there is O(2**N) cloning of jsr bodies. See bug 4697245!
|
||||||
|
|
|
@ -912,6 +912,8 @@ class ClassHierarchyWalker {
|
||||||
bool is_witness(Klass* k) {
|
bool is_witness(Klass* k) {
|
||||||
if (doing_subtype_search()) {
|
if (doing_subtype_search()) {
|
||||||
return Dependencies::is_concrete_klass(k);
|
return Dependencies::is_concrete_klass(k);
|
||||||
|
} else if (!k->oop_is_instance()) {
|
||||||
|
return false; // no methods to find in an array type
|
||||||
} else {
|
} else {
|
||||||
Method* m = InstanceKlass::cast(k)->find_method(_name, _signature);
|
Method* m = InstanceKlass::cast(k)->find_method(_name, _signature);
|
||||||
if (m == NULL || !Dependencies::is_concrete_method(m)) return false;
|
if (m == NULL || !Dependencies::is_concrete_method(m)) return false;
|
||||||
|
@ -1118,7 +1120,7 @@ Klass* ClassHierarchyWalker::find_witness_anywhere(Klass* context_type,
|
||||||
Klass* chain; // scratch variable
|
Klass* chain; // scratch variable
|
||||||
#define ADD_SUBCLASS_CHAIN(k) { \
|
#define ADD_SUBCLASS_CHAIN(k) { \
|
||||||
assert(chaini < CHAINMAX, "oob"); \
|
assert(chaini < CHAINMAX, "oob"); \
|
||||||
chain = InstanceKlass::cast(k)->subklass(); \
|
chain = k->subklass(); \
|
||||||
if (chain != NULL) chains[chaini++] = chain; }
|
if (chain != NULL) chains[chaini++] = chain; }
|
||||||
|
|
||||||
// Look for non-abstract subclasses.
|
// Look for non-abstract subclasses.
|
||||||
|
@ -1129,35 +1131,37 @@ Klass* ClassHierarchyWalker::find_witness_anywhere(Klass* context_type,
|
||||||
// (Their subclasses are additional indirect implementors.
|
// (Their subclasses are additional indirect implementors.
|
||||||
// See InstanceKlass::add_implementor.)
|
// See InstanceKlass::add_implementor.)
|
||||||
// (Note: nof_implementors is always zero for non-interfaces.)
|
// (Note: nof_implementors is always zero for non-interfaces.)
|
||||||
int nof_impls = InstanceKlass::cast(context_type)->nof_implementors();
|
if (top_level_call) {
|
||||||
if (nof_impls > 1) {
|
int nof_impls = InstanceKlass::cast(context_type)->nof_implementors();
|
||||||
// Avoid this case: *I.m > { A.m, C }; B.m > C
|
if (nof_impls > 1) {
|
||||||
// Here, I.m has 2 concrete implementations, but m appears unique
|
// Avoid this case: *I.m > { A.m, C }; B.m > C
|
||||||
// as A.m, because the search misses B.m when checking C.
|
// Here, I.m has 2 concrete implementations, but m appears unique
|
||||||
// The inherited method B.m was getting missed by the walker
|
// as A.m, because the search misses B.m when checking C.
|
||||||
// when interface 'I' was the starting point.
|
// The inherited method B.m was getting missed by the walker
|
||||||
// %%% Until this is fixed more systematically, bail out.
|
// when interface 'I' was the starting point.
|
||||||
// (Old CHA had the same limitation.)
|
// %%% Until this is fixed more systematically, bail out.
|
||||||
return context_type;
|
// (Old CHA had the same limitation.)
|
||||||
}
|
return context_type;
|
||||||
if (nof_impls > 0) {
|
|
||||||
Klass* impl = InstanceKlass::cast(context_type)->implementor();
|
|
||||||
assert(impl != NULL, "just checking");
|
|
||||||
// If impl is the same as the context_type, then more than one
|
|
||||||
// implementor has seen. No exact info in this case.
|
|
||||||
if (impl == context_type) {
|
|
||||||
return context_type; // report an inexact witness to this sad affair
|
|
||||||
}
|
}
|
||||||
if (do_counts)
|
if (nof_impls > 0) {
|
||||||
{ NOT_PRODUCT(deps_find_witness_steps++); }
|
Klass* impl = InstanceKlass::cast(context_type)->implementor();
|
||||||
if (is_participant(impl)) {
|
assert(impl != NULL, "just checking");
|
||||||
if (!participants_hide_witnesses) {
|
// If impl is the same as the context_type, then more than one
|
||||||
|
// implementor has seen. No exact info in this case.
|
||||||
|
if (impl == context_type) {
|
||||||
|
return context_type; // report an inexact witness to this sad affair
|
||||||
|
}
|
||||||
|
if (do_counts)
|
||||||
|
{ NOT_PRODUCT(deps_find_witness_steps++); }
|
||||||
|
if (is_participant(impl)) {
|
||||||
|
if (!participants_hide_witnesses) {
|
||||||
|
ADD_SUBCLASS_CHAIN(impl);
|
||||||
|
}
|
||||||
|
} else if (is_witness(impl) && !ignore_witness(impl)) {
|
||||||
|
return impl;
|
||||||
|
} else {
|
||||||
ADD_SUBCLASS_CHAIN(impl);
|
ADD_SUBCLASS_CHAIN(impl);
|
||||||
}
|
}
|
||||||
} else if (is_witness(impl) && !ignore_witness(impl)) {
|
|
||||||
return impl;
|
|
||||||
} else {
|
|
||||||
ADD_SUBCLASS_CHAIN(impl);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -594,7 +594,7 @@ void CompileTask::log_task_done(CompileLog* log) {
|
||||||
* Add a CompileTask to a CompileQueue.
|
* Add a CompileTask to a CompileQueue.
|
||||||
*/
|
*/
|
||||||
void CompileQueue::add(CompileTask* task) {
|
void CompileQueue::add(CompileTask* task) {
|
||||||
assert(lock()->owned_by_self(), "must own lock");
|
assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
|
||||||
|
|
||||||
task->set_next(NULL);
|
task->set_next(NULL);
|
||||||
task->set_prev(NULL);
|
task->set_prev(NULL);
|
||||||
|
@ -625,7 +625,7 @@ void CompileQueue::add(CompileTask* task) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify CompilerThreads that a task is available.
|
// Notify CompilerThreads that a task is available.
|
||||||
lock()->notify_all();
|
MethodCompileQueue_lock->notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -635,7 +635,7 @@ void CompileQueue::add(CompileTask* task) {
|
||||||
* compilation is disabled.
|
* compilation is disabled.
|
||||||
*/
|
*/
|
||||||
void CompileQueue::free_all() {
|
void CompileQueue::free_all() {
|
||||||
MutexLocker mu(lock());
|
MutexLocker mu(MethodCompileQueue_lock);
|
||||||
CompileTask* next = _first;
|
CompileTask* next = _first;
|
||||||
|
|
||||||
// Iterate over all tasks in the compile queue
|
// Iterate over all tasks in the compile queue
|
||||||
|
@ -653,14 +653,14 @@ void CompileQueue::free_all() {
|
||||||
_first = NULL;
|
_first = NULL;
|
||||||
|
|
||||||
// Wake up all threads that block on the queue.
|
// Wake up all threads that block on the queue.
|
||||||
lock()->notify_all();
|
MethodCompileQueue_lock->notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the next CompileTask from a CompileQueue
|
* Get the next CompileTask from a CompileQueue
|
||||||
*/
|
*/
|
||||||
CompileTask* CompileQueue::get() {
|
CompileTask* CompileQueue::get() {
|
||||||
MutexLocker locker(lock());
|
MutexLocker locker(MethodCompileQueue_lock);
|
||||||
// If _first is NULL we have no more compile jobs. There are two reasons for
|
// If _first is NULL we have no more compile jobs. There are two reasons for
|
||||||
// having no compile jobs: First, we compiled everything we wanted. Second,
|
// having no compile jobs: First, we compiled everything we wanted. Second,
|
||||||
// we ran out of code cache so compilation has been disabled. In the latter
|
// we ran out of code cache so compilation has been disabled. In the latter
|
||||||
|
@ -681,7 +681,7 @@ CompileTask* CompileQueue::get() {
|
||||||
// We need a timed wait here, since compiler threads can exit if compilation
|
// We need a timed wait here, since compiler threads can exit if compilation
|
||||||
// is disabled forever. We use 5 seconds wait time; the exiting of compiler threads
|
// is disabled forever. We use 5 seconds wait time; the exiting of compiler threads
|
||||||
// is not critical and we do not want idle compiler threads to wake up too often.
|
// is not critical and we do not want idle compiler threads to wake up too often.
|
||||||
lock()->wait(!Mutex::_no_safepoint_check_flag, 5*1000);
|
MethodCompileQueue_lock->wait(!Mutex::_no_safepoint_check_flag, 5*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CompileBroker::is_compilation_disabled_forever()) {
|
if (CompileBroker::is_compilation_disabled_forever()) {
|
||||||
|
@ -701,7 +701,7 @@ CompileTask* CompileQueue::get() {
|
||||||
// Clean & deallocate stale compile tasks.
|
// Clean & deallocate stale compile tasks.
|
||||||
// Temporarily releases MethodCompileQueue lock.
|
// Temporarily releases MethodCompileQueue lock.
|
||||||
void CompileQueue::purge_stale_tasks() {
|
void CompileQueue::purge_stale_tasks() {
|
||||||
assert(lock()->owned_by_self(), "must own lock");
|
assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
|
||||||
if (_first_stale != NULL) {
|
if (_first_stale != NULL) {
|
||||||
// Stale tasks are purged when MCQ lock is released,
|
// Stale tasks are purged when MCQ lock is released,
|
||||||
// but _first_stale updates are protected by MCQ lock.
|
// but _first_stale updates are protected by MCQ lock.
|
||||||
|
@ -710,7 +710,7 @@ void CompileQueue::purge_stale_tasks() {
|
||||||
CompileTask* head = _first_stale;
|
CompileTask* head = _first_stale;
|
||||||
_first_stale = NULL;
|
_first_stale = NULL;
|
||||||
{
|
{
|
||||||
MutexUnlocker ul(lock());
|
MutexUnlocker ul(MethodCompileQueue_lock);
|
||||||
for (CompileTask* task = head; task != NULL; ) {
|
for (CompileTask* task = head; task != NULL; ) {
|
||||||
CompileTask* next_task = task->next();
|
CompileTask* next_task = task->next();
|
||||||
CompileTaskWrapper ctw(task); // Frees the task
|
CompileTaskWrapper ctw(task); // Frees the task
|
||||||
|
@ -722,7 +722,7 @@ void CompileQueue::purge_stale_tasks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompileQueue::remove(CompileTask* task) {
|
void CompileQueue::remove(CompileTask* task) {
|
||||||
assert(lock()->owned_by_self(), "must own lock");
|
assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
|
||||||
if (task->prev() != NULL) {
|
if (task->prev() != NULL) {
|
||||||
task->prev()->set_next(task->next());
|
task->prev()->set_next(task->next());
|
||||||
} else {
|
} else {
|
||||||
|
@ -742,7 +742,7 @@ void CompileQueue::remove(CompileTask* task) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompileQueue::remove_and_mark_stale(CompileTask* task) {
|
void CompileQueue::remove_and_mark_stale(CompileTask* task) {
|
||||||
assert(lock()->owned_by_self(), "must own lock");
|
assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
|
||||||
remove(task);
|
remove(task);
|
||||||
|
|
||||||
// Enqueue the task for reclamation (should be done outside MCQ lock)
|
// Enqueue the task for reclamation (should be done outside MCQ lock)
|
||||||
|
@ -780,7 +780,7 @@ void CompileBroker::print_compile_queues(outputStream* st) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompileQueue::print(outputStream* st) {
|
void CompileQueue::print(outputStream* st) {
|
||||||
assert(lock()->owned_by_self(), "must own lock");
|
assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
|
||||||
st->print_cr("Contents of %s", name());
|
st->print_cr("Contents of %s", name());
|
||||||
st->print_cr("----------------------------");
|
st->print_cr("----------------------------");
|
||||||
CompileTask* task = _first;
|
CompileTask* task = _first;
|
||||||
|
@ -1066,11 +1066,11 @@ void CompileBroker::init_compiler_sweeper_threads(int c1_compiler_count, int c2_
|
||||||
#endif // !ZERO && !SHARK
|
#endif // !ZERO && !SHARK
|
||||||
// Initialize the compilation queue
|
// Initialize the compilation queue
|
||||||
if (c2_compiler_count > 0) {
|
if (c2_compiler_count > 0) {
|
||||||
_c2_compile_queue = new CompileQueue("C2 compile queue", MethodCompileQueue_lock);
|
_c2_compile_queue = new CompileQueue("C2 compile queue");
|
||||||
_compilers[1]->set_num_compiler_threads(c2_compiler_count);
|
_compilers[1]->set_num_compiler_threads(c2_compiler_count);
|
||||||
}
|
}
|
||||||
if (c1_compiler_count > 0) {
|
if (c1_compiler_count > 0) {
|
||||||
_c1_compile_queue = new CompileQueue("C1 compile queue", MethodCompileQueue_lock);
|
_c1_compile_queue = new CompileQueue("C1 compile queue");
|
||||||
_compilers[0]->set_num_compiler_threads(c1_compiler_count);
|
_compilers[0]->set_num_compiler_threads(c1_compiler_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1214,7 +1214,7 @@ void CompileBroker::compile_method_base(methodHandle method,
|
||||||
|
|
||||||
// Acquire our lock.
|
// Acquire our lock.
|
||||||
{
|
{
|
||||||
MutexLocker locker(queue->lock(), thread);
|
MutexLocker locker(MethodCompileQueue_lock, thread);
|
||||||
|
|
||||||
// Make sure the method has not slipped into the queues since
|
// Make sure the method has not slipped into the queues since
|
||||||
// last we checked; note that those checks were "fast bail-outs".
|
// last we checked; note that those checks were "fast bail-outs".
|
||||||
|
@ -1807,7 +1807,7 @@ void CompileBroker::init_compiler_thread_log() {
|
||||||
os::file_separator(), thread_id, os::current_process_id());
|
os::file_separator(), thread_id, os::current_process_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
fp = fopen(file_name, "at");
|
fp = fopen(file_name, "wt");
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
if (LogCompilation && Verbose) {
|
if (LogCompilation && Verbose) {
|
||||||
tty->print_cr("Opening compilation log %s", file_name);
|
tty->print_cr("Opening compilation log %s", file_name);
|
||||||
|
@ -1985,6 +1985,7 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
|
||||||
|
|
||||||
if (ci_env.failing()) {
|
if (ci_env.failing()) {
|
||||||
task->set_failure_reason(ci_env.failure_reason());
|
task->set_failure_reason(ci_env.failure_reason());
|
||||||
|
ci_env.report_failure(ci_env.failure_reason());
|
||||||
const char* retry_message = ci_env.retry_message();
|
const char* retry_message = ci_env.retry_message();
|
||||||
if (_compilation_log != NULL) {
|
if (_compilation_log != NULL) {
|
||||||
_compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
|
_compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
|
||||||
|
|
|
@ -195,7 +195,6 @@ class CompilerCounters : public CHeapObj<mtCompiler> {
|
||||||
class CompileQueue : public CHeapObj<mtCompiler> {
|
class CompileQueue : public CHeapObj<mtCompiler> {
|
||||||
private:
|
private:
|
||||||
const char* _name;
|
const char* _name;
|
||||||
Monitor* _lock;
|
|
||||||
|
|
||||||
CompileTask* _first;
|
CompileTask* _first;
|
||||||
CompileTask* _last;
|
CompileTask* _last;
|
||||||
|
@ -206,9 +205,8 @@ class CompileQueue : public CHeapObj<mtCompiler> {
|
||||||
|
|
||||||
void purge_stale_tasks();
|
void purge_stale_tasks();
|
||||||
public:
|
public:
|
||||||
CompileQueue(const char* name, Monitor* lock) {
|
CompileQueue(const char* name) {
|
||||||
_name = name;
|
_name = name;
|
||||||
_lock = lock;
|
|
||||||
_first = NULL;
|
_first = NULL;
|
||||||
_last = NULL;
|
_last = NULL;
|
||||||
_size = 0;
|
_size = 0;
|
||||||
|
@ -216,7 +214,6 @@ class CompileQueue : public CHeapObj<mtCompiler> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* name() const { return _name; }
|
const char* name() const { return _name; }
|
||||||
Monitor* lock() const { return _lock; }
|
|
||||||
|
|
||||||
void add(CompileTask* task);
|
void add(CompileTask* task);
|
||||||
void remove(CompileTask* task);
|
void remove(CompileTask* task);
|
||||||
|
@ -418,6 +415,7 @@ class CompileBroker: AllStatic {
|
||||||
shutdown_compilaton = 2
|
shutdown_compilaton = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static jint get_compilation_activity_mode() { return _should_compile_new_jobs; }
|
||||||
static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
|
static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
|
||||||
static bool set_should_compile_new_jobs(jint new_state) {
|
static bool set_should_compile_new_jobs(jint new_state) {
|
||||||
// Return success if the current caller set it
|
// Return success if the current caller set it
|
||||||
|
|
|
@ -56,8 +56,10 @@ CompileLog::CompileLog(const char* file_name, FILE* fp, intx thread_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
CompileLog::~CompileLog() {
|
CompileLog::~CompileLog() {
|
||||||
delete _out;
|
delete _out; // Close fd in fileStream::~fileStream()
|
||||||
_out = NULL;
|
_out = NULL;
|
||||||
|
// Remove partial file after merging in CompileLog::finish_log_on_error
|
||||||
|
unlink(_file);
|
||||||
FREE_C_HEAP_ARRAY(char, _identities, mtCompiler);
|
FREE_C_HEAP_ARRAY(char, _identities, mtCompiler);
|
||||||
FREE_C_HEAP_ARRAY(char, _file, mtCompiler);
|
FREE_C_HEAP_ARRAY(char, _file, mtCompiler);
|
||||||
}
|
}
|
||||||
|
@ -278,10 +280,9 @@ void CompileLog::finish_log_on_error(outputStream* file, char* buf, int buflen)
|
||||||
}
|
}
|
||||||
file->print_raw_cr("</compilation_log>");
|
file->print_raw_cr("</compilation_log>");
|
||||||
close(partial_fd);
|
close(partial_fd);
|
||||||
unlink(partial_file);
|
|
||||||
}
|
}
|
||||||
CompileLog* next_log = log->_next;
|
CompileLog* next_log = log->_next;
|
||||||
delete log;
|
delete log; // Removes partial file
|
||||||
log = next_log;
|
log = next_log;
|
||||||
}
|
}
|
||||||
_first = NULL;
|
_first = NULL;
|
||||||
|
|
|
@ -647,7 +647,7 @@
|
||||||
develop(bool, AlwaysIncrementalInline, false, \
|
develop(bool, AlwaysIncrementalInline, false, \
|
||||||
"do all inlining incrementally") \
|
"do all inlining incrementally") \
|
||||||
\
|
\
|
||||||
product(intx, LiveNodeCountInliningCutoff, 20000, \
|
product(intx, LiveNodeCountInliningCutoff, 40000, \
|
||||||
"max number of live nodes in a method") \
|
"max number of live nodes in a method") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, OptimizeExpensiveOps, true, \
|
diagnostic(bool, OptimizeExpensiveOps, true, \
|
||||||
|
|
|
@ -102,23 +102,25 @@ void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) {
|
||||||
// Attempt to compile while subsuming loads into machine instructions.
|
// Attempt to compile while subsuming loads into machine instructions.
|
||||||
Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing);
|
Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing);
|
||||||
|
|
||||||
|
|
||||||
// Check result and retry if appropriate.
|
// Check result and retry if appropriate.
|
||||||
if (C.failure_reason() != NULL) {
|
if (C.failure_reason() != NULL) {
|
||||||
if (C.failure_reason_is(retry_no_subsuming_loads())) {
|
if (C.failure_reason_is(retry_no_subsuming_loads())) {
|
||||||
assert(subsume_loads, "must make progress");
|
assert(subsume_loads, "must make progress");
|
||||||
subsume_loads = false;
|
subsume_loads = false;
|
||||||
|
env->report_failure(C.failure_reason());
|
||||||
continue; // retry
|
continue; // retry
|
||||||
}
|
}
|
||||||
if (C.failure_reason_is(retry_no_escape_analysis())) {
|
if (C.failure_reason_is(retry_no_escape_analysis())) {
|
||||||
assert(do_escape_analysis, "must make progress");
|
assert(do_escape_analysis, "must make progress");
|
||||||
do_escape_analysis = false;
|
do_escape_analysis = false;
|
||||||
|
env->report_failure(C.failure_reason());
|
||||||
continue; // retry
|
continue; // retry
|
||||||
}
|
}
|
||||||
if (C.has_boxed_value()) {
|
if (C.has_boxed_value()) {
|
||||||
// Recompile without boxing elimination regardless failure reason.
|
// Recompile without boxing elimination regardless failure reason.
|
||||||
assert(eliminate_boxing, "must make progress");
|
assert(eliminate_boxing, "must make progress");
|
||||||
eliminate_boxing = false;
|
eliminate_boxing = false;
|
||||||
|
env->report_failure(C.failure_reason());
|
||||||
continue; // retry
|
continue; // retry
|
||||||
}
|
}
|
||||||
// Pass any other failure reason up to the ciEnv.
|
// Pass any other failure reason up to the ciEnv.
|
||||||
|
|
|
@ -83,6 +83,101 @@ Node *ConstraintCastNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint CastIINode::size_of() const {
|
||||||
|
return sizeof(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint CastIINode::cmp(const Node &n) const {
|
||||||
|
return TypeNode::cmp(n) && ((CastIINode&)n)._carry_dependency == _carry_dependency;
|
||||||
|
}
|
||||||
|
|
||||||
|
Node *CastIINode::Identity(PhaseTransform *phase) {
|
||||||
|
if (_carry_dependency) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
return ConstraintCastNode::Identity(phase);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Type *CastIINode::Value(PhaseTransform *phase) const {
|
||||||
|
const Type *res = ConstraintCastNode::Value(phase);
|
||||||
|
|
||||||
|
// Try to improve the type of the CastII if we recognize a CmpI/If
|
||||||
|
// pattern.
|
||||||
|
if (_carry_dependency) {
|
||||||
|
if (in(0) != NULL && (in(0)->is_IfFalse() || in(0)->is_IfTrue())) {
|
||||||
|
Node* proj = in(0);
|
||||||
|
if (proj->in(0)->in(1)->is_Bool()) {
|
||||||
|
Node* b = proj->in(0)->in(1);
|
||||||
|
if (b->in(1)->Opcode() == Op_CmpI) {
|
||||||
|
Node* cmp = b->in(1);
|
||||||
|
if (cmp->in(1) == in(1) && phase->type(cmp->in(2))->isa_int()) {
|
||||||
|
const TypeInt* in2_t = phase->type(cmp->in(2))->is_int();
|
||||||
|
const Type* t = TypeInt::INT;
|
||||||
|
BoolTest test = b->as_Bool()->_test;
|
||||||
|
if (proj->is_IfFalse()) {
|
||||||
|
test = test.negate();
|
||||||
|
}
|
||||||
|
BoolTest::mask m = test._test;
|
||||||
|
jlong lo_long = min_jint;
|
||||||
|
jlong hi_long = max_jint;
|
||||||
|
if (m == BoolTest::le || m == BoolTest::lt) {
|
||||||
|
hi_long = in2_t->_hi;
|
||||||
|
if (m == BoolTest::lt) {
|
||||||
|
hi_long -= 1;
|
||||||
|
}
|
||||||
|
} else if (m == BoolTest::ge || m == BoolTest::gt) {
|
||||||
|
lo_long = in2_t->_lo;
|
||||||
|
if (m == BoolTest::gt) {
|
||||||
|
lo_long += 1;
|
||||||
|
}
|
||||||
|
} else if (m == BoolTest::eq) {
|
||||||
|
lo_long = in2_t->_lo;
|
||||||
|
hi_long = in2_t->_hi;
|
||||||
|
} else if (m == BoolTest::ne) {
|
||||||
|
// can't do any better
|
||||||
|
} else {
|
||||||
|
stringStream ss;
|
||||||
|
test.dump_on(&ss);
|
||||||
|
fatal(err_msg_res("unexpected comparison %s", ss.as_string()));
|
||||||
|
}
|
||||||
|
int lo_int = (int)lo_long;
|
||||||
|
int hi_int = (int)hi_long;
|
||||||
|
|
||||||
|
if (lo_long != (jlong)lo_int) {
|
||||||
|
lo_int = min_jint;
|
||||||
|
}
|
||||||
|
if (hi_long != (jlong)hi_int) {
|
||||||
|
hi_int = max_jint;
|
||||||
|
}
|
||||||
|
|
||||||
|
t = TypeInt::make(lo_int, hi_int, Type::WidenMax);
|
||||||
|
|
||||||
|
res = res->filter_speculative(t);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
Node *CastIINode::Ideal_DU_postCCP(PhaseCCP *ccp) {
|
||||||
|
if (_carry_dependency) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ConstraintCastNode::Ideal_DU_postCCP(ccp);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef PRODUCT
|
||||||
|
void CastIINode::dump_spec(outputStream *st) const {
|
||||||
|
TypeNode::dump_spec(st);
|
||||||
|
if (_carry_dependency) {
|
||||||
|
st->print(" carry dependency");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,25 @@ class ConstraintCastNode: public TypeNode {
|
||||||
//------------------------------CastIINode-------------------------------------
|
//------------------------------CastIINode-------------------------------------
|
||||||
// cast integer to integer (different range)
|
// cast integer to integer (different range)
|
||||||
class CastIINode: public ConstraintCastNode {
|
class CastIINode: public ConstraintCastNode {
|
||||||
|
private:
|
||||||
|
// Can this node be removed post CCP or does it carry a required dependency?
|
||||||
|
const bool _carry_dependency;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual uint cmp( const Node &n ) const;
|
||||||
|
virtual uint size_of() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CastIINode (Node *n, const Type *t ): ConstraintCastNode(n,t) {}
|
CastIINode(Node *n, const Type *t, bool carry_dependency = false)
|
||||||
|
: ConstraintCastNode(n,t), _carry_dependency(carry_dependency) {}
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
virtual uint ideal_reg() const { return Op_RegI; }
|
virtual uint ideal_reg() const { return Op_RegI; }
|
||||||
|
virtual Node *Identity( PhaseTransform *phase );
|
||||||
|
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||||
|
virtual Node *Ideal_DU_postCCP( PhaseCCP * );
|
||||||
|
#ifndef PRODUCT
|
||||||
|
virtual void dump_spec(outputStream *st) const;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------CastPPNode-------------------------------------
|
//------------------------------CastPPNode-------------------------------------
|
||||||
|
|
|
@ -67,7 +67,6 @@
|
||||||
#include "runtime/signature.hpp"
|
#include "runtime/signature.hpp"
|
||||||
#include "runtime/stubRoutines.hpp"
|
#include "runtime/stubRoutines.hpp"
|
||||||
#include "runtime/timer.hpp"
|
#include "runtime/timer.hpp"
|
||||||
#include "trace/tracing.hpp"
|
|
||||||
#include "utilities/copy.hpp"
|
#include "utilities/copy.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
@ -662,7 +661,8 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
|
||||||
_print_inlining_stream(NULL),
|
_print_inlining_stream(NULL),
|
||||||
_print_inlining_idx(0),
|
_print_inlining_idx(0),
|
||||||
_print_inlining_output(NULL),
|
_print_inlining_output(NULL),
|
||||||
_interpreter_frame_size(0) {
|
_interpreter_frame_size(0),
|
||||||
|
_max_node_limit(MaxNodeLimit) {
|
||||||
C = this;
|
C = this;
|
||||||
|
|
||||||
CompileWrapper cw(this);
|
CompileWrapper cw(this);
|
||||||
|
@ -975,7 +975,8 @@ Compile::Compile( ciEnv* ci_env,
|
||||||
_print_inlining_idx(0),
|
_print_inlining_idx(0),
|
||||||
_print_inlining_output(NULL),
|
_print_inlining_output(NULL),
|
||||||
_allowed_reasons(0),
|
_allowed_reasons(0),
|
||||||
_interpreter_frame_size(0) {
|
_interpreter_frame_size(0),
|
||||||
|
_max_node_limit(MaxNodeLimit) {
|
||||||
C = this;
|
C = this;
|
||||||
|
|
||||||
TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
|
TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
|
||||||
|
@ -1088,6 +1089,7 @@ void Compile::Init(int aliaslevel) {
|
||||||
set_do_method_data_update(false);
|
set_do_method_data_update(false);
|
||||||
set_age_code(has_method() && method()->profile_aging());
|
set_age_code(has_method() && method()->profile_aging());
|
||||||
set_rtm_state(NoRTM); // No RTM lock eliding by default
|
set_rtm_state(NoRTM); // No RTM lock eliding by default
|
||||||
|
method_has_option_value("MaxNodeLimit", _max_node_limit);
|
||||||
#if INCLUDE_RTM_OPT
|
#if INCLUDE_RTM_OPT
|
||||||
if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
|
if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
|
||||||
int rtm_state = method()->method_data()->rtm_state();
|
int rtm_state = method()->method_data()->rtm_state();
|
||||||
|
@ -3542,13 +3544,6 @@ void Compile::record_failure(const char* reason) {
|
||||||
_failure_reason = reason;
|
_failure_reason = reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventCompilerFailure event;
|
|
||||||
if (event.should_commit()) {
|
|
||||||
event.set_compileID(Compile::compile_id());
|
|
||||||
event.set_failure(reason);
|
|
||||||
event.commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
|
if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
|
||||||
C->print_method(PHASE_FAILURE);
|
C->print_method(PHASE_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,6 +289,7 @@ class Compile : public Phase {
|
||||||
int _freq_inline_size; // Max hot method inline size for this compilation
|
int _freq_inline_size; // Max hot method inline size for this compilation
|
||||||
int _fixed_slots; // count of frame slots not allocated by the register
|
int _fixed_slots; // count of frame slots not allocated by the register
|
||||||
// allocator i.e. locks, original deopt pc, etc.
|
// allocator i.e. locks, original deopt pc, etc.
|
||||||
|
uintx _max_node_limit; // Max unique node count during a single compilation.
|
||||||
// For deopt
|
// For deopt
|
||||||
int _orig_pc_slot;
|
int _orig_pc_slot;
|
||||||
int _orig_pc_slot_offset_in_bytes;
|
int _orig_pc_slot_offset_in_bytes;
|
||||||
|
@ -597,6 +598,9 @@ class Compile : public Phase {
|
||||||
void set_rtm_state(RTMState s) { _rtm_state = s; }
|
void set_rtm_state(RTMState s) { _rtm_state = s; }
|
||||||
bool use_rtm() const { return (_rtm_state & NoRTM) == 0; }
|
bool use_rtm() const { return (_rtm_state & NoRTM) == 0; }
|
||||||
bool profile_rtm() const { return _rtm_state == ProfileRTM; }
|
bool profile_rtm() const { return _rtm_state == ProfileRTM; }
|
||||||
|
uint max_node_limit() const { return (uint)_max_node_limit; }
|
||||||
|
void set_max_node_limit(uint n) { _max_node_limit = n; }
|
||||||
|
|
||||||
// check the CompilerOracle for special behaviours for this compile
|
// check the CompilerOracle for special behaviours for this compile
|
||||||
bool method_has_option(const char * option) {
|
bool method_has_option(const char * option) {
|
||||||
return method() != NULL && method()->has_option(option);
|
return method() != NULL && method()->has_option(option);
|
||||||
|
@ -735,7 +739,7 @@ class Compile : public Phase {
|
||||||
record_method_not_compilable(reason, true);
|
record_method_not_compilable(reason, true);
|
||||||
}
|
}
|
||||||
bool check_node_count(uint margin, const char* reason) {
|
bool check_node_count(uint margin, const char* reason) {
|
||||||
if (live_nodes() + margin > (uint)MaxNodeLimit) {
|
if (live_nodes() + margin > max_node_limit()) {
|
||||||
record_method_not_compilable(reason);
|
record_method_not_compilable(reason);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -418,6 +418,11 @@ void Parse::do_call() {
|
||||||
ciInstanceKlass* klass = ciEnv::get_instance_klass_for_declared_method_holder(holder);
|
ciInstanceKlass* klass = ciEnv::get_instance_klass_for_declared_method_holder(holder);
|
||||||
assert(declared_signature != NULL, "cannot be null");
|
assert(declared_signature != NULL, "cannot be null");
|
||||||
|
|
||||||
|
// Bump max node limit for JSR292 users
|
||||||
|
if (bc() == Bytecodes::_invokedynamic || orig_callee->is_method_handle_intrinsic()) {
|
||||||
|
C->set_max_node_limit(3*MaxNodeLimit);
|
||||||
|
}
|
||||||
|
|
||||||
// uncommon-trap when callee is unloaded, uninitialized or will not link
|
// uncommon-trap when callee is unloaded, uninitialized or will not link
|
||||||
// bailout when too many arguments for register representation
|
// bailout when too many arguments for register representation
|
||||||
if (!will_link || can_not_compile_call_site(orig_callee, klass)) {
|
if (!will_link || can_not_compile_call_site(orig_callee, klass)) {
|
||||||
|
|
|
@ -2417,7 +2417,7 @@ PhiNode *ConnectionGraph::create_split_phi(PhiNode *orig_phi, int alias_idx, Gro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((int) (C->live_nodes() + 2*NodeLimitFudgeFactor) > MaxNodeLimit) {
|
if (C->live_nodes() + 2*NodeLimitFudgeFactor > C->max_node_limit()) {
|
||||||
if (C->do_escape_analysis() == true && !C->failing()) {
|
if (C->do_escape_analysis() == true && !C->failing()) {
|
||||||
// Retry compilation without escape analysis.
|
// Retry compilation without escape analysis.
|
||||||
// If this is the first failure, the sentinel string will "stick"
|
// If this is the first failure, the sentinel string will "stick"
|
||||||
|
|
|
@ -527,6 +527,22 @@ bool PhaseChaitin::remove_node_if_not_used(Block* b, uint location, Node* n, uin
|
||||||
Node* def = n->in(0);
|
Node* def = n->in(0);
|
||||||
if (!n->is_Proj() ||
|
if (!n->is_Proj() ||
|
||||||
(_lrg_map.live_range_id(def) && !liveout->member(_lrg_map.live_range_id(def)))) {
|
(_lrg_map.live_range_id(def) && !liveout->member(_lrg_map.live_range_id(def)))) {
|
||||||
|
if (n->is_MachProj()) {
|
||||||
|
// Don't remove KILL projections if their "defining" nodes have
|
||||||
|
// memory effects (have SCMemProj projection node) -
|
||||||
|
// they are not dead even when their result is not used.
|
||||||
|
// For example, compareAndSwapL (and other CAS) and EncodeISOArray nodes.
|
||||||
|
// The method add_input_to_liveout() keeps such nodes alive (put them on liveout list)
|
||||||
|
// when it sees SCMemProj node in a block. Unfortunately SCMemProj node could be placed
|
||||||
|
// in block in such order that KILL MachProj nodes are processed first.
|
||||||
|
uint cnt = def->outcnt();
|
||||||
|
for (uint i = 0; i < cnt; i++) {
|
||||||
|
Node* proj = def->raw_out(i);
|
||||||
|
if (proj->Opcode() == Op_SCMemProj) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
b->remove_node(location);
|
b->remove_node(location);
|
||||||
LRG& lrg = lrgs(lid);
|
LRG& lrg = lrgs(lid);
|
||||||
if (lrg._def == n) {
|
if (lrg._def == n) {
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "memory/allocation.inline.hpp"
|
#include "memory/allocation.inline.hpp"
|
||||||
#include "opto/addnode.hpp"
|
#include "opto/addnode.hpp"
|
||||||
#include "opto/callnode.hpp"
|
#include "opto/callnode.hpp"
|
||||||
|
#include "opto/castnode.hpp"
|
||||||
#include "opto/connode.hpp"
|
#include "opto/connode.hpp"
|
||||||
#include "opto/convertnode.hpp"
|
#include "opto/convertnode.hpp"
|
||||||
#include "opto/divnode.hpp"
|
#include "opto/divnode.hpp"
|
||||||
|
@ -272,10 +273,9 @@ void IdealLoopTree::reassociate_invariants(PhaseIdealLoop *phase) {
|
||||||
bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const {
|
bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const {
|
||||||
Node *test = ((IdealLoopTree*)this)->tail();
|
Node *test = ((IdealLoopTree*)this)->tail();
|
||||||
int body_size = ((IdealLoopTree*)this)->_body.size();
|
int body_size = ((IdealLoopTree*)this)->_body.size();
|
||||||
int live_node_count = phase->C->live_nodes();
|
|
||||||
// Peeling does loop cloning which can result in O(N^2) node construction
|
// Peeling does loop cloning which can result in O(N^2) node construction
|
||||||
if( body_size > 255 /* Prevent overflow for large body_size */
|
if( body_size > 255 /* Prevent overflow for large body_size */
|
||||||
|| (body_size * body_size + live_node_count > MaxNodeLimit) ) {
|
|| (body_size * body_size + phase->C->live_nodes()) > phase->C->max_node_limit() ) {
|
||||||
return false; // too large to safely clone
|
return false; // too large to safely clone
|
||||||
}
|
}
|
||||||
while( test != _head ) { // Scan till run off top of loop
|
while( test != _head ) { // Scan till run off top of loop
|
||||||
|
@ -604,7 +604,7 @@ bool IdealLoopTree::policy_maximally_unroll( PhaseIdealLoop *phase ) const {
|
||||||
return false;
|
return false;
|
||||||
if (new_body_size > unroll_limit ||
|
if (new_body_size > unroll_limit ||
|
||||||
// Unrolling can result in a large amount of node construction
|
// Unrolling can result in a large amount of node construction
|
||||||
new_body_size >= MaxNodeLimit - (uint) phase->C->live_nodes()) {
|
new_body_size >= phase->C->max_node_limit() - phase->C->live_nodes()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,6 +885,20 @@ Node *PhaseIdealLoop::clone_up_backedge_goo( Node *back_ctrl, Node *preheader_ct
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PhaseIdealLoop::cast_incr_before_loop(Node* incr, Node* ctrl, Node* loop) {
|
||||||
|
Node* castii = new CastIINode(incr, TypeInt::INT, true);
|
||||||
|
castii->set_req(0, ctrl);
|
||||||
|
register_new_node(castii, ctrl);
|
||||||
|
for (DUIterator_Fast imax, i = incr->fast_outs(imax); i < imax; i++) {
|
||||||
|
Node* n = incr->fast_out(i);
|
||||||
|
if (n->is_Phi() && n->in(0) == loop) {
|
||||||
|
int nrep = n->replace_edge(incr, castii);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------insert_pre_post_loops--------------------------
|
//------------------------------insert_pre_post_loops--------------------------
|
||||||
// Insert pre and post loops. If peel_only is set, the pre-loop can not have
|
// Insert pre and post loops. If peel_only is set, the pre-loop can not have
|
||||||
// more iterations added. It acts as a 'peel' only, no lower-bound RCE, no
|
// more iterations added. It acts as a 'peel' only, no lower-bound RCE, no
|
||||||
|
@ -1081,6 +1095,24 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Nodes inside the loop may be control dependent on a predicate
|
||||||
|
// that was moved before the preloop. If the back branch of the main
|
||||||
|
// or post loops becomes dead, those nodes won't be dependent on the
|
||||||
|
// test that guards that loop nest anymore which could lead to an
|
||||||
|
// incorrect array access because it executes independently of the
|
||||||
|
// test that was guarding the loop nest. We add a special CastII on
|
||||||
|
// the if branch that enters the loop, between the input induction
|
||||||
|
// variable value and the induction variable Phi to preserve correct
|
||||||
|
// dependencies.
|
||||||
|
|
||||||
|
// CastII for the post loop:
|
||||||
|
bool inserted = cast_incr_before_loop(zer_opaq->in(1), zer_taken, post_head);
|
||||||
|
assert(inserted, "no castII inserted");
|
||||||
|
|
||||||
|
// CastII for the main loop:
|
||||||
|
inserted = cast_incr_before_loop(pre_incr, min_taken, main_head);
|
||||||
|
assert(inserted, "no castII inserted");
|
||||||
|
|
||||||
// Step B4: Shorten the pre-loop to run only 1 iteration (for now).
|
// Step B4: Shorten the pre-loop to run only 1 iteration (for now).
|
||||||
// RCE and alignment may change this later.
|
// RCE and alignment may change this later.
|
||||||
Node *cmp_end = pre_end->cmp_node();
|
Node *cmp_end = pre_end->cmp_node();
|
||||||
|
@ -2281,8 +2313,8 @@ bool IdealLoopTree::iteration_split_impl( PhaseIdealLoop *phase, Node_List &old_
|
||||||
|
|
||||||
// Skip next optimizations if running low on nodes. Note that
|
// Skip next optimizations if running low on nodes. Note that
|
||||||
// policy_unswitching and policy_maximally_unroll have this check.
|
// policy_unswitching and policy_maximally_unroll have this check.
|
||||||
uint nodes_left = MaxNodeLimit - (uint) phase->C->live_nodes();
|
int nodes_left = phase->C->max_node_limit() - phase->C->live_nodes();
|
||||||
if ((2 * _body.size()) > nodes_left) {
|
if ((int)(2 * _body.size()) > nodes_left) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,8 @@ bool IdealLoopTree::policy_unswitching( PhaseIdealLoop *phase ) const {
|
||||||
if (!_head->is_Loop()) {
|
if (!_head->is_Loop()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint nodes_left = MaxNodeLimit - phase->C->live_nodes();
|
int nodes_left = phase->C->max_node_limit() - phase->C->live_nodes();
|
||||||
if (2 * _body.size() > nodes_left) {
|
if ((int)(2 * _body.size()) > nodes_left) {
|
||||||
return false; // Too speculative if running low on nodes.
|
return false; // Too speculative if running low on nodes.
|
||||||
}
|
}
|
||||||
LoopNode* head = _head->as_Loop();
|
LoopNode* head = _head->as_Loop();
|
||||||
|
|
|
@ -602,6 +602,8 @@ class PhaseIdealLoop : public PhaseTransform {
|
||||||
return ctrl;
|
return ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cast_incr_before_loop(Node* incr, Node* ctrl, Node* loop);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool has_node( Node* n ) const {
|
bool has_node( Node* n ) const {
|
||||||
guarantee(n != NULL, "No Node.");
|
guarantee(n != NULL, "No Node.");
|
||||||
|
|
|
@ -736,7 +736,7 @@ static bool merge_point_too_heavy(Compile* C, Node* region) {
|
||||||
for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
|
for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
|
||||||
weight += region->fast_out(i)->outcnt();
|
weight += region->fast_out(i)->outcnt();
|
||||||
}
|
}
|
||||||
int nodes_left = MaxNodeLimit - C->live_nodes();
|
int nodes_left = C->max_node_limit() - C->live_nodes();
|
||||||
if (weight * 8 > nodes_left) {
|
if (weight * 8 > nodes_left) {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if (PrintOpto)
|
if (PrintOpto)
|
||||||
|
|
|
@ -561,7 +561,9 @@ const Type *MachProjNode::bottom_type() const {
|
||||||
const TypePtr *MachProjNode::adr_type() const {
|
const TypePtr *MachProjNode::adr_type() const {
|
||||||
if (bottom_type() == Type::MEMORY) {
|
if (bottom_type() == Type::MEMORY) {
|
||||||
// in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
|
// in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
|
||||||
const TypePtr* adr_type = in(0)->adr_type();
|
Node* ctrl = in(0);
|
||||||
|
if (ctrl == NULL) return NULL; // node is dead
|
||||||
|
const TypePtr* adr_type = ctrl->adr_type();
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (!is_error_reported() && !Node::in_dump())
|
if (!is_error_reported() && !Node::in_dump())
|
||||||
assert(adr_type != NULL, "source must have adr_type");
|
assert(adr_type != NULL, "source must have adr_type");
|
||||||
|
|
|
@ -52,6 +52,7 @@ uint MemNode::size_of() const { return sizeof(*this); }
|
||||||
|
|
||||||
const TypePtr *MemNode::adr_type() const {
|
const TypePtr *MemNode::adr_type() const {
|
||||||
Node* adr = in(Address);
|
Node* adr = in(Address);
|
||||||
|
if (adr == NULL) return NULL; // node is dead
|
||||||
const TypePtr* cross_check = NULL;
|
const TypePtr* cross_check = NULL;
|
||||||
DEBUG_ONLY(cross_check = _adr_type);
|
DEBUG_ONLY(cross_check = _adr_type);
|
||||||
return calculate_adr_type(adr->bottom_type(), cross_check);
|
return calculate_adr_type(adr->bottom_type(), cross_check);
|
||||||
|
@ -2741,6 +2742,7 @@ LoadStoreConditionalNode::LoadStoreConditionalNode( Node *c, Node *mem, Node *ad
|
||||||
// Do we Match on this edge index or not? Do not match memory
|
// Do we Match on this edge index or not? Do not match memory
|
||||||
const TypePtr* ClearArrayNode::adr_type() const {
|
const TypePtr* ClearArrayNode::adr_type() const {
|
||||||
Node *adr = in(3);
|
Node *adr = in(3);
|
||||||
|
if (adr == NULL) return NULL; // node is dead
|
||||||
return MemNode::calculate_adr_type(adr->bottom_type());
|
return MemNode::calculate_adr_type(adr->bottom_type());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -730,7 +730,11 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
virtual bool is_CFG() const { return false; }
|
virtual bool is_CFG() const { return false; }
|
||||||
virtual const Type *bottom_type() const {return Type::MEMORY;}
|
virtual const Type *bottom_type() const {return Type::MEMORY;}
|
||||||
virtual const TypePtr *adr_type() const { return in(0)->in(MemNode::Memory)->adr_type();}
|
virtual const TypePtr *adr_type() const {
|
||||||
|
Node* ctrl = in(0);
|
||||||
|
if (ctrl == NULL) return NULL; // node is dead
|
||||||
|
return ctrl->in(MemNode::Memory)->adr_type();
|
||||||
|
}
|
||||||
virtual uint ideal_reg() const { return 0;} // memory projections don't have a register
|
virtual uint ideal_reg() const { return 0;} // memory projections don't have a register
|
||||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
|
|
@ -102,7 +102,9 @@ const Type *ProjNode::bottom_type() const {
|
||||||
const TypePtr *ProjNode::adr_type() const {
|
const TypePtr *ProjNode::adr_type() const {
|
||||||
if (bottom_type() == Type::MEMORY) {
|
if (bottom_type() == Type::MEMORY) {
|
||||||
// in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
|
// in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
|
||||||
const TypePtr* adr_type = in(0)->adr_type();
|
Node* ctrl = in(0);
|
||||||
|
if (ctrl == NULL) return NULL; // node is dead
|
||||||
|
const TypePtr* adr_type = ctrl->adr_type();
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (!is_error_reported() && !Node::in_dump())
|
if (!is_error_reported() && !Node::in_dump())
|
||||||
assert(adr_type != NULL, "source must have adr_type");
|
assert(adr_type != NULL, "source must have adr_type");
|
||||||
|
|
|
@ -69,7 +69,7 @@ void Node::verify_construction() {
|
||||||
Compile::set_debug_idx(new_debug_idx);
|
Compile::set_debug_idx(new_debug_idx);
|
||||||
set_debug_idx( new_debug_idx );
|
set_debug_idx( new_debug_idx );
|
||||||
assert(Compile::current()->unique() < (INT_MAX - 1), "Node limit exceeded INT_MAX");
|
assert(Compile::current()->unique() < (INT_MAX - 1), "Node limit exceeded INT_MAX");
|
||||||
assert(Compile::current()->live_nodes() < (uint)MaxNodeLimit, "Live Node limit exceeded limit");
|
assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit(), "Live Node limit exceeded limit");
|
||||||
if (BreakAtNode != 0 && (_debug_idx == BreakAtNode || (int)_idx == BreakAtNode)) {
|
if (BreakAtNode != 0 && (_debug_idx == BreakAtNode || (int)_idx == BreakAtNode)) {
|
||||||
tty->print_cr("BreakAtNode: _idx=%d _debug_idx=%d", _idx, _debug_idx);
|
tty->print_cr("BreakAtNode: _idx=%d _debug_idx=%d", _idx, _debug_idx);
|
||||||
BREAKPOINT;
|
BREAKPOINT;
|
||||||
|
@ -313,7 +313,7 @@ inline int Node::Init(int req) {
|
||||||
Node::Node(uint req)
|
Node::Node(uint req)
|
||||||
: _idx(Init(req))
|
: _idx(Init(req))
|
||||||
{
|
{
|
||||||
assert( req < (uint)(MaxNodeLimit - NodeLimitFudgeFactor), "Input limit exceeded" );
|
assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" );
|
||||||
debug_only( verify_construction() );
|
debug_only( verify_construction() );
|
||||||
NOT_PRODUCT(nodes_created++);
|
NOT_PRODUCT(nodes_created++);
|
||||||
if (req == 0) {
|
if (req == 0) {
|
||||||
|
|
|
@ -1392,15 +1392,27 @@ void PhaseIterGVN::add_users_to_worklist( Node *n ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( use->is_Cmp() ) { // Enable CMP/BOOL optimization
|
uint use_op = use->Opcode();
|
||||||
|
if(use->is_Cmp()) { // Enable CMP/BOOL optimization
|
||||||
add_users_to_worklist(use); // Put Bool on worklist
|
add_users_to_worklist(use); // Put Bool on worklist
|
||||||
// Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
|
|
||||||
// phi merging either 0 or 1 onto the worklist
|
|
||||||
if (use->outcnt() > 0) {
|
if (use->outcnt() > 0) {
|
||||||
Node* bol = use->raw_out(0);
|
Node* bol = use->raw_out(0);
|
||||||
if (bol->outcnt() > 0) {
|
if (bol->outcnt() > 0) {
|
||||||
Node* iff = bol->raw_out(0);
|
Node* iff = bol->raw_out(0);
|
||||||
if (iff->outcnt() == 2) {
|
if (use_op == Op_CmpI &&
|
||||||
|
iff->is_CountedLoopEnd()) {
|
||||||
|
CountedLoopEndNode* cle = iff->as_CountedLoopEnd();
|
||||||
|
if (cle->limit() == n && cle->phi() != NULL) {
|
||||||
|
// If an opaque node feeds into the limit condition of a
|
||||||
|
// CountedLoop, we need to process the Phi node for the
|
||||||
|
// induction variable when the opaque node is removed:
|
||||||
|
// the range of values taken by the Phi is now known and
|
||||||
|
// so its type is also known.
|
||||||
|
_worklist.push(cle->phi());
|
||||||
|
}
|
||||||
|
} else if (iff->outcnt() == 2) {
|
||||||
|
// Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
|
||||||
|
// phi merging either 0 or 1 onto the worklist
|
||||||
Node* ifproj0 = iff->raw_out(0);
|
Node* ifproj0 = iff->raw_out(0);
|
||||||
Node* ifproj1 = iff->raw_out(1);
|
Node* ifproj1 = iff->raw_out(1);
|
||||||
if (ifproj0->outcnt() > 0 && ifproj1->outcnt() > 0) {
|
if (ifproj0->outcnt() > 0 && ifproj1->outcnt() > 0) {
|
||||||
|
@ -1412,9 +1424,26 @@ void PhaseIterGVN::add_users_to_worklist( Node *n ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (use_op == Op_CmpI) {
|
||||||
|
Node* in1 = use->in(1);
|
||||||
|
for (uint i = 0; i < in1->outcnt(); i++) {
|
||||||
|
if (in1->raw_out(i)->Opcode() == Op_CastII) {
|
||||||
|
Node* castii = in1->raw_out(i);
|
||||||
|
if (castii->in(0) != NULL && castii->in(0)->in(0) != NULL && castii->in(0)->in(0)->is_If()) {
|
||||||
|
Node* ifnode = castii->in(0)->in(0);
|
||||||
|
if (ifnode->in(1) != NULL && ifnode->in(1)->in(1) == use) {
|
||||||
|
// Reprocess a CastII node that may depend on an
|
||||||
|
// opaque node value when the opaque node is
|
||||||
|
// removed. In case it carries a dependency we can do
|
||||||
|
// a better job of computing its type.
|
||||||
|
_worklist.push(castii);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint use_op = use->Opcode();
|
|
||||||
// If changed Cast input, check Phi users for simple cycles
|
// If changed Cast input, check Phi users for simple cycles
|
||||||
if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
|
if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
|
||||||
for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
|
for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
|
||||||
|
|
|
@ -1147,12 +1147,10 @@ const Type *BoolTest::cc2logical( const Type *CC ) const {
|
||||||
|
|
||||||
//------------------------------dump_spec-------------------------------------
|
//------------------------------dump_spec-------------------------------------
|
||||||
// Print special per-node info
|
// Print special per-node info
|
||||||
#ifndef PRODUCT
|
|
||||||
void BoolTest::dump_on(outputStream *st) const {
|
void BoolTest::dump_on(outputStream *st) const {
|
||||||
const char *msg[] = {"eq","gt","of","lt","ne","le","nof","ge"};
|
const char *msg[] = {"eq","gt","of","lt","ne","le","nof","ge"};
|
||||||
st->print("%s", msg[_test]);
|
st->print("%s", msg[_test]);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
uint BoolNode::hash() const { return (Node::hash() << 3)|(_test._test+1); }
|
uint BoolNode::hash() const { return (Node::hash() << 3)|(_test._test+1); }
|
||||||
|
|
|
@ -275,9 +275,7 @@ struct BoolTest VALUE_OBJ_CLASS_SPEC {
|
||||||
mask commute( ) const { return mask("032147658"[_test]-'0'); }
|
mask commute( ) const { return mask("032147658"[_test]-'0'); }
|
||||||
mask negate( ) const { return mask(_test^4); }
|
mask negate( ) const { return mask(_test^4); }
|
||||||
bool is_canonical( ) const { return (_test == BoolTest::ne || _test == BoolTest::lt || _test == BoolTest::le || _test == BoolTest::overflow); }
|
bool is_canonical( ) const { return (_test == BoolTest::ne || _test == BoolTest::lt || _test == BoolTest::le || _test == BoolTest::overflow); }
|
||||||
#ifndef PRODUCT
|
|
||||||
void dump_on(outputStream *st) const;
|
void dump_on(outputStream *st) const;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------BoolNode---------------------------------------
|
//------------------------------BoolNode---------------------------------------
|
||||||
|
|
|
@ -961,6 +961,16 @@ WB_ENTRY(jobjectArray, WB_GetCodeHeapEntries(JNIEnv* env, jobject o, jint blob_t
|
||||||
return result;
|
return result;
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
|
WB_ENTRY(jint, WB_GetCompilationActivityMode(JNIEnv* env, jobject o))
|
||||||
|
return CompileBroker::get_compilation_activity_mode();
|
||||||
|
WB_END
|
||||||
|
|
||||||
|
WB_ENTRY(jobjectArray, WB_GetCodeBlob(JNIEnv* env, jobject o, jlong addr))
|
||||||
|
ThreadToNativeFromVM ttn(thread);
|
||||||
|
CodeBlobStub stub((CodeBlob*) addr);
|
||||||
|
return codeBlob2objectArray(thread, env, &stub);
|
||||||
|
WB_END
|
||||||
|
|
||||||
WB_ENTRY(jlong, WB_GetThreadStackSize(JNIEnv* env, jobject o))
|
WB_ENTRY(jlong, WB_GetThreadStackSize(JNIEnv* env, jobject o))
|
||||||
return (jlong) Thread::current()->stack_size();
|
return (jlong) Thread::current()->stack_size();
|
||||||
WB_END
|
WB_END
|
||||||
|
@ -1215,6 +1225,9 @@ static JNINativeMethod methods[] = {
|
||||||
{CC"allocateCodeBlob", CC"(II)J", (void*)&WB_AllocateCodeBlob },
|
{CC"allocateCodeBlob", CC"(II)J", (void*)&WB_AllocateCodeBlob },
|
||||||
{CC"freeCodeBlob", CC"(J)V", (void*)&WB_FreeCodeBlob },
|
{CC"freeCodeBlob", CC"(J)V", (void*)&WB_FreeCodeBlob },
|
||||||
{CC"getCodeHeapEntries", CC"(I)[Ljava/lang/Object;",(void*)&WB_GetCodeHeapEntries },
|
{CC"getCodeHeapEntries", CC"(I)[Ljava/lang/Object;",(void*)&WB_GetCodeHeapEntries },
|
||||||
|
{CC"getCompilationActivityMode",
|
||||||
|
CC"()I", (void*)&WB_GetCompilationActivityMode},
|
||||||
|
{CC"getCodeBlob", CC"(J)[Ljava/lang/Object;",(void*)&WB_GetCodeBlob },
|
||||||
{CC"getThreadStackSize", CC"()J", (void*)&WB_GetThreadStackSize },
|
{CC"getThreadStackSize", CC"()J", (void*)&WB_GetThreadStackSize },
|
||||||
{CC"getThreadRemainingStackSize", CC"()J", (void*)&WB_GetThreadRemainingStackSize },
|
{CC"getThreadRemainingStackSize", CC"()J", (void*)&WB_GetThreadRemainingStackSize },
|
||||||
};
|
};
|
||||||
|
|
|
@ -432,6 +432,7 @@ class VM_PrintCompileQueue: public VM_Operation {
|
||||||
public:
|
public:
|
||||||
VM_PrintCompileQueue(outputStream* st) : _out(st) {}
|
VM_PrintCompileQueue(outputStream* st) : _out(st) {}
|
||||||
VMOp_Type type() const { return VMOp_PrintCompileQueue; }
|
VMOp_Type type() const { return VMOp_PrintCompileQueue; }
|
||||||
|
Mode evaluation_mode() const { return _no_safepoint; }
|
||||||
void doit();
|
void doit();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,6 +26,10 @@
|
||||||
# Makefile to run various hotspot tests
|
# Makefile to run various hotspot tests
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ALT_MAKE ?= closed
|
||||||
|
|
||||||
|
-include $(ALT_MAKE)/Makefile
|
||||||
|
|
||||||
GETMIXEDPATH=echo
|
GETMIXEDPATH=echo
|
||||||
|
|
||||||
# Utilities used
|
# Utilities used
|
||||||
|
@ -305,14 +309,27 @@ jtreg_tests: prep $(PRODUCT_HOME) $(JTREG)
|
||||||
|
|
||||||
PHONY_LIST += jtreg_tests
|
PHONY_LIST += jtreg_tests
|
||||||
|
|
||||||
|
# flags used to execute java in test targets
|
||||||
|
TEST_FLAGS += -version -Xinternalversion -X -help
|
||||||
|
|
||||||
|
sanitytest: prep $(PRODUCT_HOME)
|
||||||
|
@for flag in $(TEST_FLAGS); \
|
||||||
|
do \
|
||||||
|
echo Executing java $(JAVA_OPTIONS) $$flag; \
|
||||||
|
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) $$flag; \
|
||||||
|
res=$$?; \
|
||||||
|
if [ $$res -ne 0 ]; then \
|
||||||
|
exit $$res; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
PHONY_LIST += sanitytest
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
# clienttest (make sure various basic java client options work)
|
# clienttest (make sure various basic java client options work)
|
||||||
|
|
||||||
hotspot_clienttest clienttest: prep $(PRODUCT_HOME)
|
hotspot_clienttest clienttest: sanitytest
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
|
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
|
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
|
|
||||||
$(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa
|
$(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa
|
||||||
$(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
|
$(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
|
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
|
||||||
|
@ -323,10 +340,7 @@ PHONY_LIST += hotspot_clienttest clienttest
|
||||||
|
|
||||||
# minimaltest (make sure various basic java minimal options work)
|
# minimaltest (make sure various basic java minimal options work)
|
||||||
|
|
||||||
hotspot_minimaltest minimaltest: prep $(PRODUCT_HOME)
|
hotspot_minimaltest minimaltest: sanitytest
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
|
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
|
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
|
|
||||||
|
|
||||||
PHONY_LIST += hotspot_minimaltest minimaltest
|
PHONY_LIST += hotspot_minimaltest minimaltest
|
||||||
|
|
||||||
|
@ -334,10 +348,7 @@ PHONY_LIST += hotspot_minimaltest minimaltest
|
||||||
|
|
||||||
# servertest (make sure various basic java server options work)
|
# servertest (make sure various basic java server options work)
|
||||||
|
|
||||||
hotspot_servertest servertest: prep $(PRODUCT_HOME)
|
hotspot_servertest servertest: sanitytest
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
|
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
|
|
||||||
$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
|
|
||||||
|
|
||||||
PHONY_LIST += hotspot_servertest servertest
|
PHONY_LIST += hotspot_servertest servertest
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,8 @@ jre = \
|
||||||
# Tests that require the full JRE
|
# Tests that require the full JRE
|
||||||
#
|
#
|
||||||
needs_jre = \
|
needs_jre = \
|
||||||
compiler/6852078/Test6852078.java \
|
compiler/c2/6852078/Test6852078.java \
|
||||||
compiler/7047069/Test7047069.java \
|
compiler/c2/7047069/Test7047069.java \
|
||||||
runtime/6294277/SourceDebugExtension.java \
|
runtime/6294277/SourceDebugExtension.java \
|
||||||
runtime/ClassFile/JsrRewriting.java \
|
runtime/ClassFile/JsrRewriting.java \
|
||||||
runtime/ClassFile/OomWhileParsingRepeatedJsr.java
|
runtime/ClassFile/OomWhileParsingRepeatedJsr.java
|
||||||
|
@ -325,245 +325,85 @@ hotspot_wbapitest = \
|
||||||
sanity/
|
sanity/
|
||||||
|
|
||||||
hotspot_compiler_1 = \
|
hotspot_compiler_1 = \
|
||||||
compiler/5057225/Test5057225.java \
|
compiler/arraycopy/ \
|
||||||
compiler/5091921/Test5091921.java \
|
compiler/c1/ \
|
||||||
compiler/5091921/Test6186134.java \
|
compiler/c2/ \
|
||||||
compiler/5091921/Test6196102.java \
|
-compiler/c2/5091921/Test6850611.java \
|
||||||
compiler/5091921/Test6357214.java \
|
-compiler/c2/5091921/Test6890943.java \
|
||||||
compiler/5091921/Test6559156.java \
|
-compiler/c2/5091921/Test6905845.java \
|
||||||
compiler/5091921/Test6753639.java \
|
-compiler/c2/6340864 \
|
||||||
compiler/5091921/Test6935022.java \
|
-compiler/c2/6589834 \
|
||||||
compiler/5091921/Test6959129.java \
|
-compiler/c2/6603011 \
|
||||||
compiler/5091921/Test6985295.java \
|
-compiler/c2/6912517 \
|
||||||
compiler/5091921/Test6992759.java \
|
-compiler/c2/6792161 \
|
||||||
compiler/5091921/Test7005594.java \
|
-compiler/c2/7070134 \
|
||||||
compiler/5091921/Test7020614.java \
|
-compiler/c2/8004867
|
||||||
compiler/6378821/Test6378821.java \
|
|
||||||
compiler/6431242/Test.java \
|
|
||||||
compiler/6443505/Test6443505.java \
|
|
||||||
compiler/6478991/NullCheckTest.java \
|
|
||||||
compiler/6539464/Test.java \
|
|
||||||
compiler/6579789/Test6579789.java \
|
|
||||||
compiler/6636138/ \
|
|
||||||
compiler/6646019/Test.java \
|
|
||||||
compiler/6659207/Test.java \
|
|
||||||
compiler/6661247/Test.java \
|
|
||||||
compiler/6663621/IVTest.java \
|
|
||||||
compiler/6689060/Test.java \
|
|
||||||
compiler/6695810/Test.java \
|
|
||||||
compiler/6700047/Test6700047.java \
|
|
||||||
compiler/6711100/Test.java \
|
|
||||||
compiler/6724218/Test.java \
|
|
||||||
compiler/6732154/Test6732154.java \
|
|
||||||
compiler/6758234/Test6758234.java \
|
|
||||||
compiler/6769124/ \
|
|
||||||
compiler/6772683/InterruptedTest.java \
|
|
||||||
compiler/6778657/Test.java \
|
|
||||||
compiler/6795161/Test.java \
|
|
||||||
compiler/6795362/Test6795362.java \
|
|
||||||
compiler/6795465/Test6795465.java \
|
|
||||||
compiler/6796786/Test6796786.java \
|
|
||||||
compiler/6799693/Test.java \
|
|
||||||
compiler/6805724/Test6805724.java \
|
|
||||||
compiler/6814842/Test6814842.java \
|
|
||||||
compiler/6823453/Test.java \
|
|
||||||
compiler/6833129/Test.java \
|
|
||||||
compiler/6837011/Test6837011.java \
|
|
||||||
compiler/6843752/Test.java \
|
|
||||||
compiler/6849574/Test.java \
|
|
||||||
compiler/6855164/Test.java \
|
|
||||||
compiler/6855215/Test6855215.java \
|
|
||||||
compiler/6857159/Test6857159.java \
|
|
||||||
compiler/6860469/Test.java \
|
|
||||||
compiler/6863155/Test6863155.java \
|
|
||||||
compiler/6863420/Test.java \
|
|
||||||
compiler/6865265/StackOverflowBug.java \
|
|
||||||
compiler/6879902/Test6879902.java \
|
|
||||||
compiler/6880034/Test6880034.java \
|
|
||||||
compiler/6891750/Test6891750.java \
|
|
||||||
compiler/6892265/Test.java \
|
|
||||||
compiler/6894807/IsInstanceTest.java \
|
|
||||||
compiler/6901572/Test.java \
|
|
||||||
compiler/6909839/Test6909839.java \
|
|
||||||
compiler/6910484/Test.java \
|
|
||||||
compiler/6910605/Test.java \
|
|
||||||
compiler/6910618/Test.java \
|
|
||||||
compiler/6916644/Test6916644.java \
|
|
||||||
compiler/6921969/TestMultiplyLongHiZero.java \
|
|
||||||
compiler/6930043/Test6930043.java \
|
|
||||||
compiler/6932496/Test6932496.java \
|
|
||||||
compiler/6956668/Test6956668.java \
|
|
||||||
compiler/6968348/Test6968348.java \
|
|
||||||
compiler/6973329/Test.java
|
|
||||||
|
|
||||||
hotspot_compiler_2 = \
|
|
||||||
compiler/6982370/Test6982370.java \
|
|
||||||
compiler/7009231/Test7009231.java \
|
|
||||||
compiler/7009359/Test7009359.java \
|
|
||||||
compiler/7017746/Test.java \
|
|
||||||
compiler/7024475/Test7024475.java \
|
|
||||||
compiler/7041100/Test7041100.java \
|
|
||||||
compiler/7044738/Test7044738.java \
|
|
||||||
compiler/7046096/Test7046096.java \
|
|
||||||
compiler/7048332/Test7048332.java \
|
|
||||||
compiler/7068051/Test7068051.java \
|
|
||||||
compiler/7082949/Test7082949.java \
|
|
||||||
compiler/7088020/Test7088020.java \
|
|
||||||
compiler/7090976/Test7090976.java \
|
|
||||||
compiler/7103261/Test7103261.java \
|
|
||||||
compiler/7110586/Test7110586.java \
|
|
||||||
compiler/7119644/ \
|
|
||||||
compiler/7141637/SpreadNullArg.java \
|
|
||||||
compiler/7169782/Test7169782.java \
|
|
||||||
compiler/7174363/Test7174363.java \
|
|
||||||
compiler/7179138/ \
|
|
||||||
compiler/7190310/ \
|
|
||||||
compiler/7192963/ \
|
|
||||||
compiler/7200264/TestIntVect.java \
|
|
||||||
compiler/8000805/Test8000805.java \
|
|
||||||
compiler/8002069/Test8002069.java \
|
|
||||||
compiler/8004741/Test8004741.java \
|
|
||||||
compiler/8005033/Test8005033.java \
|
|
||||||
compiler/8005419/Test8005419.java \
|
|
||||||
compiler/8005956/PolynomialRoot.java \
|
|
||||||
compiler/8007294/Test8007294.java \
|
|
||||||
compiler/EliminateAutoBox/UnsignedLoads.java
|
|
||||||
|
|
||||||
hotspot_compiler_3 = \
|
|
||||||
compiler/8007722/Test8007722.java \
|
|
||||||
compiler/8009761/Test8009761.java \
|
|
||||||
compiler/8010927/Test8010927.java \
|
|
||||||
compiler/8011706/Test8011706.java \
|
|
||||||
compiler/8011771/Test8011771.java \
|
|
||||||
compiler/8011901/Test8011901.java \
|
|
||||||
compiler/arraycopy/TestMissingControl.java \
|
|
||||||
compiler/ciReplay/TestVM_no_comp_level.sh \
|
|
||||||
compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java \
|
|
||||||
compiler/codecache/CheckSegmentedCodeCache.java \
|
|
||||||
compiler/codecache/CheckUpperLimit.java \
|
|
||||||
compiler/codegen/ \
|
|
||||||
compiler/cpuflags/RestoreMXCSR.java \
|
|
||||||
compiler/EscapeAnalysis/ \
|
|
||||||
compiler/exceptions/ \
|
|
||||||
compiler/floatingpoint/ModNaN.java \
|
|
||||||
compiler/gcbarriers/G1CrashTest.java \
|
|
||||||
compiler/inlining/ \
|
|
||||||
compiler/IntegerArithmetic/TestIntegerComparison.java \
|
|
||||||
compiler/intrinsics/bmi/TestAndnI.java \
|
|
||||||
compiler/intrinsics/bmi/TestAndnI.java \
|
|
||||||
compiler/intrinsics/bmi/TestAndnL.java \
|
|
||||||
compiler/intrinsics/bmi/TestBlsiI.java \
|
|
||||||
compiler/intrinsics/bmi/TestBlsiL.java \
|
|
||||||
compiler/intrinsics/bmi/TestBlsmskI.java \
|
|
||||||
compiler/intrinsics/bmi/TestBlsmskL.java \
|
|
||||||
compiler/intrinsics/bmi/TestBlsrI.java \
|
|
||||||
compiler/intrinsics/bmi/TestBlsrL.java \
|
|
||||||
compiler/intrinsics/bmi/TestLzcntI.java \
|
|
||||||
compiler/intrinsics/bmi/TestLzcntL.java \
|
|
||||||
compiler/intrinsics/bmi/TestTzcntI.java \
|
|
||||||
compiler/intrinsics/bmi/TestTzcntL.java \
|
|
||||||
compiler/intrinsics/clone/TestObjectClone.java \
|
|
||||||
compiler/intrinsics/hashcode/TestHashCode.java \
|
|
||||||
compiler/intrinsics/mathexact/CompareTest.java \
|
|
||||||
compiler/intrinsics/mathexact/GVNTest.java \
|
|
||||||
compiler/intrinsics/mathexact/NegExactILoadTest.java \
|
|
||||||
compiler/intrinsics/mathexact/NegExactILoopDependentTest.java \
|
|
||||||
compiler/intrinsics/mathexact/NegExactINonConstantTest.java \
|
|
||||||
compiler/intrinsics/mathexact/SubExactICondTest.java \
|
|
||||||
compiler/intrinsics/mathexact/SubExactILoadTest.java \
|
|
||||||
compiler/intrinsics/mathexact/SubExactILoopDependentTest.java \
|
|
||||||
compiler/intrinsics/stringequals/TestStringEqualsBadLength.java \
|
|
||||||
compiler/intrinsics/unsafe/UnsafeGetAddressTest.java \
|
|
||||||
compiler/intrinsics/classcast/NullCheckDroppingsTest.java \
|
|
||||||
compiler/jsr292/ConcurrentClassLoadingTest.java \
|
|
||||||
compiler/jsr292/CreatesInterfaceDotEqualsCallInfo.java \
|
|
||||||
compiler/loopopts/TestLogSum.java \
|
|
||||||
compiler/macronodes/TestEliminateAllocationPhi.java \
|
|
||||||
compiler/membars/TestMemBarAcquire.java \
|
|
||||||
compiler/osr/TestOSRWithNonEmptyStack.java \
|
|
||||||
compiler/profiling/TestMethodHandleInvokesIntrinsic.java \
|
|
||||||
compiler/profiling/TestSpecTrapClassUnloading.java \
|
|
||||||
compiler/profiling/TestUnexpectedProfilingMismatch.java \
|
|
||||||
compiler/regalloc/C1ObjectSpillInLogicOp.java \
|
|
||||||
compiler/startup/NumCompilerThreadsCheck.java \
|
|
||||||
compiler/startup/SmallCodeCacheStartup.java \
|
|
||||||
compiler/types/TestSpeculationFailedHigherEqual.java \
|
|
||||||
compiler/types/TypeSpeculation.java \
|
|
||||||
compiler/uncommontrap/StackOverflowGuardPagesOff.java \
|
|
||||||
compiler/uncommontrap/TestStackBangMonitorOwned.java \
|
|
||||||
compiler/uncommontrap/TestStackBangRbp.java \
|
|
||||||
compiler/unsafe/GetUnsafeObjectG1PreBarrier.java
|
|
||||||
|
|
||||||
|
hotspot_compiler_2 = \
|
||||||
|
compiler/classUnloading/ \
|
||||||
|
compiler/codecache/ \
|
||||||
|
compiler/codegen/ \
|
||||||
|
compiler/cpuflags/ \
|
||||||
|
compiler/dependencies/ \
|
||||||
|
compiler/eliminateAutobox/ \
|
||||||
|
compiler/escapeAnalysis/ \
|
||||||
|
compiler/exceptions/ \
|
||||||
|
compiler/floatingpoint/ \
|
||||||
|
compiler/gcbarriers/ \
|
||||||
|
compiler/inlining/ \
|
||||||
|
compiler/integerArithmetic/ \
|
||||||
|
compiler/interpreter/ \
|
||||||
|
-compiler/codegen/7184394
|
||||||
|
|
||||||
|
hotspot_compiler_3 = \
|
||||||
|
compiler/intrinsics/ \
|
||||||
|
compiler/jsr292/ \
|
||||||
|
compiler/loopopts/ \
|
||||||
|
compiler/macronodes/ \
|
||||||
|
compiler/osr/ \
|
||||||
|
compiler/regalloc/ \
|
||||||
|
compiler/runtime/ \
|
||||||
|
compiler/startup/ \
|
||||||
|
compiler/types/ \
|
||||||
|
compiler/uncommontrap/ \
|
||||||
|
compiler/unsafe/ \
|
||||||
|
-compiler/intrinsics/bmi/verifycode \
|
||||||
|
-compiler/intrinsics/mathexact \
|
||||||
|
-compiler/intrinsics/multiplytolen \
|
||||||
|
-compiler/intrinsics/sha \
|
||||||
|
-compiler/loopopts/7052494 \
|
||||||
|
-compiler/runtime/6826736
|
||||||
|
|
||||||
hotspot_compiler_closed = \
|
hotspot_compiler_closed = \
|
||||||
closed/compiler/4292742/Test.java \
|
closed/compiler/c1/ \
|
||||||
closed/compiler/4474154/Test4474154.java \
|
closed/compiler/c2/ \
|
||||||
closed/compiler/4482613/Test4482613.java \
|
closed/compiler/codegen/ \
|
||||||
closed/compiler/4490177/tctest.java \
|
closed/compiler/escapeAnalysis/ \
|
||||||
closed/compiler/4495990/Application.java \
|
closed/compiler/interpreter/ \
|
||||||
closed/compiler/4522874/Test4522874.sh \
|
closed/compiler/jsr292/ \
|
||||||
closed/compiler/4629512/Test4629512.java \
|
closed/compiler/loopopts/ \
|
||||||
closed/compiler/4647299/Looper.java \
|
closed/compiler/oracle/ \
|
||||||
closed/compiler/4655758/TestClass.java \
|
closed/compiler/runtime/ \
|
||||||
closed/compiler/4671453/LongCompTest.java \
|
closed/compiler/symantec/ \
|
||||||
closed/compiler/4671460/CharArrTest.java \
|
-closed/compiler/c1/4477197 \
|
||||||
closed/compiler/4709105/StringTest2.java \
|
-closed/compiler/c1/5040872 \
|
||||||
closed/compiler/4732721/Bug.java \
|
-closed/compiler/c1/6507107 \
|
||||||
closed/compiler/4750681/ReadTest.java \
|
-closed/compiler/c2/4344895 \
|
||||||
closed/compiler/4787943/LongCrash.java \
|
-closed/compiler/c2/4485006 \
|
||||||
closed/compiler/4819903/Base64Test.java \
|
-closed/compiler/c2/4523683 \
|
||||||
closed/compiler/4903383/Test.java \
|
-closed/compiler/c2/4620290 \
|
||||||
closed/compiler/4906393/Test.java \
|
-closed/compiler/c2/4998314 \
|
||||||
closed/compiler/4907999/Uidtest.java \
|
-closed/compiler/c2/6329104 \
|
||||||
closed/compiler/4917709/Tester.java \
|
-closed/compiler/c2/6434117 \
|
||||||
closed/compiler/4957832/Test.java \
|
-closed/compiler/c2/6547163 \
|
||||||
closed/compiler/4965430/LoopTest.java \
|
-closed/compiler/c2/6563987 \
|
||||||
closed/compiler/4979449/T4979449.java \
|
-closed/compiler/c2/6595044 \
|
||||||
closed/compiler/5031274/Test.java \
|
-closed/compiler/codegen/6440479 \
|
||||||
closed/compiler/5043395/T5043395.java \
|
-closed/compiler/codegen/6603011 \
|
||||||
closed/compiler/5049410/Test.java \
|
-closed/compiler/interpreter/5034475 \
|
||||||
closed/compiler/5098422/Test.java \
|
-closed/compiler/jsr292/LongLambdaFormDynamicStackDepth.java \
|
||||||
closed/compiler/6173783/Test.java \
|
-closed/compiler/loopopts/4463485 \
|
||||||
closed/compiler/6272923/Test6272923.sh \
|
-closed/compiler/loopopts/8021898
|
||||||
closed/compiler/6290963/Test.java \
|
|
||||||
closed/compiler/6305546/Test.java \
|
|
||||||
closed/compiler/6309806/Test.java \
|
|
||||||
closed/compiler/6311859/Test.java \
|
|
||||||
closed/compiler/6321689/Test.java \
|
|
||||||
closed/compiler/6326935/Test.java \
|
|
||||||
closed/compiler/6367889/Test.java \
|
|
||||||
closed/compiler/6371167/Test.java \
|
|
||||||
closed/compiler/6389127/Test.java \
|
|
||||||
closed/compiler/6397650/Test.java \
|
|
||||||
closed/compiler/6414932/Test.java \
|
|
||||||
closed/compiler/6421619/Test_6421619.java \
|
|
||||||
closed/compiler/6427750/UnsafeVolatile.java \
|
|
||||||
closed/compiler/6431243/Test.java \
|
|
||||||
closed/compiler/6433572/TestSyncJSR.java \
|
|
||||||
closed/compiler/6433840/clinit.java \
|
|
||||||
closed/compiler/6457854/Test.java \
|
|
||||||
closed/compiler/6476804/Test.java \
|
|
||||||
closed/compiler/6512111/CorruptFinalLong.java \
|
|
||||||
closed/compiler/6551887/Test.java \
|
|
||||||
closed/compiler/6571539/Test.java \
|
|
||||||
closed/compiler/6587132/Test.java \
|
|
||||||
closed/compiler/6588045/Test.java \
|
|
||||||
closed/compiler/6588598/etype.java \
|
|
||||||
closed/compiler/6661918/Test6661918.java \
|
|
||||||
closed/compiler/6707044/Test.java \
|
|
||||||
closed/compiler/6730716/Test.java \
|
|
||||||
closed/compiler/6772368/Test6772368.sh \
|
|
||||||
closed/compiler/6897150/Test6897150.java \
|
|
||||||
closed/compiler/6931567/Test6931567.java \
|
|
||||||
closed/compiler/7196857/Test7196857.java \
|
|
||||||
closed/compiler/8009699/Test8009699.java \
|
|
||||||
closed/compiler/8009699/Test8009699B.java \
|
|
||||||
closed/compiler/8014811/Test8014811.java \
|
|
||||||
closed/compiler/8029507/InvokePrivate.java \
|
|
||||||
closed/compiler/callingConvention/Arg9Double.java \
|
|
||||||
closed/compiler/deoptimization/DeoptArithmetic.java \
|
|
||||||
closed/compiler/deoptimization/TestDoubleLocals.java \
|
|
||||||
closed/compiler/deoptimization/TestDoubleMerge.java
|
|
||||||
|
|
||||||
hotspot_gc = \
|
hotspot_gc = \
|
||||||
sanity/ExecuteInternalVMTests.java
|
sanity/ExecuteInternalVMTests.java
|
||||||
|
@ -609,4 +449,4 @@ needs_nashorn = \
|
||||||
#
|
#
|
||||||
not_needs_nashorn = \
|
not_needs_nashorn = \
|
||||||
:jdk \
|
:jdk \
|
||||||
-:needs_nashorh
|
-:needs_nashorn
|
||||||
|
|
|
@ -30,7 +30,7 @@ then
|
||||||
fi
|
fi
|
||||||
echo "TESTSRC=${TESTSRC}"
|
echo "TESTSRC=${TESTSRC}"
|
||||||
## Adding common setup Variables for running shell tests.
|
## Adding common setup Variables for running shell tests.
|
||||||
. ${TESTSRC}/../../test_env.sh
|
. ${TESTSRC}/../../../test_env.sh
|
||||||
|
|
||||||
# Amount of physical memory in megabytes
|
# Amount of physical memory in megabytes
|
||||||
MEM=0
|
MEM=0
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue