8236050: Some compiler tests fail when executed with custom TieredLevel

Make sure TieredStopAtLevel is properly supported for different compilation modes

Reviewed-by: redestad, thartmann
This commit is contained in:
Igor Veresov 2020-01-07 07:31:28 -08:00
parent 50a56141ba
commit cc99075c79
7 changed files with 142 additions and 28 deletions

View file

@ -59,7 +59,7 @@ public:
static CompileTask* select_task_helper(CompileQueue* compile_queue);
// Return initial compile level that is used with Xcomp
virtual CompLevel initial_compile_level() = 0;
virtual CompLevel initial_compile_level(const methodHandle& method) = 0;
virtual int compiler_count(CompLevel comp_level) = 0;
// main notification entry, return a pointer to an nmethod if the OSR is required,
// returns NULL otherwise.
@ -97,7 +97,7 @@ class SimpleCompPolicy : public CompilationPolicy {
void method_back_branch_event(const methodHandle& m, int bci, JavaThread* thread);
public:
SimpleCompPolicy() : _compiler_count(0) { }
virtual CompLevel initial_compile_level() { return CompLevel_highest_tier; }
virtual CompLevel initial_compile_level(const methodHandle& m) { return CompLevel_highest_tier; }
virtual int compiler_count(CompLevel comp_level);
virtual void do_safepoint_work();
virtual void reprofile(ScopeDesc* trap_scope, bool is_osr);