Mercurial > hg > truffle
comparison src/share/vm/runtime/simpleThresholdPolicy.hpp @ 4840:0a10d80352d5
Merge
author | brutisso |
---|---|
date | Fri, 27 Jan 2012 09:04:57 +0100 |
parents | 20334ed5ed3c |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
4839:b4ebad3520bb | 4840:0a10d80352d5 |
---|---|
65 enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; | 65 enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; |
66 void print_event(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level); | 66 void print_event(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level); |
67 // Print policy-specific information if necessary | 67 // Print policy-specific information if necessary |
68 virtual void print_specific(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level) { } | 68 virtual void print_specific(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level) { } |
69 // Check if the method can be compiled, change level if necessary | 69 // Check if the method can be compiled, change level if necessary |
70 void compile(methodHandle mh, int bci, CompLevel level, TRAPS); | 70 void compile(methodHandle mh, int bci, CompLevel level, JavaThread* thread); |
71 // Submit a given method for compilation | 71 // Submit a given method for compilation |
72 virtual void submit_compile(methodHandle mh, int bci, CompLevel level, TRAPS); | 72 virtual void submit_compile(methodHandle mh, int bci, CompLevel level, JavaThread* thread); |
73 // Simple methods are as good being compiled with C1 as C2. | 73 // Simple methods are as good being compiled with C1 as C2. |
74 // This function tells if it's such a function. | 74 // This function tells if it's such a function. |
75 inline bool is_trivial(methodOop method); | 75 inline bool is_trivial(methodOop method); |
76 | 76 |
77 // Predicate helpers are used by .*_predicate() methods as well as others. | 77 // Predicate helpers are used by .*_predicate() methods as well as others. |
86 return (CompLevel)nm->comp_level(); | 86 return (CompLevel)nm->comp_level(); |
87 } | 87 } |
88 return CompLevel_none; | 88 return CompLevel_none; |
89 } | 89 } |
90 virtual void method_invocation_event(methodHandle method, methodHandle inlinee, | 90 virtual void method_invocation_event(methodHandle method, methodHandle inlinee, |
91 CompLevel level, nmethod* nm, TRAPS); | 91 CompLevel level, nmethod* nm, JavaThread* thread); |
92 virtual void method_back_branch_event(methodHandle method, methodHandle inlinee, | 92 virtual void method_back_branch_event(methodHandle method, methodHandle inlinee, |
93 int bci, CompLevel level, nmethod* nm, TRAPS); | 93 int bci, CompLevel level, nmethod* nm, JavaThread* thread); |
94 public: | 94 public: |
95 SimpleThresholdPolicy() : _c1_count(0), _c2_count(0) { } | 95 SimpleThresholdPolicy() : _c1_count(0), _c2_count(0) { } |
96 virtual int compiler_count(CompLevel comp_level) { | 96 virtual int compiler_count(CompLevel comp_level) { |
97 if (is_c1_compile(comp_level)) return c1_count(); | 97 if (is_c1_compile(comp_level)) return c1_count(); |
98 if (is_c2_compile(comp_level)) return c2_count(); | 98 if (is_c2_compile(comp_level)) return c2_count(); |
102 virtual void do_safepoint_work() { } | 102 virtual void do_safepoint_work() { } |
103 virtual void delay_compilation(methodOop method) { } | 103 virtual void delay_compilation(methodOop method) { } |
104 virtual void disable_compilation(methodOop method) { } | 104 virtual void disable_compilation(methodOop method) { } |
105 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); | 105 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); |
106 virtual nmethod* event(methodHandle method, methodHandle inlinee, | 106 virtual nmethod* event(methodHandle method, methodHandle inlinee, |
107 int branch_bci, int bci, CompLevel comp_level, nmethod* nm, TRAPS); | 107 int branch_bci, int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread); |
108 // Select task is called by CompileBroker. We should return a task or NULL. | 108 // Select task is called by CompileBroker. We should return a task or NULL. |
109 virtual CompileTask* select_task(CompileQueue* compile_queue); | 109 virtual CompileTask* select_task(CompileQueue* compile_queue); |
110 // Tell the runtime if we think a given method is adequately profiled. | 110 // Tell the runtime if we think a given method is adequately profiled. |
111 virtual bool is_mature(methodOop method); | 111 virtual bool is_mature(methodOop method); |
112 // Initialize: set compiler thread count | 112 // Initialize: set compiler thread count |