Mercurial > hg > graal-compiler
comparison src/share/vm/opto/parse.hpp @ 1157:c3b315a0d58a
6912063: inlining parameters need to be adjusted for some uses of the JVM
Summary: Put all inline-related switches into product mode, to allow tuning by dynamic language implementors.
Reviewed-by: twisti, kvn
author | jrose |
---|---|
date | Fri, 08 Jan 2010 13:58:49 -0800 |
parents | 148e5441d916 |
children | b2b6a9bf6238 |
comparison
equal
deleted
inserted
replaced
1155:4e6abf09f540 | 1157:c3b315a0d58a |
---|---|
37 uint _count_inline_bcs; // Accumulated count of inlined bytecodes | 37 uint _count_inline_bcs; // Accumulated count of inlined bytecodes |
38 // Call-site count / interpreter invocation count, scaled recursively. | 38 // Call-site count / interpreter invocation count, scaled recursively. |
39 // Always between 0.0 and 1.0. Represents the percentage of the method's | 39 // Always between 0.0 and 1.0. Represents the percentage of the method's |
40 // total execution time used at this call site. | 40 // total execution time used at this call site. |
41 const float _site_invoke_ratio; | 41 const float _site_invoke_ratio; |
42 const int _site_depth_adjust; | |
42 float compute_callee_frequency( int caller_bci ) const; | 43 float compute_callee_frequency( int caller_bci ) const; |
43 | 44 |
44 GrowableArray<InlineTree*> _subtrees; | 45 GrowableArray<InlineTree*> _subtrees; |
45 friend class Compile; | 46 friend class Compile; |
46 | 47 |
48 InlineTree(Compile* C, | 49 InlineTree(Compile* C, |
49 const InlineTree* caller_tree, | 50 const InlineTree* caller_tree, |
50 ciMethod* callee_method, | 51 ciMethod* callee_method, |
51 JVMState* caller_jvms, | 52 JVMState* caller_jvms, |
52 int caller_bci, | 53 int caller_bci, |
53 float site_invoke_ratio); | 54 float site_invoke_ratio, |
55 int site_depth_adjust); | |
54 InlineTree *build_inline_tree_for_callee(ciMethod* callee_method, | 56 InlineTree *build_inline_tree_for_callee(ciMethod* callee_method, |
55 JVMState* caller_jvms, | 57 JVMState* caller_jvms, |
56 int caller_bci); | 58 int caller_bci); |
57 const char* try_to_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result); | 59 const char* try_to_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result); |
58 const char* shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const; | 60 const char* shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const; |
59 const char* shouldNotInline(ciMethod* callee_method, ciMethod* caller_method, WarmCallInfo* wci_result) const; | 61 const char* shouldNotInline(ciMethod* callee_method, ciMethod* caller_method, WarmCallInfo* wci_result) const; |
60 void print_inlining(ciMethod *callee_method, int caller_bci, const char *failure_msg) const PRODUCT_RETURN; | 62 void print_inlining(ciMethod *callee_method, int caller_bci, const char *failure_msg) const PRODUCT_RETURN; |
61 | 63 |
62 InlineTree *caller_tree() const { return _caller_tree; } | 64 InlineTree *caller_tree() const { return _caller_tree; } |
63 InlineTree* callee_at(int bci, ciMethod* m) const; | 65 InlineTree* callee_at(int bci, ciMethod* m) const; |
64 int inline_depth() const { return _caller_jvms ? _caller_jvms->depth() : 0; } | 66 int inline_depth() const { return stack_depth() + _site_depth_adjust; } |
67 int stack_depth() const { return _caller_jvms ? _caller_jvms->depth() : 0; } | |
65 | 68 |
66 public: | 69 public: |
67 static InlineTree* build_inline_tree_root(); | 70 static InlineTree* build_inline_tree_root(); |
68 static InlineTree* find_subtree_from_root(InlineTree* root, JVMState* jvms, ciMethod* callee, bool create_if_not_found = false); | 71 static InlineTree* find_subtree_from_root(InlineTree* root, JVMState* jvms, ciMethod* callee, bool create_if_not_found = false); |
69 | 72 |
70 // For temporary (stack-allocated, stateless) ilts: | 73 // For temporary (stack-allocated, stateless) ilts: |
71 InlineTree(Compile* c, ciMethod* callee_method, JVMState* caller_jvms, float site_invoke_ratio); | 74 InlineTree(Compile* c, ciMethod* callee_method, JVMState* caller_jvms, float site_invoke_ratio, int site_depth_adjust); |
72 | 75 |
73 // InlineTree enum | 76 // InlineTree enum |
74 enum InlineStyle { | 77 enum InlineStyle { |
75 Inline_do_not_inline = 0, // | 78 Inline_do_not_inline = 0, // |
76 Inline_cha_is_monomorphic = 1, // | 79 Inline_cha_is_monomorphic = 1, // |