United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6484385 PRT crashes if tiered compiler is used.
JDK-6484385 : PRT crashes if tiered compiler is used.

Details
Type:
Bug
Submit Date:
2006-10-20
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-11-14
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10 (b03)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Testing tiered compilers shows that 

solaris_sparc_jdk1.6_product_c2_runThese_Xcomp              FAIL (09m 44s elapsed)

occurs in PRT.

                                    

Comments
EVALUATION

Bad offsets generated for updating the MDO.
                                     
2006-10-20
SUGGESTED FIX

c1_LIRAssembler_sparc.cpp.

*** 2358,2378 ****
--- 2358,2389 ----
        if (md == NULL) {
          bailout("out of memory building methodDataOop");
          return;
        }
        ciProfileData* data = md->bci_to_data(bci);
        assert(data != NULL,       "need data for checkcast");
        assert(data->is_BitData(), "need BitData for checkcast");
        Register mdo      = k_RInfo;
        Register data_val = Rtmp1;
        jobject2reg(md->encoding(), mdo);
        Address data_addr(mdo, 0, md->byte_offset_of_slot(data, ProfileData::header_offset()));
+ 
+       int mdo_offset_bias = 0;
+       if (!Assembler::is_simm13(md->byte_offset_of_slot(data, ProfileData::header_offset()) + data->size_in_bytes())) {
+         // The offset is large so bias the mdo by the base of the slot so
+         // that the ld can use simm13s to reference the slots of the data
+         mdo_offset_bias = md->byte_offset_of_slot(data, ProfileData::header_offset());
+         __ set(mdo_offset_bias, data_val);
+         __ add(mdo, data_val, mdo);
+       }
+ 
+ 
+       Address data_addr(mdo, 0, md->byte_offset_of_slot(data, ProfileData::header_offset()) - mdo_offset_bias);
        __ ld_ptr(data_addr, data_val);
        __ set(BitData::null_flag_constant(), mdo);
        __ or3(data_val, mdo, data_val);
        jobject2reg(md->encoding(), mdo);
        __ st_ptr(data_val, data_addr);
        __ bind(profile_done);
      }
  
      Label done;
      // patching may screw with our temporaries on sparc,

c1_GraphBuilder.cpp

*** 3156,3182 ****
--- 3156,3186 ----
  
      default                       : return false; // do not inline
    }
    // create intrinsic node
    const bool has_receiver = !callee->is_static();
    ValueType* result_type = as_ValueType(callee->return_type());
  
    Values* args = state()->pop_arguments(callee->arg_size());
    ValueStack* locks = lock_stack();
    if (profile_calls()) {
+     // Don't profile in the special case where the root method
+     // is the intrinsic
+     if (callee != method()) {
        Value recv = NULL;
        if (has_receiver) {
          recv = args->at(0);
          null_check(recv);
        }
        profile_call(recv, NULL);
      }
+   }
  
    Intrinsic* result = new Intrinsic(result_type, id, args, has_receiver, lock_stack(),
                                      preserves_state, cantrap);
    // append instruction & push result
    Value value = append_split(result);
    if (result_type != voidType) push(result_type, value);
  
  #ifndef PRODUCT
    // printing
    if (PrintInlining) {
                                     
2006-10-23



Hardware and Software, Engineered to Work Together