8145345: LogCompilation output is empty after JEP165: Compiler Control
Fix default init and compilecommand update Reviewed-by: kvn
This commit is contained in:
parent
8c0ad215bc
commit
2bb757d0eb
@ -86,16 +86,21 @@ void CompilerDirectives::print(outputStream* st) {
|
|||||||
//---
|
//---
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompilerDirectives::finalize() {
|
void CompilerDirectives::finalize(outputStream* st) {
|
||||||
if (_c1_store != NULL) {
|
if (_c1_store != NULL) {
|
||||||
_c1_store->finalize();
|
_c1_store->finalize(st);
|
||||||
}
|
}
|
||||||
if (_c2_store != NULL) {
|
if (_c2_store != NULL) {
|
||||||
_c2_store->finalize();
|
_c2_store->finalize(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectiveSet::finalize() {
|
void DirectiveSet::finalize(outputStream* st) {
|
||||||
|
// Check LogOption and warn
|
||||||
|
if (LogOption && !LogCompilation) {
|
||||||
|
st->print_cr("Warning: +LogCompilation must be set to enable compilation logging from directives");
|
||||||
|
}
|
||||||
|
|
||||||
// if any flag has been modified - set directive as enabled
|
// if any flag has been modified - set directive as enabled
|
||||||
// unless it already has been explicitly set.
|
// unless it already has been explicitly set.
|
||||||
if (!_modified[EnableIndex]) {
|
if (!_modified[EnableIndex]) {
|
||||||
@ -252,12 +257,14 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(methodHandle metho
|
|||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CompilerOracle::should_log(method)) {
|
if (!_modified[LogIndex]) {
|
||||||
if (!_modified[LogIndex]) {
|
bool log = CompilerOracle::should_log(method);
|
||||||
set->LogOption = true;
|
if (log != set->LogOption) {
|
||||||
|
set->LogOption = log;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CompilerOracle::should_print(method)) {
|
if (CompilerOracle::should_print(method)) {
|
||||||
if (!_modified[PrintAssemblyIndex]) {
|
if (!_modified[PrintAssemblyIndex]) {
|
||||||
set->PrintAssemblyOption = true;
|
set->PrintAssemblyOption = true;
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
cflags(Exclude, bool, false, X) \
|
cflags(Exclude, bool, false, X) \
|
||||||
cflags(BreakAtExecute, bool, false, X) \
|
cflags(BreakAtExecute, bool, false, X) \
|
||||||
cflags(BreakAtCompile, bool, false, X) \
|
cflags(BreakAtCompile, bool, false, X) \
|
||||||
cflags(Log, bool, false, X) \
|
cflags(Log, bool, LogCompilation, X) \
|
||||||
cflags(PrintAssembly, bool, PrintAssembly, PrintAssembly) \
|
cflags(PrintAssembly, bool, PrintAssembly, PrintAssembly) \
|
||||||
cflags(PrintInlining, bool, PrintInlining, PrintInlining) \
|
cflags(PrintInlining, bool, PrintInlining, PrintInlining) \
|
||||||
cflags(PrintNMethods, bool, PrintNMethods, PrintNMethods) \
|
cflags(PrintNMethods, bool, PrintNMethods, PrintNMethods) \
|
||||||
@ -117,7 +117,7 @@ public:
|
|||||||
bool matches_inline(methodHandle method, int inline_action);
|
bool matches_inline(methodHandle method, int inline_action);
|
||||||
static DirectiveSet* clone(DirectiveSet const* src);
|
static DirectiveSet* clone(DirectiveSet const* src);
|
||||||
bool is_intrinsic_disabled(methodHandle method);
|
bool is_intrinsic_disabled(methodHandle method);
|
||||||
void finalize();
|
void finalize(outputStream* st);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
#define enum_of_flags(name, type, dvalue, cc_flag) name##Index,
|
#define enum_of_flags(name, type, dvalue, cc_flag) name##Index,
|
||||||
@ -177,7 +177,7 @@ public:
|
|||||||
DirectiveSet* get_for(AbstractCompiler *comp);
|
DirectiveSet* get_for(AbstractCompiler *comp);
|
||||||
void print(outputStream* st);
|
void print(outputStream* st);
|
||||||
bool is_default_directive() { return _next == NULL; }
|
bool is_default_directive() { return _next == NULL; }
|
||||||
void finalize();
|
void finalize(outputStream* st);
|
||||||
|
|
||||||
void inc_refcount();
|
void inc_refcount();
|
||||||
void dec_refcount();
|
void dec_refcount();
|
||||||
|
@ -542,7 +542,7 @@ bool DirectivesParser::callback(JSON_TYPE t, JSON_VAL* v, uint rlimit) {
|
|||||||
error(INTERNAL_ERROR, "Directive missing required match.");
|
error(INTERNAL_ERROR, "Directive missing required match.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
current_directive->finalize();
|
current_directive->finalize(_st);
|
||||||
push_tmp(current_directive);
|
push_tmp(current_directive);
|
||||||
current_directive = NULL;
|
current_directive = NULL;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user