Mercurial > hg > truffle
comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 1936:8d88c9ac9247
Correct deopt handler entry. New flag -XX:+TraceSignals. More detailed deopt printing.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Thu, 23 Dec 2010 18:13:28 +0100 |
parents | 48bbaead8b6c |
children | 4853c5cad3aa |
comparison
equal
deleted
inserted
replaced
1935:98dbef29f10b | 1936:8d88c9ac9247 |
---|---|
160 | 160 |
161 initialize_fields(target_method); | 161 initialize_fields(target_method); |
162 assert(_hotspot_method != NULL && _name == NULL, "installMethod needs NON-NULL method and NULL name"); | 162 assert(_hotspot_method != NULL && _name == NULL, "installMethod needs NON-NULL method and NULL name"); |
163 assert(_hotspot_method->is_a(HotSpotMethodResolved::klass()), "installMethod needs a HotSpotMethodResolved"); | 163 assert(_hotspot_method->is_a(HotSpotMethodResolved::klass()), "installMethod needs a HotSpotMethodResolved"); |
164 | 164 |
165 // TODO: This is a hack.. Produce correct entries. | |
166 _offsets.set_value(CodeOffsets::Exceptions, 0); | |
167 _offsets.set_value(CodeOffsets::Deopt, 0); | |
168 | |
169 methodOop method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(_hotspot_method)); | 165 methodOop method = VmIds::get<methodOop>(HotSpotMethodResolved::vmId(_hotspot_method)); |
170 ciMethodObject = (ciMethod *) _env->get_object(method); | 166 ciMethodObject = (ciMethod *) _env->get_object(method); |
171 _parameter_count = method->size_of_parameters(); | 167 _parameter_count = method->size_of_parameters(); |
172 } | 168 } |
173 | 169 |
363 assert(local_count + expression_count + monitor_count == values->length(), "unexpected values length"); | 359 assert(local_count + expression_count + monitor_count == values->length(), "unexpected values length"); |
364 | 360 |
365 GrowableArray<ScopeValue*>* locals = new GrowableArray<ScopeValue*> (); | 361 GrowableArray<ScopeValue*>* locals = new GrowableArray<ScopeValue*> (); |
366 GrowableArray<ScopeValue*>* expressions = new GrowableArray<ScopeValue*> (); | 362 GrowableArray<ScopeValue*>* expressions = new GrowableArray<ScopeValue*> (); |
367 GrowableArray<MonitorValue*>* monitors = new GrowableArray<MonitorValue*> (); | 363 GrowableArray<MonitorValue*>* monitors = new GrowableArray<MonitorValue*> (); |
364 | |
365 if (TraceC1X >= 2) { | |
366 tty->print_cr("Scope at bci %d with %d values", bci, values->length()); | |
367 tty->print_cr("%d locals %d expressions, %d monitors", local_count, expression_count, monitor_count); | |
368 } | |
368 | 369 |
369 for (jint i = 0; i < values->length(); i++) { | 370 for (jint i = 0; i < values->length(); i++) { |
370 ScopeValue* value = get_hotspot_value(((oop*) values->base(T_OBJECT))[i], _frame_size); | 371 ScopeValue* value = get_hotspot_value(((oop*) values->base(T_OBJECT))[i], _frame_size); |
371 | 372 |
372 if (i < local_count) { | 373 if (i < local_count) { |
598 _offsets.set_value(CodeOffsets::UnwindHandler, pc_offset); | 599 _offsets.set_value(CodeOffsets::UnwindHandler, pc_offset); |
599 break; | 600 break; |
600 case MARK_EXCEPTION_HANDLER_ENTRY: | 601 case MARK_EXCEPTION_HANDLER_ENTRY: |
601 _offsets.set_value(CodeOffsets::Exceptions, pc_offset); | 602 _offsets.set_value(CodeOffsets::Exceptions, pc_offset); |
602 break; | 603 break; |
604 case MARK_DEOPT_HANDLER_ENTRY: | |
605 _offsets.set_value(CodeOffsets::Deopt, pc_offset); | |
606 break; | |
603 case MARK_STATIC_CALL_STUB: { | 607 case MARK_STATIC_CALL_STUB: { |
604 assert(references->length() == 1, "static call stub needs one reference"); | 608 assert(references->length() == 1, "static call stub needs one reference"); |
605 oop ref = ((oop*) references->base(T_OBJECT))[0]; | 609 oop ref = ((oop*) references->base(T_OBJECT))[0]; |
606 address call_pc = _instructions->start() + CiTargetMethod_Site::pcOffset(ref); | 610 address call_pc = _instructions->start() + CiTargetMethod_Site::pcOffset(ref); |
607 _instructions->relocate(instruction, static_stub_Relocation::spec(call_pc)); | 611 _instructions->relocate(instruction, static_stub_Relocation::spec(call_pc)); |