1.1 --- a/src/share/vm/runtime/simpleThresholdPolicy.hpp Fri Jul 01 10:35:54 2011 -0700 1.2 +++ b/src/share/vm/runtime/simpleThresholdPolicy.hpp Fri Jul 01 10:37:37 2011 -0700 1.3 @@ -62,7 +62,7 @@ 1.4 void set_c1_count(int x) { _c1_count = x; } 1.5 void set_c2_count(int x) { _c2_count = x; } 1.6 1.7 - enum EventType { CALL, LOOP, COMPILE, KILL, UPDATE, REPROFILE }; 1.8 + enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; 1.9 void print_event(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level); 1.10 // Print policy-specific information if necessary 1.11 virtual void print_specific(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level) { } 1.12 @@ -88,9 +88,9 @@ 1.13 return CompLevel_none; 1.14 } 1.15 virtual void method_invocation_event(methodHandle method, methodHandle inlinee, 1.16 - CompLevel level, TRAPS); 1.17 + CompLevel level, nmethod* nm, TRAPS); 1.18 virtual void method_back_branch_event(methodHandle method, methodHandle inlinee, 1.19 - int bci, CompLevel level, TRAPS); 1.20 + int bci, CompLevel level, nmethod* nm, TRAPS); 1.21 public: 1.22 SimpleThresholdPolicy() : _c1_count(0), _c2_count(0) { } 1.23 virtual int compiler_count(CompLevel comp_level) { 1.24 @@ -101,17 +101,20 @@ 1.25 virtual void do_safepoint_work() { } 1.26 virtual void delay_compilation(methodOop method) { } 1.27 virtual void disable_compilation(methodOop method) { } 1.28 - // TODO: we should honour reprofiling requests in the future. Currently reprofiling 1.29 - // would happen but not to the extent we would ideally like. 1.30 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); 1.31 virtual nmethod* event(methodHandle method, methodHandle inlinee, 1.32 - int branch_bci, int bci, CompLevel comp_level, TRAPS); 1.33 + int branch_bci, int bci, CompLevel comp_level, nmethod* nm, TRAPS); 1.34 // Select task is called by CompileBroker. We should return a task or NULL. 1.35 virtual CompileTask* select_task(CompileQueue* compile_queue); 1.36 // Tell the runtime if we think a given method is adequately profiled. 1.37 virtual bool is_mature(methodOop method); 1.38 // Initialize: set compiler thread count 1.39 virtual void initialize(); 1.40 + virtual bool should_not_inline(ciEnv* env, ciMethod* callee) { 1.41 + return (env->comp_level() == CompLevel_limited_profile || 1.42 + env->comp_level() == CompLevel_full_profile) && 1.43 + callee->has_loops(); 1.44 + } 1.45 }; 1.46 1.47 #endif // SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_HPP