src/share/vm/oops/method.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/oops

src/share/vm/oops/method.hpp

Print this page
rev 6132 : 8037970: make PrintMethodData a diagnostic options
Summary: make PrintMethodData a diagnostic options for performance investigation
Reviewed-by:


 412   bool was_never_executed()                      { return !was_executed_more_than(0); }
 413 
 414   static void build_interpreter_method_data(methodHandle method, TRAPS);
 415 
 416   static MethodCounters* build_method_counters(Method* m, TRAPS);
 417 
 418   int interpreter_invocation_count() {
 419     if (TieredCompilation) return invocation_count();
 420     else return (method_counters() == NULL) ? 0 :
 421                  method_counters()->interpreter_invocation_count();
 422   }
 423   int increment_interpreter_invocation_count(TRAPS) {
 424     if (TieredCompilation) ShouldNotReachHere();
 425     MethodCounters* mcs = get_method_counters(CHECK_0);
 426     return (mcs == NULL) ? 0 : mcs->increment_interpreter_invocation_count();
 427   }
 428 
 429 #ifndef PRODUCT
 430   int  compiled_invocation_count() const         { return _compiled_invocation_count;  }
 431   void set_compiled_invocation_count(int count)  { _compiled_invocation_count = count; }



 432 #endif // not PRODUCT
 433 
 434   // Clear (non-shared space) pointers which could not be relevant
 435   // if this (shared) method were mapped into another JVM.
 436   void remove_unshareable_info();
 437 
 438   // nmethod/verified compiler entry
 439   address verified_code_entry();
 440   bool check_code() const;      // Not inline to avoid circular ref
 441   nmethod* volatile code() const                 { assert( check_code(), "" ); return (nmethod *)OrderAccess::load_ptr_acquire(&_code); }
 442   void clear_code();            // Clear out any compiled code
 443   static void set_code(methodHandle mh, nmethod* code);
 444   void set_adapter_entry(AdapterHandlerEntry* adapter) {  _adapter = adapter; }
 445   address get_i2c_entry();
 446   address get_c2i_entry();
 447   address get_c2i_unverified_entry();
 448   AdapterHandlerEntry* adapter() {  return _adapter; }
 449   // setup entry points
 450   void link_method(methodHandle method, TRAPS);
 451   // clear entry points. Used by sharing code


 480   // native function (used for native methods only)
 481   enum {
 482     native_bind_event_is_interesting = true
 483   };
 484   address native_function() const                { return *(native_function_addr()); }
 485   address critical_native_function();
 486 
 487   // Must specify a real function (not NULL).
 488   // Use clear_native_function() to unregister.
 489   void set_native_function(address function, bool post_event_flag);
 490   bool has_native_function() const;
 491   void clear_native_function();
 492 
 493   // signature handler (used for native methods only)
 494   address signature_handler() const              { return *(signature_handler_addr()); }
 495   void set_signature_handler(address handler);
 496 
 497   // Interpreter oopmap support
 498   void mask_for(int bci, InterpreterOopMap* mask);
 499 
 500 #ifndef PRODUCT
 501   // operations on invocation counter
 502   void print_invocation_count();
 503 #endif
 504 
 505   // byte codes
 506   void    set_code(address code)      { return constMethod()->set_code(code); }
 507   address code_base() const           { return constMethod()->code_base(); }
 508   bool    contains(address bcp) const { return constMethod()->contains(bcp); }
 509 
 510   // prints byte codes
 511   void print_codes() const            { print_codes_on(tty); }
 512   void print_codes_on(outputStream* st) const                      PRODUCT_RETURN;
 513   void print_codes_on(int from, int to, outputStream* st) const    PRODUCT_RETURN;
 514 
 515   // method parameters
 516   bool has_method_parameters() const
 517                          { return constMethod()->has_method_parameters(); }
 518   int method_parameters_length() const
 519                          { return constMethod()->method_parameters_length(); }
 520   MethodParametersElement* method_parameters_start() const
 521                           { return constMethod()->method_parameters_start(); }
 522 
 523   // checked exceptions
 524   int checked_exceptions_length() const
 525                          { return constMethod()->checked_exceptions_length(); }
 526   CheckedExceptionElement* checked_exceptions_start() const
 527                           { return constMethod()->checked_exceptions_start(); }
 528 
 529   // localvariable table
 530   bool has_localvariable_table() const
 531                           { return constMethod()->has_localvariable_table(); }
 532   int localvariable_table_length() const
 533                         { return constMethod()->localvariable_table_length(); }




 412   bool was_never_executed()                      { return !was_executed_more_than(0); }
 413 
 414   static void build_interpreter_method_data(methodHandle method, TRAPS);
 415 
 416   static MethodCounters* build_method_counters(Method* m, TRAPS);
 417 
 418   int interpreter_invocation_count() {
 419     if (TieredCompilation) return invocation_count();
 420     else return (method_counters() == NULL) ? 0 :
 421                  method_counters()->interpreter_invocation_count();
 422   }
 423   int increment_interpreter_invocation_count(TRAPS) {
 424     if (TieredCompilation) ShouldNotReachHere();
 425     MethodCounters* mcs = get_method_counters(CHECK_0);
 426     return (mcs == NULL) ? 0 : mcs->increment_interpreter_invocation_count();
 427   }
 428 
 429 #ifndef PRODUCT
 430   int  compiled_invocation_count() const         { return _compiled_invocation_count;  }
 431   void set_compiled_invocation_count(int count)  { _compiled_invocation_count = count; }
 432 #else
 433   // for PrintMethodData in a product build
 434   int  compiled_invocation_count() const         { return 0;  }
 435 #endif // not PRODUCT
 436 
 437   // Clear (non-shared space) pointers which could not be relevant
 438   // if this (shared) method were mapped into another JVM.
 439   void remove_unshareable_info();
 440 
 441   // nmethod/verified compiler entry
 442   address verified_code_entry();
 443   bool check_code() const;      // Not inline to avoid circular ref
 444   nmethod* volatile code() const                 { assert( check_code(), "" ); return (nmethod *)OrderAccess::load_ptr_acquire(&_code); }
 445   void clear_code();            // Clear out any compiled code
 446   static void set_code(methodHandle mh, nmethod* code);
 447   void set_adapter_entry(AdapterHandlerEntry* adapter) {  _adapter = adapter; }
 448   address get_i2c_entry();
 449   address get_c2i_entry();
 450   address get_c2i_unverified_entry();
 451   AdapterHandlerEntry* adapter() {  return _adapter; }
 452   // setup entry points
 453   void link_method(methodHandle method, TRAPS);
 454   // clear entry points. Used by sharing code


 483   // native function (used for native methods only)
 484   enum {
 485     native_bind_event_is_interesting = true
 486   };
 487   address native_function() const                { return *(native_function_addr()); }
 488   address critical_native_function();
 489 
 490   // Must specify a real function (not NULL).
 491   // Use clear_native_function() to unregister.
 492   void set_native_function(address function, bool post_event_flag);
 493   bool has_native_function() const;
 494   void clear_native_function();
 495 
 496   // signature handler (used for native methods only)
 497   address signature_handler() const              { return *(signature_handler_addr()); }
 498   void set_signature_handler(address handler);
 499 
 500   // Interpreter oopmap support
 501   void mask_for(int bci, InterpreterOopMap* mask);
 502 

 503   // operations on invocation counter
 504   void print_invocation_count();

 505 
 506   // byte codes
 507   void    set_code(address code)      { return constMethod()->set_code(code); }
 508   address code_base() const           { return constMethod()->code_base(); }
 509   bool    contains(address bcp) const { return constMethod()->contains(bcp); }
 510 
 511   // prints byte codes
 512   void print_codes() const            { print_codes_on(tty); }
 513   void print_codes_on(outputStream* st) const;
 514   void print_codes_on(int from, int to, outputStream* st) const;
 515 
 516   // method parameters
 517   bool has_method_parameters() const
 518                          { return constMethod()->has_method_parameters(); }
 519   int method_parameters_length() const
 520                          { return constMethod()->method_parameters_length(); }
 521   MethodParametersElement* method_parameters_start() const
 522                           { return constMethod()->method_parameters_start(); }
 523 
 524   // checked exceptions
 525   int checked_exceptions_length() const
 526                          { return constMethod()->checked_exceptions_length(); }
 527   CheckedExceptionElement* checked_exceptions_start() const
 528                           { return constMethod()->checked_exceptions_start(); }
 529 
 530   // localvariable table
 531   bool has_localvariable_table() const
 532                           { return constMethod()->has_localvariable_table(); }
 533   int localvariable_table_length() const
 534                         { return constMethod()->localvariable_table_length(); }


src/share/vm/oops/method.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File