Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of client:master into master
  • Loading branch information
duke committed Jul 3, 2020
2 parents 8f9de8f + 20147c3 commit 60f307fd1dd088e02f6057f7f17bcae431d77363
@@ -463,7 +463,7 @@ void Compilation::compile_method() {
// Note: make sure we mark the method as not compilable!
CHECK_BAILOUT();

if (InstallMethods) {
if (should_install_code()) {
// install code
PhaseTraceTime timeit(_t_codeinstall);
install_code(frame_size);
@@ -539,7 +539,7 @@ void Compilation::generate_exception_handler_table() {
}

Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
int osr_bci, BufferBlob* buffer_blob, DirectiveSet* directive)
int osr_bci, BufferBlob* buffer_blob, bool install_code, DirectiveSet* directive)
: _next_id(0)
, _next_block_id(0)
, _compiler(compiler)
@@ -558,6 +558,7 @@ Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* metho
, _would_profile(false)
, _has_method_handle_invokes(false)
, _has_reserved_stack_access(method->has_reserved_stack_access())
, _install_code(install_code)
, _bailout_msg(NULL)
, _exception_info_list(NULL)
, _allocator(NULL)
@@ -81,6 +81,7 @@ class Compilation: public StackObj {
bool _would_profile;
bool _has_method_handle_invokes; // True if this method has MethodHandle invokes.
bool _has_reserved_stack_access;
bool _install_code;
const char* _bailout_msg;
ExceptionInfoList* _exception_info_list;
ExceptionHandlerTable _exception_handler_table;
@@ -120,7 +121,7 @@ class Compilation: public StackObj {
public:
// creation
Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
int osr_bci, BufferBlob* buffer_blob, DirectiveSet* directive);
int osr_bci, BufferBlob* buffer_blob, bool install_code, DirectiveSet* directive);
~Compilation();


@@ -148,6 +149,7 @@ class Compilation: public StackObj {
CodeOffsets* offsets() { return &_offsets; }
Arena* arena() { return _arena; }
bool has_access_indexed() { return _has_access_indexed; }
bool should_install_code() { return _install_code && InstallMethods; }

// Instruction ids
int get_next_id() { return _next_id++; }
@@ -235,7 +235,7 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
return true;
}

void Compiler::compile_method(ciEnv* env, ciMethod* method, int entry_bci, DirectiveSet* directive) {
void Compiler::compile_method(ciEnv* env, ciMethod* method, int entry_bci, bool install_code, DirectiveSet* directive) {
BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob();
assert(buffer_blob != NULL, "Must exist");
// invoke compilation
@@ -244,7 +244,7 @@ void Compiler::compile_method(ciEnv* env, ciMethod* method, int entry_bci, Direc
// of Compilation to occur before we release the any
// competing compiler thread
ResourceMark rm;
Compilation c(this, env, method, entry_bci, buffer_blob, directive);
Compilation c(this, env, method, entry_bci, buffer_blob, install_code, directive);
}
}

@@ -51,7 +51,7 @@ class Compiler: public AbstractCompiler {
virtual void initialize();

// Compilation entry point for methods
virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive);
virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, bool install_code, DirectiveSet* directive);

// Print compilation timers and statistics
virtual void print_timers();
@@ -166,7 +166,7 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
void set_state (int state);
void set_shut_down () { set_state(shut_down); }
// Compilation entry point for methods
virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, bool install_code, DirectiveSet* directive) {
ShouldNotReachHere();
}

@@ -2223,7 +2223,15 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
locker.wait();
}
}
comp->compile_method(&ci_env, target, osr_bci, directive);
comp->compile_method(&ci_env, target, osr_bci, true, directive);

/* Repeat compilation without installing code for profiling purposes */
int repeat_compilation_count = directive->RepeatCompilationOption;
while (repeat_compilation_count > 0) {
task->print_ul("NO CODE INSTALLED");
comp->compile_method(&ci_env, target, osr_bci, false , directive);
repeat_compilation_count--;
}
}

