< prev index next >

src/hotspot/share/asm/codeBuffer.hpp

Print this page




  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/align.hpp"
  31 #include "utilities/debug.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 class CodeStrings;
  35 class PhaseCFG;
  36 class Compile;
  37 class BufferBlob;
  38 class CodeBuffer;
  39 class Label;
  40 
  41 class CodeOffsets: public StackObj {
  42 public:
  43   enum Entries { Entry,
  44                  Verified_Entry,

  45                  Frame_Complete, // Offset in the code where the frame setup is (for forte stackwalks) is complete
  46                  OSR_Entry,
  47                  Exceptions,     // Offset where exception handler lives
  48                  Deopt,          // Offset where deopt handler lives
  49                  DeoptMH,        // Offset where MethodHandle deopt handler lives
  50                  UnwindHandler,  // Offset to default unwind handler
  51                  max_Entries };
  52 
  53   // special value to note codeBlobs where profile (forte) stack walking is
  54   // always dangerous and suspect.
  55 
  56   enum { frame_never_safe = -1 };
  57 
  58 private:
  59   int _values[max_Entries];
  60 
  61 public:
  62   CodeOffsets() {
  63     _values[Entry         ] = 0;
  64     _values[Verified_Entry] = 0;

  65     _values[Frame_Complete] = frame_never_safe;
  66     _values[OSR_Entry     ] = 0;
  67     _values[Exceptions    ] = -1;
  68     _values[Deopt         ] = -1;
  69     _values[DeoptMH       ] = -1;
  70     _values[UnwindHandler ] = -1;
  71   }
  72 
  73   int value(Entries e) { return _values[e]; }
  74   void set_value(Entries e, int val) { _values[e] = val; }
  75 };
  76 
  77 // This class represents a stream of code and associated relocations.
  78 // There are a few in each CodeBuffer.
  79 // They are filled concurrently, and concatenated at the end.
  80 class CodeSection {
  81   friend class CodeBuffer;
  82  public:
  83   typedef int csize_t;  // code size type; would be size_t except for history
  84 




  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/align.hpp"
  31 #include "utilities/debug.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 class CodeStrings;
  35 class PhaseCFG;
  36 class Compile;
  37 class BufferBlob;
  38 class CodeBuffer;
  39 class Label;
  40 
  41 class CodeOffsets: public StackObj {
  42 public:
  43   enum Entries { Entry,
  44                  Verified_Entry,
  45                  Verified_Value_Entry,
  46                  Frame_Complete, // Offset in the code where the frame setup is (for forte stackwalks) is complete
  47                  OSR_Entry,
  48                  Exceptions,     // Offset where exception handler lives
  49                  Deopt,          // Offset where deopt handler lives
  50                  DeoptMH,        // Offset where MethodHandle deopt handler lives
  51                  UnwindHandler,  // Offset to default unwind handler
  52                  max_Entries };
  53 
  54   // special value to note codeBlobs where profile (forte) stack walking is
  55   // always dangerous and suspect.
  56 
  57   enum { frame_never_safe = -1 };
  58 
  59 private:
  60   int _values[max_Entries];
  61 
  62 public:
  63   CodeOffsets() {
  64     _values[Entry         ] = 0;
  65     _values[Verified_Entry] = 0;
  66     _values[Verified_Value_Entry] = -1;
  67     _values[Frame_Complete] = frame_never_safe;
  68     _values[OSR_Entry     ] = 0;
  69     _values[Exceptions    ] = -1;
  70     _values[Deopt         ] = -1;
  71     _values[DeoptMH       ] = -1;
  72     _values[UnwindHandler ] = -1;
  73   }
  74 
  75   int value(Entries e) { return _values[e]; }
  76   void set_value(Entries e, int val) { _values[e] = val; }
  77 };
  78 
  79 // This class represents a stream of code and associated relocations.
  80 // There are a few in each CodeBuffer.
  81 // They are filled concurrently, and concatenated at the end.
  82 class CodeSection {
  83   friend class CodeBuffer;
  84  public:
  85   typedef int csize_t;  // code size type; would be size_t except for history
  86 


< prev index next >