Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/simpleThresholdPolicy.cpp @ 6800:9191895df19d
7200001: failed C1 OSR compile doesn't get recompiled with C2
Reviewed-by: kvn
author | twisti |
---|---|
date | Mon, 24 Sep 2012 17:59:24 -0700 |
parents | da91efe96a93 |
children | aeaca88565e6 |
comparison
equal
deleted
inserted
replaced
6799:c92f43386117 | 6800:9191895df19d |
---|---|
41 mdo_invocations = mdh->invocation_count(); | 41 mdo_invocations = mdh->invocation_count(); |
42 mdo_backedges = mdh->backedge_count(); | 42 mdo_backedges = mdh->backedge_count(); |
43 mdo_invocations_start = mdh->invocation_count_start(); | 43 mdo_invocations_start = mdh->invocation_count_start(); |
44 mdo_backedges_start = mdh->backedge_count_start(); | 44 mdo_backedges_start = mdh->backedge_count_start(); |
45 } | 45 } |
46 tty->print(" %stotal: %d,%d %smdo: %d(%d),%d(%d)", prefix, | 46 tty->print(" %stotal=%d,%d %smdo=%d(%d),%d(%d)", prefix, |
47 invocation_count, backedge_count, prefix, | 47 invocation_count, backedge_count, prefix, |
48 mdo_invocations, mdo_invocations_start, | 48 mdo_invocations, mdo_invocations_start, |
49 mdo_backedges, mdo_backedges_start); | 49 mdo_backedges, mdo_backedges_start); |
50 tty->print(" %smax levels: %d,%d", prefix, | 50 tty->print(" %smax levels=%d,%d", prefix, |
51 mh->highest_comp_level(), mh->highest_osr_comp_level()); | 51 mh->highest_comp_level(), mh->highest_osr_comp_level()); |
52 } | 52 } |
53 | 53 |
54 // Print an event. | 54 // Print an event. |
55 void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh, | 55 void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh, |
83 break; | 83 break; |
84 default: | 84 default: |
85 tty->print("unknown"); | 85 tty->print("unknown"); |
86 } | 86 } |
87 | 87 |
88 tty->print(" level: %d ", level); | 88 tty->print(" level=%d ", level); |
89 | 89 |
90 ResourceMark rm; | 90 ResourceMark rm; |
91 char *method_name = mh->name_and_sig_as_C_string(); | 91 char *method_name = mh->name_and_sig_as_C_string(); |
92 tty->print("[%s", method_name); | 92 tty->print("[%s", method_name); |
93 if (inlinee_event) { | 93 if (inlinee_event) { |
94 char *inlinee_name = imh->name_and_sig_as_C_string(); | 94 char *inlinee_name = imh->name_and_sig_as_C_string(); |
95 tty->print(" [%s]] ", inlinee_name); | 95 tty->print(" [%s]] ", inlinee_name); |
96 } | 96 } |
97 else tty->print("] "); | 97 else tty->print("] "); |
98 tty->print("@%d queues: %d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile), | 98 tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile), |
99 CompileBroker::queue_size(CompLevel_full_optimization)); | 99 CompileBroker::queue_size(CompLevel_full_optimization)); |
100 | 100 |
101 print_specific(type, mh, imh, bci, level); | 101 print_specific(type, mh, imh, bci, level); |
102 | 102 |
103 if (type != COMPILE) { | 103 if (type != COMPILE) { |
104 print_counters("", mh); | 104 print_counters("", mh); |
105 if (inlinee_event) { | 105 if (inlinee_event) { |
106 print_counters("inlinee ", imh); | 106 print_counters("inlinee ", imh); |
107 } | 107 } |
108 tty->print(" compilable: "); | 108 tty->print(" compilable="); |
109 bool need_comma = false; | 109 bool need_comma = false; |
110 if (!mh->is_not_compilable(CompLevel_full_profile)) { | 110 if (!mh->is_not_compilable(CompLevel_full_profile)) { |
111 tty->print("c1"); | 111 tty->print("c1"); |
112 need_comma = true; | 112 need_comma = true; |
113 } | 113 } |
114 if (!mh->is_not_osr_compilable(CompLevel_full_profile)) { | |
115 if (need_comma) tty->print(","); | |
116 tty->print("c1-osr"); | |
117 need_comma = true; | |
118 } | |
114 if (!mh->is_not_compilable(CompLevel_full_optimization)) { | 119 if (!mh->is_not_compilable(CompLevel_full_optimization)) { |
115 if (need_comma) tty->print(", "); | 120 if (need_comma) tty->print(","); |
116 tty->print("c2"); | 121 tty->print("c2"); |
117 need_comma = true; | 122 need_comma = true; |
118 } | 123 } |
119 if (!mh->is_not_osr_compilable()) { | 124 if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) { |
120 if (need_comma) tty->print(", "); | 125 if (need_comma) tty->print(","); |
121 tty->print("osr"); | 126 tty->print("c2-osr"); |
122 } | 127 } |
123 tty->print(" status:"); | 128 tty->print(" status="); |
124 if (mh->queued_for_compilation()) { | 129 if (mh->queued_for_compilation()) { |
125 tty->print(" in queue"); | 130 tty->print("in-queue"); |
126 } else tty->print(" idle"); | 131 } else tty->print("idle"); |
127 } | 132 } |
128 tty->print_cr("]"); | 133 tty->print_cr("]"); |
129 } | 134 } |
130 | 135 |
131 void SimpleThresholdPolicy::initialize() { | 136 void SimpleThresholdPolicy::initialize() { |
221 if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) { | 226 if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) { |
222 compile(mh, bci, CompLevel_simple, thread); | 227 compile(mh, bci, CompLevel_simple, thread); |
223 } | 228 } |
224 return; | 229 return; |
225 } | 230 } |
226 if (bci != InvocationEntryBci && mh->is_not_osr_compilable()) { | 231 if (bci != InvocationEntryBci && mh->is_not_osr_compilable(level)) { |
227 return; | 232 return; |
228 } | 233 } |
229 if (!CompileBroker::compilation_is_in_queue(mh, bci)) { | 234 if (!CompileBroker::compilation_is_in_queue(mh, bci)) { |
230 if (PrintTieredEvents) { | 235 if (PrintTieredEvents) { |
231 print_event(COMPILE, mh, mh, bci, level); | 236 print_event(COMPILE, mh, mh, bci, level); |