hotspot/src/share/vm/ci/ciMethod.hpp

Print this page




  54   // Code attributes.
  55   int _code_size;
  56   int _max_stack;
  57   int _max_locals;
  58   vmIntrinsics::ID _intrinsic_id;
  59   int _handler_count;
  60   int _interpreter_invocation_count;
  61   int _interpreter_throwout_count;
  62 
  63   bool _uses_monitors;
  64   bool _balanced_monitors;
  65   bool _is_compilable;
  66   bool _can_be_statically_bound;
  67 
  68   // Lazy fields, filled in on demand
  69   address              _code;
  70   ciExceptionHandler** _exception_handlers;
  71 
  72   // Optional liveness analyzer.
  73   MethodLiveness* _liveness;
  74 #ifdef COMPILER2
  75   ciTypeFlow*     _flow;
  76 #endif
  77 
  78   ciMethod(methodHandle h_m);
  79   ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature);
  80 
  81   methodOop get_methodOop() const {
  82     methodOop m = (methodOop)get_oop();
  83     assert(m != NULL, "illegal use of unloaded method");
  84     return m;
  85   }
  86 
  87   oop loader() const                             { return _holder->loader(); }
  88 
  89   const char* type_string()                      { return "ciMethod"; }
  90 
  91   void print_impl(outputStream* st);
  92 
  93   void load_code();
  94 


 124   vmIntrinsics::ID intrinsic_id() const          { check_is_loaded(); return _intrinsic_id; }
 125   bool has_exception_handlers() const            { check_is_loaded(); return _handler_count > 0; }
 126   int exception_table_length() const             { check_is_loaded(); return _handler_count; }
 127   int interpreter_invocation_count() const       { check_is_loaded(); return _interpreter_invocation_count; }
 128   int interpreter_throwout_count() const         { check_is_loaded(); return _interpreter_throwout_count; }
 129 
 130   Bytecodes::Code java_code_at_bci(int bci) {
 131     address bcp = code() + bci;
 132     return Bytecodes::java_code_at(bcp);
 133   }
 134   BCEscapeAnalyzer  *get_bcea();
 135   ciMethodBlocks    *get_method_blocks();
 136 
 137   bool    has_linenumber_table() const;          // length unknown until decompression
 138   u_char* compressed_linenumber_table() const;   // not preserved by gc
 139 
 140   int line_number_from_bci(int bci) const;
 141 
 142   // Runtime information.
 143   int           vtable_index();



 144   address       native_entry();
 145   address       interpreter_entry();
 146 
 147   // Analysis and profiling.
 148   //
 149   // Usage note: liveness_at_bci and init_vars should be wrapped in ResourceMarks.
 150   bool          uses_monitors() const            { return _uses_monitors; } // this one should go away, it has a misleading name
 151   bool          has_monitor_bytecodes() const    { return _uses_monitors; }
 152   bool          has_balanced_monitors();
 153 
 154   // Returns a bitmap indicating which locals are required to be
 155   // maintained as live for deopt.  raw_liveness_at_bci is always the
 156   // direct output of the liveness computation while liveness_at_bci
 157   // may mark all locals as live to improve support for debugging Java
 158   // code by maintaining the state of as many locals as possible.
 159   MethodLivenessResult raw_liveness_at_bci(int bci);
 160   MethodLivenessResult liveness_at_bci(int bci);
 161 
 162   // Get the interpreters viewpoint on oop liveness.  MethodLiveness is
 163   // conservative in the sense that it may consider locals to be live which




  54   // Code attributes.
  55   int _code_size;
  56   int _max_stack;
  57   int _max_locals;
  58   vmIntrinsics::ID _intrinsic_id;
  59   int _handler_count;
  60   int _interpreter_invocation_count;
  61   int _interpreter_throwout_count;
  62 
  63   bool _uses_monitors;
  64   bool _balanced_monitors;
  65   bool _is_compilable;
  66   bool _can_be_statically_bound;
  67 
  68   // Lazy fields, filled in on demand
  69   address              _code;
  70   ciExceptionHandler** _exception_handlers;
  71 
  72   // Optional liveness analyzer.
  73   MethodLiveness* _liveness;
  74 #if defined(COMPILER2) || defined(SHARK)
  75   ciTypeFlow*     _flow;
  76 #endif
  77 
  78   ciMethod(methodHandle h_m);
  79   ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature);
  80 
  81   methodOop get_methodOop() const {
  82     methodOop m = (methodOop)get_oop();
  83     assert(m != NULL, "illegal use of unloaded method");
  84     return m;
  85   }
  86 
  87   oop loader() const                             { return _holder->loader(); }
  88 
  89   const char* type_string()                      { return "ciMethod"; }
  90 
  91   void print_impl(outputStream* st);
  92 
  93   void load_code();
  94 


 124   vmIntrinsics::ID intrinsic_id() const          { check_is_loaded(); return _intrinsic_id; }
 125   bool has_exception_handlers() const            { check_is_loaded(); return _handler_count > 0; }
 126   int exception_table_length() const             { check_is_loaded(); return _handler_count; }
 127   int interpreter_invocation_count() const       { check_is_loaded(); return _interpreter_invocation_count; }
 128   int interpreter_throwout_count() const         { check_is_loaded(); return _interpreter_throwout_count; }
 129 
 130   Bytecodes::Code java_code_at_bci(int bci) {
 131     address bcp = code() + bci;
 132     return Bytecodes::java_code_at(bcp);
 133   }
 134   BCEscapeAnalyzer  *get_bcea();
 135   ciMethodBlocks    *get_method_blocks();
 136 
 137   bool    has_linenumber_table() const;          // length unknown until decompression
 138   u_char* compressed_linenumber_table() const;   // not preserved by gc
 139 
 140   int line_number_from_bci(int bci) const;
 141 
 142   // Runtime information.
 143   int           vtable_index();
 144 #ifdef SHARK
 145   int           itable_index();
 146 #endif // SHARK
 147   address       native_entry();
 148   address       interpreter_entry();
 149 
 150   // Analysis and profiling.
 151   //
 152   // Usage note: liveness_at_bci and init_vars should be wrapped in ResourceMarks.
 153   bool          uses_monitors() const            { return _uses_monitors; } // this one should go away, it has a misleading name
 154   bool          has_monitor_bytecodes() const    { return _uses_monitors; }
 155   bool          has_balanced_monitors();
 156 
 157   // Returns a bitmap indicating which locals are required to be
 158   // maintained as live for deopt.  raw_liveness_at_bci is always the
 159   // direct output of the liveness computation while liveness_at_bci
 160   // may mark all locals as live to improve support for debugging Java
 161   // code by maintaining the state of as many locals as possible.
 162   MethodLivenessResult raw_liveness_at_bci(int bci);
 163   MethodLivenessResult liveness_at_bci(int bci);
 164 
 165   // Get the interpreters viewpoint on oop liveness.  MethodLiveness is
 166   // conservative in the sense that it may consider locals to be live which