< prev index next >

src/hotspot/share/ci/ciMethodData.cpp


180     ciReplay::initialize(this);                                                                                                      
181   }                                                                                                                                  
182 #endif                                                                                                                               
183 }                                                                                                                                    
184 
185 void ciReceiverTypeData::translate_receiver_data_from(const ProfileData* data) {                                                     
186   for (uint row = 0; row < row_limit(); row++) {                                                                                     
187     Klass* k = data->as_ReceiverTypeData()->receiver(row);                                                                           
188     if (k != NULL) {                                                                                                                 
189       if (k->is_loader_alive()) {                                                                                                    
190         ciKlass* klass = CURRENT_ENV->get_klass(k);                                                                                  
191         set_receiver(row, klass);                                                                                                    
192       } else {                                                                                                                       
193         // With concurrent class unloading, the MDO could have stale metadata; override it                                           
194         clear_row(row);                                                                                                              
195       }                                                                                                                              
196     }                                                                                                                                
197   }                                                                                                                                  
198 }                                                                                                                                    
199 
200                                                                                                                                      
201 void ciTypeStackSlotEntries::translate_type_data_from(const TypeStackSlotEntries* entries) {                                         
202   for (int i = 0; i < number_of_entries(); i++) {                                                                                    
203     intptr_t k = entries->type(i);                                                                                                   
204     TypeStackSlotEntries::set_type(i, translate_klass(k));                                                                           
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
205   }                                                                                                                                  
206 }                                                                                                                                    
207 
208 void ciReturnTypeEntry::translate_type_data_from(const ReturnTypeEntry* ret) {                                                       
209   intptr_t k = ret->type();                                                                                                          
210   set_type(translate_klass(k));                                                                                                      
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
211 }                                                                                                                                    
212 
213 void ciSpeculativeTrapData::translate_from(const ProfileData* data) {                                                                
214   Method* m = data->as_SpeculativeTrapData()->method();                                                                              
215   ciMethod* ci_m = CURRENT_ENV->get_method(m);                                                                                       
216   set_method(ci_m);                                                                                                                  
217 }                                                                                                                                    
218 
219 // Get the data at an arbitrary (sort of) data index.                                                                                
220 ciProfileData* ciMethodData::data_at(int data_index) {                                                                               
221   if (out_of_bounds(data_index)) {                                                                                                   
222     return NULL;                                                                                                                     
223   }                                                                                                                                  
224   DataLayout* data_layout = data_layout_at(data_index);                                                                              
225 
226   switch (data_layout->tag()) {                                                                                                      
227   case DataLayout::no_tag:                                                                                                           
228   default:                                                                                                                           
229     ShouldNotReachHere();                                                                                                            

180     ciReplay::initialize(this);
181   }
182 #endif
183 }
184 
185 void ciReceiverTypeData::translate_receiver_data_from(const ProfileData* data) {
186   for (uint row = 0; row < row_limit(); row++) {
187     Klass* k = data->as_ReceiverTypeData()->receiver(row);
188     if (k != NULL) {
189       if (k->is_loader_alive()) {
190         ciKlass* klass = CURRENT_ENV->get_klass(k);
191         set_receiver(row, klass);
192       } else {
193         // With concurrent class unloading, the MDO could have stale metadata; override it
194         clear_row(row);
195       }
196     }
197   }
198 }
199 

200 void ciTypeStackSlotEntries::translate_type_data_from(const TypeStackSlotEntries* entries) {
201   for (int i = 0; i < number_of_entries(); i++) {
202     intptr_t k = entries->type(i);
203     Klass* klass = (Klass*)klass_part(k);
204     if (klass != NULL && !klass->is_loader_alive()) {
205       // With concurrent class unloading, the MDO could have stale metadata; override it
206       TypeStackSlotEntries::set_type(i, TypeStackSlotEntries::with_status((Klass*)NULL, k));
207     } else {
208       TypeStackSlotEntries::set_type(i, translate_klass(k));
209     }
210   }
211 }
212 
213 void ciReturnTypeEntry::translate_type_data_from(const ReturnTypeEntry* ret) {
214   intptr_t k = ret->type();
215   Klass* klass = (Klass*)klass_part(k);
216   if (klass != NULL && !klass->is_loader_alive()) {
217     // With concurrent class unloading, the MDO could have stale metadata; override it
218     set_type(ReturnTypeEntry::with_status((Klass*)NULL, k));
219   } else {
220     set_type(translate_klass(k));
221   }
222 }
223 
224 void ciSpeculativeTrapData::translate_from(const ProfileData* data) {
225   Method* m = data->as_SpeculativeTrapData()->method();
226   ciMethod* ci_m = CURRENT_ENV->get_method(m);
227   set_method(ci_m);
228 }
229 
230 // Get the data at an arbitrary (sort of) data index.
231 ciProfileData* ciMethodData::data_at(int data_index) {
232   if (out_of_bounds(data_index)) {
233     return NULL;
234   }
235   DataLayout* data_layout = data_layout_at(data_index);
236 
237   switch (data_layout->tag()) {
238   case DataLayout::no_tag:
239   default:
240     ShouldNotReachHere();
< prev index next >