hotspot/src/share/vm/asm/codeBuffer.hpp
changeset 10983 9ab65f4cec18
parent 8921 14bfe81f2a9d
child 13728 882756847a04
equal deleted inserted replaced
10982:85bcf8ef9cc8 10983:9ab65f4cec18
   360   void freeze_section(CodeSection* cs);
   360   void freeze_section(CodeSection* cs);
   361 
   361 
   362   // helper for CodeBuffer::expand()
   362   // helper for CodeBuffer::expand()
   363   void take_over_code_from(CodeBuffer* cs);
   363   void take_over_code_from(CodeBuffer* cs);
   364 
   364 
   365 #ifdef ASSERT
       
   366   // ensure sections are disjoint, ordered, and contained in the blob
   365   // ensure sections are disjoint, ordered, and contained in the blob
   367   bool verify_section_allocation();
   366   void verify_section_allocation();
   368 #endif
       
   369 
   367 
   370   // copies combined relocations to the blob, returns bytes copied
   368   // copies combined relocations to the blob, returns bytes copied
   371   // (if target is null, it is a dry run only, just for sizing)
   369   // (if target is null, it is a dry run only, just for sizing)
   372   csize_t copy_relocations_to(CodeBlob* blob) const;
   370   csize_t copy_relocations_to(CodeBlob* blob) const;
   373 
   371 
   391   // (1) code buffer referring to pre-allocated instruction memory
   389   // (1) code buffer referring to pre-allocated instruction memory
   392   CodeBuffer(address code_start, csize_t code_size) {
   390   CodeBuffer(address code_start, csize_t code_size) {
   393     assert(code_start != NULL, "sanity");
   391     assert(code_start != NULL, "sanity");
   394     initialize_misc("static buffer");
   392     initialize_misc("static buffer");
   395     initialize(code_start, code_size);
   393     initialize(code_start, code_size);
   396     assert(verify_section_allocation(), "initial use of buffer OK");
   394     verify_section_allocation();
   397   }
   395   }
   398 
   396 
   399   // (2) CodeBuffer referring to pre-allocated CodeBlob.
   397   // (2) CodeBuffer referring to pre-allocated CodeBlob.
   400   CodeBuffer(CodeBlob* blob);
   398   CodeBuffer(CodeBlob* blob);
   401 
   399 
   543   // Transform an address from the code in this code buffer to a specified code buffer
   541   // Transform an address from the code in this code buffer to a specified code buffer
   544   address transform_address(const CodeBuffer &cb, address addr) const;
   542   address transform_address(const CodeBuffer &cb, address addr) const;
   545 
   543 
   546   void block_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
   544   void block_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
   547 
   545 
       
   546   // Log a little info about section usage in the CodeBuffer
       
   547   void log_section_sizes(const char* name);
       
   548 
   548 #ifndef PRODUCT
   549 #ifndef PRODUCT
   549  public:
   550  public:
   550   // Printing / Decoding
   551   // Printing / Decoding
   551   // decodes from decode_begin() to code_end() and sets decode_begin to end
   552   // decodes from decode_begin() to code_end() and sets decode_begin to end
   552   void    decode();
   553   void    decode();