56 float compute_callee_frequency( int caller_bci ) const; |
56 float compute_callee_frequency( int caller_bci ) const; |
57 |
57 |
58 GrowableArray<InlineTree*> _subtrees; |
58 GrowableArray<InlineTree*> _subtrees; |
59 |
59 |
60 void print_impl(outputStream* stj, int indent) const PRODUCT_RETURN; |
60 void print_impl(outputStream* stj, int indent) const PRODUCT_RETURN; |
61 |
61 const char* _msg; |
62 protected: |
62 protected: |
63 InlineTree(Compile* C, |
63 InlineTree(Compile* C, |
64 const InlineTree* caller_tree, |
64 const InlineTree* caller_tree, |
65 ciMethod* callee_method, |
65 ciMethod* callee_method, |
66 JVMState* caller_jvms, |
66 JVMState* caller_jvms, |
68 float site_invoke_ratio, |
68 float site_invoke_ratio, |
69 int max_inline_level); |
69 int max_inline_level); |
70 InlineTree *build_inline_tree_for_callee(ciMethod* callee_method, |
70 InlineTree *build_inline_tree_for_callee(ciMethod* callee_method, |
71 JVMState* caller_jvms, |
71 JVMState* caller_jvms, |
72 int caller_bci); |
72 int caller_bci); |
73 const char* try_to_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result, bool& should_delay); |
73 bool try_to_inline(ciMethod* callee_method, |
74 const char* should_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const; |
74 ciMethod* caller_method, |
75 const char* should_not_inline(ciMethod* callee_method, ciMethod* caller_method, WarmCallInfo* wci_result) const; |
75 int caller_bci, |
|
76 ciCallProfile& profile, |
|
77 WarmCallInfo* wci_result, |
|
78 bool& should_delay); |
|
79 bool should_inline(ciMethod* callee_method, |
|
80 ciMethod* caller_method, |
|
81 int caller_bci, |
|
82 ciCallProfile& profile, |
|
83 WarmCallInfo* wci_result); |
|
84 bool should_not_inline(ciMethod* callee_method, |
|
85 ciMethod* caller_method, |
|
86 WarmCallInfo* wci_result); |
76 void print_inlining(ciMethod* callee_method, int caller_bci, |
87 void print_inlining(ciMethod* callee_method, int caller_bci, |
77 const char* msg, bool success) const; |
88 bool success) const; |
78 |
89 |
79 InlineTree *caller_tree() const { return _caller_tree; } |
90 InlineTree* caller_tree() const { return _caller_tree; } |
80 InlineTree* callee_at(int bci, ciMethod* m) const; |
91 InlineTree* callee_at(int bci, ciMethod* m) const; |
81 int inline_level() const { return stack_depth(); } |
92 int inline_level() const { return stack_depth(); } |
82 int stack_depth() const { return _caller_jvms ? _caller_jvms->depth() : 0; } |
93 int stack_depth() const { return _caller_jvms ? _caller_jvms->depth() : 0; } |
83 |
94 const char* msg() const { return _msg; } |
|
95 void set_msg(const char* msg) { _msg = msg; } |
84 public: |
96 public: |
85 static const char* check_can_parse(ciMethod* callee); |
97 static const char* check_can_parse(ciMethod* callee); |
86 |
98 |
87 static InlineTree* build_inline_tree_root(); |
99 static InlineTree* build_inline_tree_root(); |
88 static InlineTree* find_subtree_from_root(InlineTree* root, JVMState* jvms, ciMethod* callee); |
100 static InlineTree* find_subtree_from_root(InlineTree* root, JVMState* jvms, ciMethod* callee); |