< prev index next >

src/hotspot/share/ci/ciMethodData.hpp

Print this page

107 #endif
108 };
109 
110 class ciTypeStackSlotEntries : public TypeStackSlotEntries, ciTypeEntries {
111 public:
112   void translate_type_data_from(const TypeStackSlotEntries* args);
113 
114   ciKlass* valid_type(int i) const {
115     return valid_ciklass(type(i));
116   }
117 
118   ProfilePtrKind ptr_kind(int i) const {
119     return ciTypeEntries::ptr_kind(type(i));
120   }
121 
122 #ifndef PRODUCT
123   void print_data_on(outputStream* st) const;
124 #endif
125 };
126 
127 class ciReturnTypeEntry : public ReturnTypeEntry, ciTypeEntries {
128 public:
129   void translate_type_data_from(const ReturnTypeEntry* ret);
130 
131   ciKlass* valid_type() const {
132     return valid_ciklass(type());
133   }
134 
135   ProfilePtrKind ptr_kind() const {
136     return ciTypeEntries::ptr_kind(type());
137   }
138 
139 #ifndef PRODUCT
140   void print_data_on(outputStream* st) const;
141 #endif
142 };
143 
144 class ciCallTypeData : public CallTypeData {
145 public:
146   ciCallTypeData(DataLayout* layout) : CallTypeData(layout) {}
147 
148   ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)CallTypeData::args(); }
149   ciReturnTypeEntry* ret() const { return (ciReturnTypeEntry*)CallTypeData::ret(); }
150 
151   void translate_from(const ProfileData* data) {
152     if (has_arguments()) {
153       args()->translate_type_data_from(data->as_CallTypeData()->args());
154     }
155     if (has_return()) {
156       ret()->translate_type_data_from(data->as_CallTypeData()->ret());
157     }
158   }
159 
160   intptr_t argument_type(int i) const {
161     assert(has_arguments(), "no arg type profiling data");
162     return args()->type(i);
163   }
164 
165   ciKlass* valid_argument_type(int i) const {
166     assert(has_arguments(), "no arg type profiling data");
167     return args()->valid_type(i);
168   }
169 

241   void print_data_on(outputStream* st, const char* extra = NULL) const;
242 #endif
243 };
244 
245 class ciVirtualCallTypeData : public VirtualCallTypeData {
246 private:
247   // Fake multiple inheritance...  It's a ciReceiverTypeData also.
248   ciReceiverTypeData* rtd_super() const { return (ciReceiverTypeData*) this; }
249 public:
250   ciVirtualCallTypeData(DataLayout* layout) : VirtualCallTypeData(layout) {}
251 
252   void set_receiver(uint row, ciKlass* recv) {
253     rtd_super()->set_receiver(row, recv);
254   }
255 
256   ciKlass* receiver(uint row) const {
257     return rtd_super()->receiver(row);
258   }
259 
260   ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)VirtualCallTypeData::args(); }
261   ciReturnTypeEntry* ret() const { return (ciReturnTypeEntry*)VirtualCallTypeData::ret(); }
262 
263   // Copy & translate from oop based VirtualCallData
264   virtual void translate_from(const ProfileData* data) {
265     rtd_super()->translate_receiver_data_from(data);
266     if (has_arguments()) {
267       args()->translate_type_data_from(data->as_VirtualCallTypeData()->args());
268     }
269     if (has_return()) {
270       ret()->translate_type_data_from(data->as_VirtualCallTypeData()->ret());
271     }
272   }
273 
274   ciKlass* valid_argument_type(int i) const {
275     assert(has_arguments(), "no arg type profiling data");
276     return args()->valid_type(i);
277   }
278 
279   intptr_t return_type() const {
280     assert(has_return(), "no ret type profiling data");
281     return ret()->type();

345 
346 class ciSpeculativeTrapData : public SpeculativeTrapData {
347 public:
348   ciSpeculativeTrapData(DataLayout* layout) : SpeculativeTrapData(layout) {}
349 
350   virtual void translate_from(const ProfileData* data);
351 
352   ciMethod* method() const {
353     return (ciMethod*)intptr_at(speculative_trap_method);
354   }
355 
356   void set_method(ciMethod* m) {
357     set_intptr_at(speculative_trap_method, (intptr_t)m);
358   }
359 
360 #ifndef PRODUCT
361   void print_data_on(outputStream* st, const char* extra = NULL) const;
362 #endif
363 };
364 


































365 // ciMethodData
366 //
367 // This class represents a MethodData* in the HotSpot virtual
368 // machine.
369 
370 class ciMethodData : public ciMetadata {
371   CI_PACKAGE_ACCESS
372   friend class ciReplay;
373 
374 private:
375   // Size in bytes
376   int _data_size;
377   int _extra_data_size;
378 
379   // Data entries
380   intptr_t* _data;
381 
382   // Cached hint for data_layout_before()
383   int _hint_di;
384 

107 #endif
108 };
109 
110 class ciTypeStackSlotEntries : public TypeStackSlotEntries, ciTypeEntries {
111 public:
112   void translate_type_data_from(const TypeStackSlotEntries* args);
113 
114   ciKlass* valid_type(int i) const {
115     return valid_ciklass(type(i));
116   }
117 
118   ProfilePtrKind ptr_kind(int i) const {
119     return ciTypeEntries::ptr_kind(type(i));
120   }
121 
122 #ifndef PRODUCT
123   void print_data_on(outputStream* st) const;
124 #endif
125 };
126 
127 class ciSingleTypeEntry : public SingleTypeEntry, ciTypeEntries {
128 public:
129   void translate_type_data_from(const SingleTypeEntry* ret);
130 
131   ciKlass* valid_type() const {
132     return valid_ciklass(type());
133   }
134 
135   ProfilePtrKind ptr_kind() const {
136     return ciTypeEntries::ptr_kind(type());
137   }
138 
139 #ifndef PRODUCT
140   void print_data_on(outputStream* st) const;
141 #endif
142 };
143 
144 class ciCallTypeData : public CallTypeData {
145 public:
146   ciCallTypeData(DataLayout* layout) : CallTypeData(layout) {}
147 
148   ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)CallTypeData::args(); }
149   ciSingleTypeEntry* ret() const { return (ciSingleTypeEntry*)CallTypeData::ret(); }
150 
151   void translate_from(const ProfileData* data) {
152     if (has_arguments()) {
153       args()->translate_type_data_from(data->as_CallTypeData()->args());
154     }
155     if (has_return()) {
156       ret()->translate_type_data_from(data->as_CallTypeData()->ret());
157     }
158   }
159 
160   intptr_t argument_type(int i) const {
161     assert(has_arguments(), "no arg type profiling data");
162     return args()->type(i);
163   }
164 
165   ciKlass* valid_argument_type(int i) const {
166     assert(has_arguments(), "no arg type profiling data");
167     return args()->valid_type(i);
168   }
169 

