220 void set_c1_count(int x) { _c1_count = x; } |
220 void set_c1_count(int x) { _c1_count = x; } |
221 void set_c2_count(int x) { _c2_count = x; } |
221 void set_c2_count(int x) { _c2_count = x; } |
222 |
222 |
223 enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; |
223 enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; |
224 void print_event(EventType type, const methodHandle& mh, const methodHandle& imh, int bci, CompLevel level); |
224 void print_event(EventType type, const methodHandle& mh, const methodHandle& imh, int bci, CompLevel level); |
225 // Print policy-specific information if necessary |
|
226 void print_specific(EventType type, const methodHandle& mh, const methodHandle& imh, int bci, CompLevel level); |
|
227 // Check if the method can be compiled, change level if necessary |
225 // Check if the method can be compiled, change level if necessary |
228 void compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread); |
226 void compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread); |
229 // Submit a given method for compilation |
|
230 void submit_compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread); |
|
231 // Simple methods are as good being compiled with C1 as C2. |
227 // Simple methods are as good being compiled with C1 as C2. |
232 // This function tells if it's such a function. |
228 // This function tells if it's such a function. |
233 inline static bool is_trivial(Method* method); |
229 inline static bool is_trivial(Method* method); |
234 // Force method to be compiled at CompLevel_simple? |
230 // Force method to be compiled at CompLevel_simple? |
235 inline static bool should_compile_at_level_simple(Method* method); |
231 inline bool force_comp_at_level_simple(Method* method); |
236 |
232 |
237 // Predicate helpers are used by .*_predicate() methods as well as others. |
233 // Predicate helpers are used by .*_predicate() methods as well as others. |
238 // They check the given counter values, multiplied by the scale against the thresholds. |
234 // They check the given counter values, multiplied by the scale against the thresholds. |
239 template<CompLevel level> static inline bool call_predicate_helper(int i, int b, double scale, Method* method); |
235 inline bool call_predicate_helper(Method* method, CompLevel cur_level, int i, int b, double scale); |
240 template<CompLevel level> static inline bool loop_predicate_helper(int i, int b, double scale, Method* method); |
236 inline bool loop_predicate_helper(Method* method, CompLevel cur_level, int i, int b, double scale); |
241 |
237 |
242 // Get a compilation level for a given method. |
238 // Get a compilation level for a given method. |
243 static CompLevel comp_level(Method* method); |
239 static CompLevel comp_level(Method* method); |
244 void method_invocation_event(const methodHandle& method, const methodHandle& inlinee, |
240 void method_invocation_event(const methodHandle& method, const methodHandle& inlinee, |
245 CompLevel level, CompiledMethod* nm, JavaThread* thread); |
241 CompLevel level, CompiledMethod* nm, JavaThread* thread); |