< prev index next >

src/hotspot/share/ci/ciEnv.hpp

Print this page

119   // The CI treats a klass as loaded if it is consistently defined in
120   // another loader, even if it hasn't yet been loaded in all loaders
121   // that could potentially see it via delegation.
122   ciKlass* get_klass_by_name(ciKlass* accessing_klass,
123                              ciSymbol* klass_name,
124                              bool require_local);
125 
126   // Constant pool access.
127   ciKlass*   get_klass_by_index(const constantPoolHandle& cpool,
128                                 int klass_index,
129                                 bool& is_accessible,
130                                 ciInstanceKlass* loading_klass);
131   ciConstant get_constant_by_index(const constantPoolHandle& cpool,
132                                    int pool_index, int cache_index,
133                                    ciInstanceKlass* accessor);
134   ciField*   get_field_by_index(ciInstanceKlass* loading_klass,
135                                 int field_index);
136   ciMethod*  get_method_by_index(const constantPoolHandle& cpool,
137                                  int method_index, Bytecodes::Code bc,
138                                  ciInstanceKlass* loading_klass);


139 
140   // Implementation methods for loading and constant pool access.
141   ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass,
142                                   const constantPoolHandle& cpool,
143                                   ciSymbol* klass_name,
144                                   bool require_local);
145   ciKlass*   get_klass_by_index_impl(const constantPoolHandle& cpool,
146                                      int klass_index,
147                                      bool& is_accessible,
148                                      ciInstanceKlass* loading_klass);
149   ciConstant get_constant_by_index_impl(const constantPoolHandle& cpool,
150                                         int pool_index, int cache_index,
151                                         ciInstanceKlass* loading_klass);
152   ciField*   get_field_by_index_impl(ciInstanceKlass* loading_klass,
153                                      int field_index);
154   ciMethod*  get_method_by_index_impl(const constantPoolHandle& cpool,
155                                       int method_index, Bytecodes::Code bc,
156                                       ciInstanceKlass* loading_klass);
157 
158   // Helper methods

186       return _factory->get_symbol(o);
187     }
188   }
189 
190   ciMetadata* get_metadata(Metadata* o) {
191     if (o == NULL) {
192       return NULL;
193     } else {
194       return _factory->get_metadata(o);
195     }
196   }
197 
198   ciMetadata* cached_metadata(Metadata* o) {
199     return _factory->cached_metadata(o);
200   }
201 
202   ciInstance* get_instance(oop o) {
203     if (o == NULL) return NULL;
204     return get_object(o)->as_instance();
205   }




206   ciObjArrayKlass* get_obj_array_klass(Klass* o) {
207     if (o == NULL) return NULL;
208     return get_metadata(o)->as_obj_array_klass();
209   }
210   ciTypeArrayKlass* get_type_array_klass(Klass* o) {
211     if (o == NULL) return NULL;
212     return get_metadata(o)->as_type_array_klass();
213   }
214   ciKlass* get_klass(Klass* o) {
215     if (o == NULL) return NULL;
216     return get_metadata(o)->as_klass();
217   }
218   ciInstanceKlass* get_instance_klass(Klass* o) {
219     if (o == NULL) return NULL;
220     return get_metadata(o)->as_instance_klass();
221   }
222   ciMethod* get_method(Method* o) {
223     if (o == NULL) return NULL;
224     return get_metadata(o)->as_method();
225   }

482   bool dyno_loc(const InstanceKlass* ik, const char *&loc) const;
483   void set_dyno_loc(const InstanceKlass* ik);
484   void record_best_dyno_loc(const InstanceKlass* ik);
485   bool print_dyno_loc(outputStream* out, const InstanceKlass* ik) const;
486 
487   GrowableArray<const InstanceKlass*>* _dyno_klasses;
488   GrowableArray<const char *>*         _dyno_locs;
489 
490 #define MAX_DYNO_NAME_LENGTH 1024
491   char _dyno_name[MAX_DYNO_NAME_LENGTH+1];
492 
493 public:
494   // Dump the compilation replay data for the ciEnv to the stream.
495   void dump_replay_data(int compile_id);
496   void dump_inline_data(int compile_id);
497   void dump_replay_data(outputStream* out);
498   void dump_replay_data_unsafe(outputStream* out);
499   void dump_replay_data_helper(outputStream* out);
500   void dump_compile_data(outputStream* out);
501 




502   const char *dyno_name(const InstanceKlass* ik) const;
503   const char *replay_name(const InstanceKlass* ik) const;
504   const char *replay_name(ciKlass* i) const;
505 
506   void record_lambdaform(Thread* thread, oop obj);
507   void record_member(Thread* thread, oop obj);
508   void record_mh(Thread* thread, oop obj);
509   void record_call_site_obj(Thread* thread, oop obj);
510   void record_call_site_method(Thread* thread, Method* adapter);
511   void process_invokedynamic(const constantPoolHandle &cp, int index, JavaThread* thread);
512   void process_invokehandle(const constantPoolHandle &cp, int index, JavaThread* thread);
513   void find_dynamic_call_sites();
514 };
515 
516 #endif // SHARE_CI_CIENV_HPP

