comparison src/share/vm/graal/graalVMEntries.cpp @ 3487:b9ed7199f6fb

special handling for VirtualObject(Field) in IdentifyBlocksPhase (don't schedule out of loops), better toString for HotSpotMethod/Field
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 04 Aug 2011 18:52:50 +0200
parents 8cd198d7cbc1
children 25765a764212
comparison
equal deleted inserted replaced
3486:a5b02018b843 3487:b9ed7199f6fb
190 { 190 {
191 VM_ENTRY_MARK; 191 VM_ENTRY_MARK;
192 methodOop method = getMethodFromHotSpotMethod(hotspot_method); 192 methodOop method = getMethodFromHotSpotMethod(hotspot_method);
193 cimethod = (ciMethod*)CURRENT_ENV->get_object(method); 193 cimethod = (ciMethod*)CURRENT_ENV->get_object(method);
194 } 194 }
195 195 ciMethodData* method_data = cimethod->method_data();
196 ciMethodData* method_data = cimethod->method_data_or_null(); 196
197 if (method_data == NULL) { 197 if (method_data == NULL || !method_data->is_mature()) return -1;
198 return -1; 198
199 ciProfileData* profile = method_data->bci_to_data(bci);
200 if (profile == NULL) {
201 return 0;
202 }
203 uint trap = method_data->trap_recompiled_at(profile);
204 if (trap > 0) {
205 return 100;
199 } else { 206 } else {
200 ciProfileData* profile = method_data->bci_to_data(bci); 207 return trap;
201 if (profile == NULL) {
202 return 0;
203 }
204 uint trap = method_data->trap_recompiled_at(profile);
205 if (trap > 0) {
206 return 100;
207 } else {
208 return trap;
209 }
210 } 208 }
211 } 209 }
212 210
213 // public native RiTypeProfile RiMethod_typeProfile(long vmId, int bci); 211 // public native RiTypeProfile RiMethod_typeProfile(long vmId, int bci);
214 JNIEXPORT jobject JNICALL Java_com_oracle_graal_runtime_VMEntries_RiMethod_2typeProfile(JNIEnv *, jobject, jobject hotspot_method, jint bci) { 212 JNIEXPORT jobject JNICALL Java_com_oracle_graal_runtime_VMEntries_RiMethod_2typeProfile(JNIEnv *, jobject, jobject hotspot_method, jint bci) {