< 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

195       if (ReplayCompiles && o->is_klass()) {
196         Klass* k = (Klass*)o;
197         if (k->is_instance_klass() && ciReplay::is_klass_unresolved((InstanceKlass*)k)) {
198           // Klass was unresolved at replay dump time. Simulate this case.
199           return ciEnv::_unloaded_ciinstance_klass;
200         }
201       }
202 #endif
203       return _factory->get_metadata(o);
204     }
205   }
206 
207   ciMetadata* cached_metadata(Metadata* o) {
208     return _factory->cached_metadata(o);
209   }
210 
211   ciInstance* get_instance(oop o) {
212     if (o == NULL) return NULL;
213     return get_object(o)->as_instance();
214   }




215   ciObjArrayKlass* get_obj_array_klass(Klass* o) {
216     if (o == NULL) return NULL;
217     return get_metadata(o)->as_obj_array_klass();
218   }
219   ciTypeArrayKlass* get_type_array_klass(Klass* o) {
220     if (o == NULL) return NULL;
221     return get_metadata(o)->as_type_array_klass();
222   }
223   ciKlass* get_klass(Klass* o) {
224     if (o == NULL) return NULL;
225     return get_metadata(o)->as_klass();
226   }
227   ciInstanceKlass* get_instance_klass(Klass* o) {
228     if (o == NULL) return NULL;
229     return get_metadata(o)->as_instance_klass();
230   }
231   ciMethod* get_method(Method* o) {
232     if (o == NULL) return NULL;
233     return get_metadata(o)->as_method();
234   }

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




509   const char *dyno_name(const InstanceKlass* ik) const;
510   const char *replay_name(const InstanceKlass* ik) const;
511   const char *replay_name(ciKlass* i) const;
512 
513   void record_lambdaform(Thread* thread, oop obj);
514   void record_member(Thread* thread, oop obj);
515   void record_mh(Thread* thread, oop obj);
516   void record_call_site_obj(Thread* thread, oop obj);
517   void record_call_site_method(Thread* thread, Method* adapter);
518   void process_invokedynamic(const constantPoolHandle &cp, int index, JavaThread* thread);
519   void process_invokehandle(const constantPoolHandle &cp, int index, JavaThread* thread);
520   void find_dynamic_call_sites();
521 };
522 
523 #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

197       if (ReplayCompiles && o->is_klass()) {
198         Klass* k = (Klass*)o;
199         if (k->is_instance_klass() && ciReplay::is_klass_unresolved((InstanceKlass*)k)) {
200           // Klass was unresolved at replay dump time. Simulate this case.
201           return ciEnv::_unloaded_ciinstance_klass;
202         }
203       }
204 #endif
205       return _factory->get_metadata(o);
206     }
207   }
208 
209   ciMetadata* cached_metadata(Metadata* o) {
210     return _factory->cached_metadata(o);
211   }
212 
213   ciInstance* get_instance(oop o) {
214     if (o == NULL) return NULL;
215     return get_object(o)->as_instance();
216   }
217   ciFlatArrayKlass* get_flat_array_klass(Klass* o) {
218     if (o == NULL) return NULL;
219     return get_metadata(o)->as_flat_array_klass();
220   }
221   ciObjArrayKlass* get_obj_array_klass(Klass* o) {
222     if (o == NULL) return NULL;
223     return get_metadata(o)->as_obj_array_klass();
224   }
225   ciTypeArrayKlass* get_type_array_klass(Klass* o) {
226     if (o == NULL) return NULL;
227     return get_metadata(o)->as_type_array_klass();
228   }
229   ciKlass* get_klass(Klass* o) {
230     if (o == NULL) return NULL;
231     return get_metadata(o)->as_klass();
232   }
233   ciInstanceKlass* get_instance_klass(Klass* o) {
234     if (o == NULL) return NULL;
235     return get_metadata(o)->as_instance_klass();
236   }
237   ciMethod* get_method(Method* o) {
238     if (o == NULL) return NULL;
239     return get_metadata(o)->as_method();
240   }

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