src/share/vm/oops/method.hpp

Print this page




 606 
 607   // returns true if the method is static OR if the classfile version < 51
 608   bool has_valid_initializer_flags() const;
 609 
 610   // returns true if the method name is <clinit> and the method has
 611   // valid static initializer flags.
 612   bool is_static_initializer() const;
 613 
 614   // compiled code support
 615   // NOTE: code() is inherently racy as deopt can be clearing code
 616   // simultaneously. Use with caution.
 617   bool has_compiled_code() const                 { return code() != NULL; }
 618 
 619   // sizing
 620   static int header_size()                       { return sizeof(Method)/HeapWordSize; }
 621   static int size(bool is_native);
 622   int size() const                               { return method_size(); }
 623 #if INCLUDE_SERVICES
 624   void collect_statistics(KlassSizeStats *sz) const;
 625 #endif


 626 
 627   // interpreter support
 628   static ByteSize const_offset()                 { return byte_offset_of(Method, _constMethod       ); }
 629   static ByteSize access_flags_offset()          { return byte_offset_of(Method, _access_flags      ); }
 630 #ifdef CC_INTERP
 631   static ByteSize result_index_offset()          { return byte_offset_of(Method, _result_index ); }
 632 #endif /* CC_INTERP */
 633   static ByteSize from_compiled_offset()         { return byte_offset_of(Method, _from_compiled_entry); }
 634   static ByteSize code_offset()                  { return byte_offset_of(Method, _code); }
 635   static ByteSize method_data_offset()           {
 636     return byte_offset_of(Method, _method_data);
 637   }
 638   static ByteSize method_counters_offset()       {
 639     return byte_offset_of(Method, _method_counters);
 640   }
 641 #ifndef PRODUCT
 642   static ByteSize compiled_invocation_counter_offset() { return byte_offset_of(Method, _compiled_invocation_count); }
 643 #endif // not PRODUCT
 644   static ByteSize native_function_offset()       { return in_ByteSize(sizeof(Method));                 }
 645   static ByteSize from_interpreted_offset()      { return byte_offset_of(Method, _from_interpreted_entry ); }




 606 
 607   // returns true if the method is static OR if the classfile version < 51
 608   bool has_valid_initializer_flags() const;
 609 
 610   // returns true if the method name is <clinit> and the method has
 611   // valid static initializer flags.
 612   bool is_static_initializer() const;
 613 
 614   // compiled code support
 615   // NOTE: code() is inherently racy as deopt can be clearing code
 616   // simultaneously. Use with caution.
 617   bool has_compiled_code() const                 { return code() != NULL; }
 618 
 619   // sizing
 620   static int header_size()                       { return sizeof(Method)/HeapWordSize; }
 621   static int size(bool is_native);
 622   int size() const                               { return method_size(); }
 623 #if INCLUDE_SERVICES
 624   void collect_statistics(KlassSizeStats *sz) const;
 625 #endif
 626   void trace_usage(TRAPS) const;
 627   static void print_usage(outputStream* out);
 628 
 629   // interpreter support
 630   static ByteSize const_offset()                 { return byte_offset_of(Method, _constMethod       ); }
 631   static ByteSize access_flags_offset()          { return byte_offset_of(Method, _access_flags      ); }
 632 #ifdef CC_INTERP
 633   static ByteSize result_index_offset()          { return byte_offset_of(Method, _result_index ); }
 634 #endif /* CC_INTERP */
 635   static ByteSize from_compiled_offset()         { return byte_offset_of(Method, _from_compiled_entry); }
 636   static ByteSize code_offset()                  { return byte_offset_of(Method, _code); }
 637   static ByteSize method_data_offset()           {
 638     return byte_offset_of(Method, _method_data);
 639   }
 640   static ByteSize method_counters_offset()       {
 641     return byte_offset_of(Method, _method_counters);
 642   }
 643 #ifndef PRODUCT
 644   static ByteSize compiled_invocation_counter_offset() { return byte_offset_of(Method, _compiled_invocation_count); }
 645 #endif // not PRODUCT
 646   static ByteSize native_function_offset()       { return in_ByteSize(sizeof(Method));                 }
 647   static ByteSize from_interpreted_offset()      { return byte_offset_of(Method, _from_interpreted_entry ); }