119   // The CI treats a klass as loaded if it is consistently defined in
120   // another loader, even if it hasn't yet been loaded in all loaders
121   // that could potentially see it via delegation.
122   ciKlass* get_klass_by_name(ciKlass* accessing_klass,
123                              ciSymbol* klass_name,
124                              bool require_local);
125 
126   // Constant pool access.
127   ciKlass*   get_klass_by_index(const constantPoolHandle& cpool,
128                                 int klass_index,
129                                 bool& is_accessible,
130                                 ciInstanceKlass* loading_klass);
131   ciConstant get_constant_by_index(const constantPoolHandle& cpool,
132                                    int pool_index, int cache_index,
133                                    ciInstanceKlass* accessor);
134   ciField*   get_field_by_index(ciInstanceKlass* loading_klass,
135                                 int field_index);
136   ciMethod*  get_method_by_index(const constantPoolHandle& cpool,
137                                  int method_index, Bytecodes::Code bc,
138                                  ciInstanceKlass* loading_klass);
139   bool       has_Q_signature(const constantPoolHandle& cpool,
140                              int klass_index);
141 
142   // Implementation methods for loading and constant pool access.
143   ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass,
144                                   const constantPoolHandle& cpool,
145                                   ciSymbol* klass_name,
146                                   bool require_local);
147   ciKlass*   get_klass_by_index_impl(const constantPoolHandle& cpool,
148                                      int klass_index,
149                                      bool& is_accessible,
150                                      ciInstanceKlass* loading_klass);
151   ciConstant get_constant_by_index_impl(const constantPoolHandle& cpool,
152                                         int pool_index, int cache_index,
153                                         ciInstanceKlass* loading_klass);
154   ciField*   get_field_by_index_impl(ciInstanceKlass* loading_klass,
155                                      int field_index);
156   ciMethod*  get_method_by_index_impl(const constantPoolHandle& cpool,
157                                       int method_index, Bytecodes::Code bc,
158                                       ciInstanceKlass* loading_klass);
159 
160   // Helper methods

188       return _factory->get_symbol(o);
189     }
190   }
191 
192   ciMetadata* get_metadata(Metadata* o) {
193     if (o == NULL) {
194       return NULL;
195     } else {
196       return _factory->get_metadata(o);
197     }
198   }
199 
200   ciMetadata* cached_metadata(Metadata* o) {
201     return _factory->cached_metadata(o);
202   }
203 
204   ciInstance* get_instance(oop o) {
205     if (o == NULL) return NULL;
206     return get_object(o)->as_instance();
207   }
208   ciFlatArrayKlass* get_flat_array_klass(Klass* o) {
209     if (o == NULL) return NULL;
210     return get_metadata(o)->as_flat_array_klass();
211   }
212   ciObjArrayKlass* get_obj_array_klass(Klass* o) {
213     if (o == NULL) return NULL;
214     return get_metadata(o)->as_obj_array_klass();
215   }
216   ciTypeArrayKlass* get_type_array_klass(Klass* o) {
217     if (o == NULL) return NULL;
218     return get_metadata(o)->as_type_array_klass();
219   }
220   ciKlass* get_klass(Klass* o) {
221     if (o == NULL) return NULL;
222     return get_metadata(o)->as_klass();
223   }
224   ciInstanceKlass* get_instance_klass(Klass* o) {
225     if (o == NULL) return NULL;
226     return get_metadata(o)->as_instance_klass();
227   }
228   ciMethod* get_method(Method* o) {
229     if (o == NULL) return NULL;
230     return get_metadata(o)->as_method();
231   }

488   bool dyno_loc(const InstanceKlass* ik, const char *&loc) const;
489   void set_dyno_loc(const InstanceKlass* ik);
490   void record_best_dyno_loc(const InstanceKlass* ik);
491   bool print_dyno_loc(outputStream* out, const InstanceKlass* ik) const;
492 
493   GrowableArray<const InstanceKlass*>* _dyno_klasses;
494   GrowableArray<const char *>*         _dyno_locs;
495 
496 #define MAX_DYNO_NAME_LENGTH 1024
497   char _dyno_name[MAX_DYNO_NAME_LENGTH+1];
498 
499 public:
500   // Dump the compilation replay data for the ciEnv to the stream.
501   void dump_replay_data(int compile_id);
502   void dump_inline_data(int compile_id);
503   void dump_replay_data(outputStream* out);
504   void dump_replay_data_unsafe(outputStream* out);
505   void dump_replay_data_helper(outputStream* out);
506   void dump_compile_data(outputStream* out);
507 
508   ciWrapper* make_null_free_wrapper(ciType* type) {
509     return _factory->make_null_free_wrapper(type);
510   }
511 
512   const char *dyno_name(const InstanceKlass* ik) const;
513   const char *replay_name(const InstanceKlass* ik) const;
514   const char *replay_name(ciKlass* i) const;
515 
516   void record_lambdaform(Thread* thread, oop obj);
517   void record_member(Thread* thread, oop obj);
518   void record_mh(Thread* thread, oop obj);
519   void record_call_site_obj(Thread* thread, oop obj);
520   void record_call_site_method(Thread* thread, Method* adapter);
521   void process_invokedynamic(const constantPoolHandle &cp, int index, JavaThread* thread);
522   void process_invokehandle(const constantPoolHandle &cp, int index, JavaThread* thread);
523   void find_dynamic_call_sites();
524 };
525 
526 #endif // SHARE_CI_CIENV_HPP
< prev index next >