< prev index next >

src/hotspot/share/ci/ciEnv.hpp

Print this page

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


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

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




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

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




494   const char *dyno_name(const InstanceKlass* ik) const;
495   const char *replay_name(const InstanceKlass* ik) const;
496   const char *replay_name(ciKlass* i) const;
497 
498   void record_lambdaform(Thread* thread, oop obj);
499   void record_member(Thread* thread, oop obj);
500   void record_mh(Thread* thread, oop obj);
501   void record_call_site_obj(Thread* thread, const constantPoolHandle& pool, const Handle appendix);
502   void record_call_site_method(Thread* thread, const constantPoolHandle& pool, Method* adapter);
503   void process_invokedynamic(const constantPoolHandle &cp, int index, JavaThread* thread);
504   void process_invokehandle(const constantPoolHandle &cp, int index, JavaThread* thread);
505   void find_dynamic_call_sites();
506 };
507 
508 #endif // SHARE_CI_CIENV_HPP

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

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

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