src/hotspot/share/code/nmethod.hpp
changeset 54960 e46fe26d7f77
parent 54669 ad45b3802d4e
child 55005 9b70ebd131b4
equal deleted inserted replaced
54959:00425a850a2f 54960:e46fe26d7f77
   375   }
   375   }
   376 
   376 
   377   void  make_unloaded();
   377   void  make_unloaded();
   378 
   378 
   379   bool has_dependencies()                         { return dependencies_size() != 0; }
   379   bool has_dependencies()                         { return dependencies_size() != 0; }
       
   380   void print_dependencies()                       PRODUCT_RETURN;
   380   void flush_dependencies(bool delete_immediately);
   381   void flush_dependencies(bool delete_immediately);
   381   bool has_flushed_dependencies()                 { return _has_flushed_dependencies; }
   382   bool has_flushed_dependencies()                 { return _has_flushed_dependencies; }
   382   void set_has_flushed_dependencies()             {
   383   void set_has_flushed_dependencies()             {
   383     assert(!has_flushed_dependencies(), "should only happen once");
   384     assert(!has_flushed_dependencies(), "should only happen once");
   384     _has_flushed_dependencies = 1;
   385     _has_flushed_dependencies = 1;
   503   // verify operations
   504   // verify operations
   504   void verify();
   505   void verify();
   505   void verify_scopes();
   506   void verify_scopes();
   506   void verify_interrupt_point(address interrupt_point);
   507   void verify_interrupt_point(address interrupt_point);
   507 
   508 
       
   509   // Disassemble this nmethod with additional debug information, e.g. information about blocks.
       
   510   void decode2(outputStream* st) const;
       
   511   void print_constant_pool(outputStream* st);
       
   512 
       
   513   // Avoid hiding of parent's 'decode(outputStream*)' method.
       
   514   void decode(outputStream* st) const { decode2(st); } // just delegate here.
       
   515 
   508   // printing support
   516   // printing support
   509   void print()                          const;
   517   void print()                          const;
       
   518   void print(outputStream* st)          const;
       
   519   void print_code();
       
   520 
       
   521 #if defined(SUPPORT_DATA_STRUCTS)
       
   522   // print output in opt build for disassembler library
   510   void print_relocations()                        PRODUCT_RETURN;
   523   void print_relocations()                        PRODUCT_RETURN;
   511   void print_pcs()                                PRODUCT_RETURN;
   524   void print_pcs() { print_pcs_on(tty); }
   512   void print_scopes()                             PRODUCT_RETURN;
   525   void print_pcs_on(outputStream* st);
   513   void print_dependencies()                       PRODUCT_RETURN;
   526   void print_scopes() { print_scopes_on(tty); }
   514   void print_value_on(outputStream* st) const     PRODUCT_RETURN;
   527   void print_scopes_on(outputStream* st)          PRODUCT_RETURN;
       
   528   void print_value_on(outputStream* st) const;
       
   529   void print_handler_table();
       
   530   void print_nul_chk_table();
       
   531   void print_recorded_oops();
       
   532   void print_recorded_metadata();
       
   533 
       
   534   void print_oops(outputStream* st);     // oops from the underlying CodeBlob.
       
   535   void print_metadata(outputStream* st); // metadata in metadata pool.
       
   536 #else
       
   537   // void print_pcs()                             PRODUCT_RETURN;
       
   538   void print_pcs()                                { return; }
       
   539 #endif
       
   540 
   515   void print_calls(outputStream* st)              PRODUCT_RETURN;
   541   void print_calls(outputStream* st)              PRODUCT_RETURN;
   516   void print_handler_table()                      PRODUCT_RETURN;
   542   static void print_statistics()                  PRODUCT_RETURN;
   517   void print_nul_chk_table()                      PRODUCT_RETURN;
       
   518   void print_recorded_oops()                      PRODUCT_RETURN;
       
   519   void print_recorded_metadata()                  PRODUCT_RETURN;
       
   520 
   543 
   521   void maybe_print_nmethod(DirectiveSet* directive);
   544   void maybe_print_nmethod(DirectiveSet* directive);
   522   void print_nmethod(bool print_code);
   545   void print_nmethod(bool print_code);
   523 
   546 
   524   // need to re-define this from CodeBlob else the overload hides it
   547   // need to re-define this from CodeBlob else the overload hides it
   530   void log_new_nmethod() const;
   553   void log_new_nmethod() const;
   531   void log_state_change() const;
   554   void log_state_change() const;
   532 
   555 
   533   // Prints block-level comments, including nmethod specific block labels:
   556   // Prints block-level comments, including nmethod specific block labels:
   534   virtual void print_block_comment(outputStream* stream, address block_begin) const {
   557   virtual void print_block_comment(outputStream* stream, address block_begin) const {
       
   558 #if defined(SUPPORT_ASSEMBLY) || defined(SUPPORT_ABSTRACT_ASSEMBLY)
   535     print_nmethod_labels(stream, block_begin);
   559     print_nmethod_labels(stream, block_begin);
   536     CodeBlob::print_block_comment(stream, block_begin);
   560     CodeBlob::print_block_comment(stream, block_begin);
   537   }
   561 #endif
   538   void print_nmethod_labels(outputStream* stream, address block_begin) const;
   562   }
   539 
   563   bool has_block_comment(address block_begin) {
       
   564     return CodeBlob::has_block_comment(block_begin);
       
   565   }
       
   566   void print_nmethod_labels(outputStream* stream, address block_begin, bool print_section_labels=true) const;
       
   567   const char* nmethod_section_label(address pos) const;
       
   568 
       
   569   // returns whether this nmethod has code comments.
       
   570   bool has_code_comment(address begin, address end);
   540   // Prints a comment for one native instruction (reloc info, pc desc)
   571   // Prints a comment for one native instruction (reloc info, pc desc)
   541   void print_code_comment_on(outputStream* st, int column, address begin, address end);
   572   void print_code_comment_on(outputStream* st, int column, address begin, address end);
   542   static void print_statistics() PRODUCT_RETURN;
       
   543 
   573 
   544   // Compiler task identification.  Note that all OSR methods
   574   // Compiler task identification.  Note that all OSR methods
   545   // are numbered in an independent sequence if CICountOSR is true,
   575   // are numbered in an independent sequence if CICountOSR is true,
   546   // and native method wrappers are also numbered independently if
   576   // and native method wrappers are also numbered independently if
   547   // CICountNative is true.
   577   // CICountNative is true.