if (!ci_env.failing() && task->code() == NULL) {
@@ -48,7 +48,8 @@
cflags(DumpInline, bool, false, DumpInline) \
cflags(CompilerDirectivesIgnoreCompileCommands, bool, CompilerDirectivesIgnoreCompileCommands, X) \
cflags(DisableIntrinsic, ccstrlist, DisableIntrinsic, DisableIntrinsic) \
cflags(ControlIntrinsic, ccstrlist, ControlIntrinsic, ControlIntrinsic)
cflags(ControlIntrinsic, ccstrlist, ControlIntrinsic, ControlIntrinsic) \
cflags(RepeatCompilation, intx, RepeatCompilation, RepeatCompilation)

#ifdef COMPILER1
#define compilerdirectives_c1_flags(cflags)
@@ -64,11 +65,11 @@
NOT_PRODUCT(cflags(TraceOptoPipelining, bool, TraceOptoPipelining, TraceOptoPipelining)) \
NOT_PRODUCT(cflags(TraceOptoOutput, bool, TraceOptoOutput, TraceOptoOutput)) \
NOT_PRODUCT(cflags(PrintIdeal, bool, PrintIdeal, PrintIdeal)) \
NOT_PRODUCT(cflags(IGVPrintLevel, intx, PrintIdealGraphLevel, IGVPrintLevel)) \
cflags(TraceSpilling, bool, TraceSpilling, TraceSpilling) \
cflags(Vectorize, bool, false, Vectorize) \
cflags(VectorizeDebug, uintx, 0, VectorizeDebug) \
cflags(CloneMapDebug, bool, false, CloneMapDebug) \
NOT_PRODUCT(cflags(IGVPrintLevel, intx, PrintIdealGraphLevel, IGVPrintLevel)) \
cflags(VectorizeDebug, uintx, 0, VectorizeDebug) \
cflags(MaxNodeLimit, intx, MaxNodeLimit, MaxNodeLimit)
#else
#define compilerdirectives_c2_flags(cflags)
@@ -135,7 +135,7 @@ bool JVMCICompiler::force_comp_at_level_simple(const methodHandle& method) {
}

// Compilation entry point for methods
void JVMCICompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
void JVMCICompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, bool install_code, DirectiveSet* directive) {
ShouldNotReachHere();
}

@@ -94,7 +94,7 @@ class JVMCICompiler : public AbstractCompiler {
}

// Compilation entry point for methods
virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive);
virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, bool install_code, DirectiveSet* directive);

// Print compilation timers and statistics
virtual void print_timers();
@@ -99,7 +99,7 @@ void C2Compiler::initialize() {
}
}

