mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
Merge
This commit is contained in:
commit
c6d81e192d
117 changed files with 1100 additions and 464 deletions
|
@ -118,27 +118,46 @@ Flag::Error AllocatePrefetchInstrConstraintFunc(intx value, bool verbose) {
|
|||
}
|
||||
|
||||
Flag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) {
|
||||
if (value < 1 || value > max_jint) {
|
||||
intx max_value = 512;
|
||||
if (value < 1 || value > max_value) {
|
||||
CommandLineError::print(verbose,
|
||||
"AllocatePrefetchStepSize (" INTX_FORMAT ") "
|
||||
"must be between 1 and %d\n",
|
||||
AllocatePrefetchStepSize,
|
||||
max_jint);
|
||||
max_value);
|
||||
return Flag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
|
||||
if (AllocatePrefetchDistance % AllocatePrefetchStepSize != 0) {
|
||||
CommandLineError::print(verbose,
|
||||
"AllocatePrefetchDistance (" INTX_FORMAT ") "
|
||||
"%% AllocatePrefetchStepSize (" INTX_FORMAT ") "
|
||||
"= " INTX_FORMAT " "
|
||||
"must be 0\n",
|
||||
AllocatePrefetchDistance, AllocatePrefetchStepSize,
|
||||
AllocatePrefetchDistance % AllocatePrefetchStepSize);
|
||||
return Flag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
CommandLineError::print(verbose,
|
||||
"AllocatePrefetchDistance (" INTX_FORMAT ") "
|
||||
"%% AllocatePrefetchStepSize (" INTX_FORMAT ") "
|
||||
"= " INTX_FORMAT " "
|
||||
"must be 0\n",
|
||||
AllocatePrefetchDistance, AllocatePrefetchStepSize,
|
||||
AllocatePrefetchDistance % AllocatePrefetchStepSize);
|
||||
return Flag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
|
||||
return Flag::SUCCESS;
|
||||
/* The limit of 64 for the quotient of AllocatePrefetchDistance and AllocatePrefetchSize
|
||||
* originates from the limit of 64 for AllocatePrefetchLines/AllocateInstancePrefetchLines.
|
||||
* If AllocatePrefetchStyle == 2, the quotient from above is used in PhaseMacroExpand::prefetch_allocation()
|
||||
* to determine the number of lines to prefetch. For other values of AllocatePrefetchStyle,
|
||||
* AllocatePrefetchDistance and AllocatePrefetchSize is used. For consistency, all these
|
||||
* quantities must have the same limit (64 in this case).
|
||||
*/
|
||||
if (AllocatePrefetchDistance / AllocatePrefetchStepSize > 64) {
|
||||
CommandLineError::print(verbose,
|
||||
"AllocatePrefetchDistance (" INTX_FORMAT ") too large or "
|
||||
"AllocatePrefetchStepSize (" INTX_FORMAT ") too small; "
|
||||
"try decreasing/increasing values so that "
|
||||
"AllocatePrefetchDistance / AllocatePrefetchStepSize <= 64\n",
|
||||
AllocatePrefetchDistance, AllocatePrefetchStepSize,
|
||||
AllocatePrefetchDistance % AllocatePrefetchStepSize);
|
||||
return Flag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
|
||||
return Flag::SUCCESS;
|
||||
}
|
||||
|
||||
Flag::Error CompileThresholdConstraintFunc(intx value, bool verbose) {
|
||||
|
|
|
@ -2965,16 +2965,16 @@ public:
|
|||
\
|
||||
product(intx, AllocatePrefetchLines, 3, \
|
||||
"Number of lines to prefetch ahead of array allocation pointer") \
|
||||
range(1, max_jint / 2) \
|
||||
range(1, 64) \
|
||||
\
|
||||
product(intx, AllocateInstancePrefetchLines, 1, \
|
||||
"Number of lines to prefetch ahead of instance allocation " \
|
||||
"pointer") \
|
||||
range(1, max_jint / 2) \
|
||||
range(1, 64) \
|
||||
\
|
||||
product(intx, AllocatePrefetchStepSize, 16, \
|
||||
"Step size in bytes of sequential prefetch instructions") \
|
||||
range(1, max_jint) \
|
||||
range(1, 512) \
|
||||
constraint(AllocatePrefetchStepSizeConstraintFunc,AfterMemoryInit)\
|
||||
\
|
||||
product(intx, AllocatePrefetchInstr, 0, \
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "code/codeCacheExtensions.hpp"
|
||||
#include "code/scopeDesc.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "compiler/compileTask.hpp"
|
||||
#include "gc/shared/gcId.hpp"
|
||||
#include "gc/shared/gcLocker.inline.hpp"
|
||||
#include "gc/shared/workgroup.hpp"
|
||||
|
@ -2884,6 +2885,20 @@ void JavaThread::print_on(outputStream *st) const {
|
|||
print_thread_state_on(st);
|
||||
_safepoint_state->print_on(st);
|
||||
#endif // PRODUCT
|
||||
if (is_Compiler_thread()) {
|
||||
CompilerThread* ct = (CompilerThread*)this;
|
||||
if (ct->task() != NULL) {
|
||||
st->print(" Compiling: ");
|
||||
ct->task()->print(st, NULL, true, false);
|
||||
} else {
|
||||
st->print(" No compile task");
|
||||
}
|
||||
st->cr();
|
||||
}
|
||||
}
|
||||
|
||||
void JavaThread::print_name_on_error(outputStream* st, char *buf, int buflen) const {
|
||||
st->print("%s", get_thread_name_string(buf, buflen));
|
||||
}
|
||||
|
||||
// Called by fatal error handler. The difference between this and
|
||||
|
@ -4386,7 +4401,6 @@ void Threads::print_on(outputStream* st, bool print_stacks,
|
|||
wt->print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
CompileBroker::print_compiler_threads_on(st);
|
||||
st->flush();
|
||||
}
|
||||
|
||||
|
@ -4439,8 +4453,24 @@ void Threads::print_on_error(outputStream* st, Thread* current, char* buf,
|
|||
current->print_on_error(st, buf, buflen);
|
||||
st->cr();
|
||||
}
|
||||
st->cr();
|
||||
st->print_cr("Threads with active compile tasks:");
|
||||
print_threads_compiling(st, buf, buflen);
|
||||
}
|
||||
|
||||
void Threads::print_threads_compiling(outputStream* st, char* buf, int buflen) {
|
||||
ALL_JAVA_THREADS(thread) {
|
||||
if (thread->is_Compiler_thread()) {
|
||||
CompilerThread* ct = (CompilerThread*) thread;
|
||||
if (ct->task() != NULL) {
|
||||
thread->print_name_on_error(st, buf, buflen);
|
||||
ct->task()->print(st, NULL, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Internal SpinLock and Mutex
|
||||
// Based on ParkEvent
|
||||
|
||||
|
|
|
@ -1660,6 +1660,7 @@ class JavaThread: public Thread {
|
|||
void print_thread_state_on(outputStream*) const PRODUCT_RETURN;
|
||||
void print_thread_state() const PRODUCT_RETURN;
|
||||
void print_on_error(outputStream* st, char* buf, int buflen) const;
|
||||
void print_name_on_error(outputStream* st, char* buf, int buflen) const;
|
||||
void verify();
|
||||
const char* get_thread_name() const;
|
||||
private:
|
||||
|
@ -2158,6 +2159,7 @@ class Threads: AllStatic {
|
|||
print_on(tty, print_stacks, internal_format, false /* no concurrent lock printed */);
|
||||
}
|
||||
static void print_on_error(outputStream* st, Thread* current, char* buf, int buflen);
|
||||
static void print_threads_compiling(outputStream* st, char* buf, int buflen);
|
||||
|
||||
// Get Java threads that are waiting to enter a monitor. If doLock
|
||||
// is true, then Threads_lock is grabbed as needed. Otherwise, the
|
||||
|
|
|
@ -485,18 +485,6 @@ void VM_Exit::wait_if_vm_exited() {
|
|||
}
|
||||
}
|
||||
|
||||
void VM_PrintCompileQueue::doit() {
|
||||
CompileBroker::print_compile_queues(_out);
|
||||
}
|
||||
|
||||
void VM_PrintCodeList::doit() {
|
||||
CodeCache::print_codelist(_out);
|
||||
}
|
||||
|
||||
void VM_PrintCodeCache::doit() {
|
||||
CodeCache::print_layout(_out);
|
||||
}
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
void VM_PrintClassHierarchy::doit() {
|
||||
KlassHierarchy::print_class_hierarchy(_out, _print_interfaces, _print_subclasses, _classname);
|
||||
|
|
|
@ -105,9 +105,6 @@
|
|||
template(DumpHashtable) \
|
||||
template(DumpTouchedMethods) \
|
||||
template(MarkActiveNMethods) \
|
||||
template(PrintCompileQueue) \
|
||||
template(PrintCodeList) \
|
||||
template(PrintCodeCache) \
|
||||
template(PrintClassHierarchy) \
|
||||
|
||||
class VM_Operation: public CHeapObj<mtInternal> {
|
||||
|
@ -424,37 +421,6 @@ class VM_Exit: public VM_Operation {
|
|||
void doit();
|
||||
};
|
||||
|
||||
class VM_PrintCompileQueue: public VM_Operation {
|
||||
private:
|
||||
outputStream* _out;
|
||||
|
||||
public:
|
||||
VM_PrintCompileQueue(outputStream* st) : _out(st) {}
|
||||
VMOp_Type type() const { return VMOp_PrintCompileQueue; }
|
||||
Mode evaluation_mode() const { return _no_safepoint; }
|
||||
void doit();
|
||||
};
|
||||
|
||||
class VM_PrintCodeList: public VM_Operation {
|
||||
private:
|
||||
outputStream* _out;
|
||||
|
||||
public:
|
||||
VM_PrintCodeList(outputStream* st) : _out(st) {}
|
||||
VMOp_Type type() const { return VMOp_PrintCodeList; }
|
||||
void doit();
|
||||
};
|
||||
|
||||
class VM_PrintCodeCache: public VM_Operation {
|
||||
private:
|
||||
outputStream* _out;
|
||||
|
||||
public:
|
||||
VM_PrintCodeCache(outputStream* st) : _out(st) {}
|
||||
VMOp_Type type() const { return VMOp_PrintCodeCache; }
|
||||
void doit();
|
||||
};
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
class VM_PrintClassHierarchy: public VM_Operation {
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue