404 if (box->as_BoxLock()->is_eliminated()) 405 obj_msg = "MON-OBJ(LOCK ELIMINATED)["; 406 } 407 format_helper( regalloc, st, obj, obj_msg, i, &scobjs ); 408 } 409 410 for (i = 0; i < (uint)scobjs.length(); i++) { 411 // Scalar replaced objects. 412 st->print_cr(""); 413 st->print(" # ScObj" INT32_FORMAT " ", i); 414 SafePointScalarObjectNode* spobj = scobjs.at(i); 415 ciKlass* cik = spobj->bottom_type()->is_oopptr()->klass(); 416 assert(cik->is_instance_klass() || 417 cik->is_array_klass(), "Not supported allocation."); 418 ciInstanceKlass *iklass = NULL; 419 if (cik->is_instance_klass()) { 420 cik->print_name_on(st); 421 iklass = cik->as_instance_klass(); 422 } else if (cik->is_type_array_klass()) { 423 cik->as_array_klass()->base_element_type()->print_name_on(st); 424 st->print("[%d]=", spobj->n_fields()); 425 } else if (cik->is_obj_array_klass()) { 426 ciType* cie = cik->as_array_klass()->base_element_type(); 427 int ndim = 1; 428 while (cie->is_obj_array_klass()) { 429 ndim += 1; 430 cie = cie->as_array_klass()->base_element_type(); 431 } 432 cie->print_name_on(st); 433 while (ndim-- > 0) { 434 st->print("[]"); 435 } 436 st->print("[%d]=", spobj->n_fields()); 437 } 438 st->print("{"); 439 uint nf = spobj->n_fields(); 440 if (nf > 0) { 441 uint first_ind = spobj->first_index(); 442 Node* fld_node = mcall->in(first_ind); 443 ciField* cifield; 444 if (iklass != NULL) { 445 st->print(" ["); 446 cifield = iklass->nonstatic_field_at(0); 447 cifield->print_name_on(st); 448 format_helper( regalloc, st, fld_node, ":", 0, &scobjs ); 449 } else { 450 format_helper( regalloc, st, fld_node, "[", 0, &scobjs ); 451 } 452 for (uint j = 1; j < nf; j++) { 453 fld_node = mcall->in(first_ind+j); 454 if (iklass != NULL) { 455 st->print(", ["); 456 cifield = iklass->nonstatic_field_at(j); 457 cifield->print_name_on(st); 458 format_helper( regalloc, st, fld_node, ":", j, &scobjs ); | 404 if (box->as_BoxLock()->is_eliminated()) 405 obj_msg = "MON-OBJ(LOCK ELIMINATED)["; 406 } 407 format_helper( regalloc, st, obj, obj_msg, i, &scobjs ); 408 } 409 410 for (i = 0; i < (uint)scobjs.length(); i++) { 411 // Scalar replaced objects. 412 st->print_cr(""); 413 st->print(" # ScObj" INT32_FORMAT " ", i); 414 SafePointScalarObjectNode* spobj = scobjs.at(i); 415 ciKlass* cik = spobj->bottom_type()->is_oopptr()->klass(); 416 assert(cik->is_instance_klass() || 417 cik->is_array_klass(), "Not supported allocation."); 418 ciInstanceKlass *iklass = NULL; 419 if (cik->is_instance_klass()) { 420 cik->print_name_on(st); 421 iklass = cik->as_instance_klass(); 422 } else if (cik->is_type_array_klass()) { 423 cik->as_array_klass()->base_element_type()->print_name_on(st); 424 st->print("[%d]", spobj->n_fields()); 425 } else if (cik->is_obj_array_klass()) { 426 ciKlass* cie = cik->as_obj_array_klass()->base_element_klass(); 427 if (cie->is_instance_klass()) { 428 cie->print_name_on(st); 429 } else if (cie->is_type_array_klass()) { 430 cie->as_array_klass()->base_element_type()->print_name_on(st); 431 } else { 432 ShouldNotReachHere(); 433 } 434 st->print("[%d]", spobj->n_fields()); 435 int ndim = cik->as_array_klass()->dimension() - 1; 436 while (ndim-- > 0) { 437 st->print("[]"); 438 } 439 } 440 st->print("={"); 441 uint nf = spobj->n_fields(); 442 if (nf > 0) { 443 uint first_ind = spobj->first_index(); 444 Node* fld_node = mcall->in(first_ind); 445 ciField* cifield; 446 if (iklass != NULL) { 447 st->print(" ["); 448 cifield = iklass->nonstatic_field_at(0); 449 cifield->print_name_on(st); 450 format_helper( regalloc, st, fld_node, ":", 0, &scobjs ); 451 } else { 452 format_helper( regalloc, st, fld_node, "[", 0, &scobjs ); 453 } 454 for (uint j = 1; j < nf; j++) { 455 fld_node = mcall->in(first_ind+j); 456 if (iklass != NULL) { 457 st->print(", ["); 458 cifield = iklass->nonstatic_field_at(j); 459 cifield->print_name_on(st); 460 format_helper( regalloc, st, fld_node, ":", j, &scobjs ); |