void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, bool install_code, DirectiveSet* directive) {
assert(is_initialized(), "Compiler thread must be initialized");

bool subsume_loads = SubsumeLoads;
@@ -109,7 +109,7 @@ void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, Dir

while (!env->failing()) {
// Attempt to compile while subsuming loads into machine instructions.
Compile C(env, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing, directive);
Compile C(env, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing, install_code, directive);

// Check result and retry if appropriate.
if (C.failure_reason() != NULL) {
@@ -151,7 +151,6 @@ void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, Dir
continue; // retry
}
}

// print inlining for last compilation only
C.dump_print_inlining();

@@ -43,6 +43,7 @@ class C2Compiler : public AbstractCompiler {
void compile_method(ciEnv* env,
ciMethod* target,
int entry_bci,
bool install_code,
DirectiveSet* directive);

// sentinel value used to trigger backtracking in compile_method().
@@ -499,12 +499,13 @@ debug_only( int Compile::_debug_idx = 100000; )


Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing, DirectiveSet* directive)
bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing, bool install_code, DirectiveSet* directive)
: Phase(Compiler),
_compile_id(ci_env->compile_id()),
_save_argument_registers(false),
_subsume_loads(subsume_loads),
_do_escape_analysis(do_escape_analysis),
_install_code(install_code),
_eliminate_boxing(eliminate_boxing),
_method(target),
_entry_bci(osr_bci),
@@ -791,6 +792,7 @@ Compile::Compile( ciEnv* ci_env,
_save_argument_registers(save_arg_registers),
_subsume_loads(true),
_do_escape_analysis(false),
_install_code(true),
_eliminate_boxing(false),
_method(NULL),
_entry_bci(InvocationEntryBci),
@@ -246,6 +246,7 @@ class Compile : public Phase {
const bool _save_argument_registers; // save/restore arg regs for trampolines
const bool _subsume_loads; // Load can be matched as part of a larger op.
const bool _do_escape_analysis; // Do escape analysis.
const bool _install_code; // Install the code that was compiled
const bool _eliminate_boxing; // Do boxing elimination.
ciMethod* _method; // The method being compiled.
int _entry_bci; // entry bci for osr methods.
@@ -507,7 +508,7 @@ class Compile : public Phase {
/** Do aggressive boxing elimination. */
bool aggressive_unboxing() const { return _eliminate_boxing && AggressiveUnboxing; }
bool save_argument_registers() const { return _save_argument_registers; }

bool should_install_code() const { return _install_code; }

// Other fixed compilation parameters.
ciMethod* method() const { return _method; }
@@ -1008,7 +1009,7 @@ class Compile : public Phase {
// continuation.
Compile(ciEnv* ci_env, ciMethod* target,
int entry_bci, bool subsume_loads, bool do_escape_analysis,
bool eliminate_boxing, DirectiveSet* directive);
bool eliminate_boxing, bool install_code, DirectiveSet* directive);

// Second major entry point. From the TypeFunc signature, generate code
// to pass arguments from the Java calling convention to the C calling
@@ -3260,7 +3260,9 @@ uint PhaseOutput::scratch_emit_size(const Node* n) {
}

void PhaseOutput::install() {
if (C->stub_function() != NULL) {
if (!C->should_install_code()) {
return;
} else if (C->stub_function() != NULL) {
install_stub(C->stub_name(),
C->save_argument_registers());
} else {
@@ -538,6 +538,10 @@ const size_t minimumSymbolTableSize = 1024;
product(bool, PrintCompilation, false, \
"Print compilations") \
\
diagnostic(intx, RepeatCompilation, 0, \
"Repeat compilation without installing code (number of times)") \
range(0, max_jint) \
\
product(bool, PrintExtendedThreadInfo, false, \
"Print more information in thread dump") \
\
@@ -353,6 +353,9 @@ public Void run() {

String[] fontInfo = getDefaultPlatformFont();
defaultFontName = fontInfo[0];
if (defaultFontName == null && FontUtilities.debugFonts()) {
FontUtilities.getLogger().warning("defaultFontName is null");
}
defaultFontFileName = fontInfo[1];

String extraFontPath = fontConfig.getExtraFontPath();
@@ -1888,6 +1891,7 @@ private Font2D findFontFromPlatform(String lcName, int style) {
* may be able to emulate the required style.
*/
public Font2D findFont2D(String name, int style, int fallback) {
if (name == null) return null;
String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
String mapName = lowerCaseName + dotStyleStr(style);

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,8 @@ protected String[] getDefaultPlatformFont() {
*/
if (info[0] == null) {
if (fontConfigFonts != null && fontConfigFonts.length > 0 &&
fontConfigFonts[0].firstFont.fontFile != null) {
fontConfigFonts[0].firstFont.fontFile != null &&
fontConfigFonts[0].firstFont.fullName != null) {
info[0] = fontConfigFonts[0].firstFont.fullName;
info[1] = fontConfigFonts[0].firstFont.fontFile;
} else {

0 comments on commit 60f307f

Please sign in to comment.