241   void print_data_on(outputStream* st, const char* extra = NULL) const;
242 #endif
243 };
244 
245 class ciVirtualCallTypeData : public VirtualCallTypeData {
246 private:
247   // Fake multiple inheritance...  It's a ciReceiverTypeData also.
248   ciReceiverTypeData* rtd_super() const { return (ciReceiverTypeData*) this; }
249 public:
250   ciVirtualCallTypeData(DataLayout* layout) : VirtualCallTypeData(layout) {}
251 
252   void set_receiver(uint row, ciKlass* recv) {
253     rtd_super()->set_receiver(row, recv);
254   }
255 
256   ciKlass* receiver(uint row) const {
257     return rtd_super()->receiver(row);
258   }
259 
260   ciTypeStackSlotEntries* args() const { return (ciTypeStackSlotEntries*)VirtualCallTypeData::args(); }
261   ciSingleTypeEntry* ret() const { return (ciSingleTypeEntry*)VirtualCallTypeData::ret(); }
262 
263   // Copy & translate from oop based VirtualCallData
264   virtual void translate_from(const ProfileData* data) {
265     rtd_super()->translate_receiver_data_from(data);
266     if (has_arguments()) {
267       args()->translate_type_data_from(data->as_VirtualCallTypeData()->args());
268     }
269     if (has_return()) {
270       ret()->translate_type_data_from(data->as_VirtualCallTypeData()->ret());
271     }
272   }
273 
274   ciKlass* valid_argument_type(int i) const {
275     assert(has_arguments(), "no arg type profiling data");
276     return args()->valid_type(i);
277   }
278 
279   intptr_t return_type() const {
280     assert(has_return(), "no ret type profiling data");
281     return ret()->type();

345 
346 class ciSpeculativeTrapData : public SpeculativeTrapData {
347 public:
348   ciSpeculativeTrapData(DataLayout* layout) : SpeculativeTrapData(layout) {}
349 
350   virtual void translate_from(const ProfileData* data);
351 
352   ciMethod* method() const {
353     return (ciMethod*)intptr_at(speculative_trap_method);
354   }
355 
356   void set_method(ciMethod* m) {
357     set_intptr_at(speculative_trap_method, (intptr_t)m);
358   }
359 
360 #ifndef PRODUCT
361   void print_data_on(outputStream* st, const char* extra = NULL) const;
362 #endif
363 };
364 
365 class ciArrayLoadStoreData : public ArrayLoadStoreData {
366 public:
367   ciArrayLoadStoreData(DataLayout* layout) : ArrayLoadStoreData(layout) {}
368 
369   ciSingleTypeEntry* array() const { return (ciSingleTypeEntry*)ArrayLoadStoreData::array(); }
370   ciSingleTypeEntry* element() const { return (ciSingleTypeEntry*)ArrayLoadStoreData::element(); }
371 
372   virtual void translate_from(const ProfileData* data) {
373     array()->translate_type_data_from(data->as_ArrayLoadStoreData()->array());
374     element()->translate_type_data_from(data->as_ArrayLoadStoreData()->element());
375   }
376 
377 #ifndef PRODUCT
378   void print_data_on(outputStream* st, const char* extra = NULL) const;
379 #endif
380 };
381 
382 class ciACmpData : public ACmpData {
383 public:
384   ciACmpData(DataLayout* layout) : ACmpData(layout) {}
385 
386   ciSingleTypeEntry* left() const { return (ciSingleTypeEntry*)ACmpData::left(); }
387   ciSingleTypeEntry* right() const { return (ciSingleTypeEntry*)ACmpData::right(); }
388 
389   virtual void translate_from(const ProfileData* data) {
390     left()->translate_type_data_from(data->as_ACmpData()->left());
391     right()->translate_type_data_from(data->as_ACmpData()->right());
392   }
393 
394 #ifndef PRODUCT
395   void print_data_on(outputStream* st, const char* extra = NULL) const;
396 #endif
397 };
398 
399 // ciMethodData
400 //
401 // This class represents a MethodData* in the HotSpot virtual
402 // machine.
403 
404 class ciMethodData : public ciMetadata {
405   CI_PACKAGE_ACCESS
406   friend class ciReplay;
407 
408 private:
409   // Size in bytes
410   int _data_size;
411   int _extra_data_size;
412 
413   // Data entries
414   intptr_t* _data;
415 
416   // Cached hint for data_layout_before()
417   int _hint_di;
418 
< prev index next >