< prev index next >

src/share/vm/asm/codeBuffer.hpp

Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_ASM_CODEBUFFER_HPP
  26 #define SHARE_VM_ASM_CODEBUFFER_HPP
  27 
  28 #include "code/oopRecorder.hpp"
  29 #include "code/relocInfo.hpp"
  30 #include "utilities/debug.hpp"

  31 
  32 class CodeStrings;
  33 class PhaseCFG;
  34 class Compile;
  35 class BufferBlob;
  36 class CodeBuffer;
  37 class Label;
  38 
  39 class CodeOffsets: public StackObj {
  40 public:
  41   enum Entries { Entry,
  42                  Verified_Entry,
  43                  Frame_Complete, // Offset in the code where the frame setup is (for forte stackwalks) is complete
  44                  OSR_Entry,
  45                  Exceptions,     // Offset where exception handler lives
  46                  Deopt,          // Offset where deopt handler lives
  47                  DeoptMH,        // Offset where MethodHandle deopt handler lives
  48                  UnwindHandler,  // Offset to default unwind handler
  49                  max_Entries };
  50 


 616   address transform_address(const CodeBuffer &cb, address addr) const;
 617 
 618   void block_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
 619   const char* code_string(const char* str) PRODUCT_RETURN_(return NULL;);
 620 
 621   // Log a little info about section usage in the CodeBuffer
 622   void log_section_sizes(const char* name);
 623 
 624 #ifndef PRODUCT
 625  public:
 626   // Printing / Decoding
 627   // decodes from decode_begin() to code_end() and sets decode_begin to end
 628   void    decode();
 629   void    decode_all();         // decodes all the code
 630   void    skip_decode();        // sets decode_begin to code_end();
 631   void    print();
 632 #endif
 633 
 634 
 635   // The following header contains architecture-specific implementations
 636 #ifdef TARGET_ARCH_x86
 637 # include "codeBuffer_x86.hpp"
 638 #endif
 639 #ifdef TARGET_ARCH_sparc
 640 # include "codeBuffer_sparc.hpp"
 641 #endif
 642 #ifdef TARGET_ARCH_zero
 643 # include "codeBuffer_zero.hpp"
 644 #endif
 645 #ifdef TARGET_ARCH_arm
 646 # include "codeBuffer_arm.hpp"
 647 #endif
 648 #ifdef TARGET_ARCH_ppc
 649 # include "codeBuffer_ppc.hpp"
 650 #endif
 651 #ifdef TARGET_ARCH_aarch64
 652 # include "codeBuffer_aarch64.hpp"
 653 #endif
 654 
 655 };
 656 
 657 
 658 inline void CodeSection::freeze() {
 659   _outer->freeze_section(this);
 660 }
 661 
 662 inline bool CodeSection::maybe_expand_to_ensure_remaining(csize_t amount) {
 663   if (remaining() < amount) { _outer->expand(this, amount); return true; }
 664   return false;
 665 }
 666 
 667 #endif // SHARE_VM_ASM_CODEBUFFER_HPP


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_ASM_CODEBUFFER_HPP
  26 #define SHARE_VM_ASM_CODEBUFFER_HPP
  27 
  28 #include "code/oopRecorder.hpp"
  29 #include "code/relocInfo.hpp"
  30 #include "utilities/debug.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class CodeStrings;
  34 class PhaseCFG;
  35 class Compile;
  36 class BufferBlob;
  37 class CodeBuffer;
  38 class Label;
  39 
  40 class CodeOffsets: public StackObj {
  41 public:
  42   enum Entries { Entry,
  43                  Verified_Entry,
  44                  Frame_Complete, // Offset in the code where the frame setup is (for forte stackwalks) is complete
  45                  OSR_Entry,
  46                  Exceptions,     // Offset where exception handler lives
  47                  Deopt,          // Offset where deopt handler lives
  48                  DeoptMH,        // Offset where MethodHandle deopt handler lives
  49                  UnwindHandler,  // Offset to default unwind handler
  50                  max_Entries };
  51 


 617   address transform_address(const CodeBuffer &cb, address addr) const;
 618 
 619   void block_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
 620   const char* code_string(const char* str) PRODUCT_RETURN_(return NULL;);
 621 
 622   // Log a little info about section usage in the CodeBuffer
 623   void log_section_sizes(const char* name);
 624 
 625 #ifndef PRODUCT
 626  public:
 627   // Printing / Decoding
 628   // decodes from decode_begin() to code_end() and sets decode_begin to end
 629   void    decode();
 630   void    decode_all();         // decodes all the code
 631   void    skip_decode();        // sets decode_begin to code_end();
 632   void    print();
 633 #endif
 634 
 635 
 636   // The following header contains architecture-specific implementations
 637 #include CPU_HEADER(codeBuffer)

















 638 
 639 };
 640 
 641 
 642 inline void CodeSection::freeze() {
 643   _outer->freeze_section(this);
 644 }
 645 
 646 inline bool CodeSection::maybe_expand_to_ensure_remaining(csize_t amount) {
 647   if (remaining() < amount) { _outer->expand(this, amount); return true; }
 648   return false;
 649 }
 650 
 651 #endif // SHARE_VM_ASM_CODEBUFFER_HPP
< prev index next >