< prev index next >

src/hotspot/share/runtime/registerMap.hpp

Print this page
@@ -24,10 +24,12 @@
  
  #ifndef SHARE_RUNTIME_REGISTERMAP_HPP
  #define SHARE_RUNTIME_REGISTERMAP_HPP
  
  #include "code/vmreg.hpp"
+ #include "oops/stackChunkOop.hpp"
+ #include "runtime/handles.hpp"
  #include "utilities/globalDefinitions.hpp"
  #include "utilities/macros.hpp"
  
  class JavaThread;
  

@@ -71,26 +73,32 @@
   private:
    intptr_t*    _location[reg_count];    // Location of registers (intptr_t* looks better than address in the debugger)
    LocationValidType _location_valid[location_valid_size];
    bool        _include_argument_oops;   // Should include argument_oop marked locations for compiler
    JavaThread* _thread;                  // Reference to current thread
+   stackChunkHandle _chunk;              // The current continuation stack chunk, if any
+ 
    bool        _update_map;              // Tells if the register map need to be
                                          // updated when traversing the stack
    bool        _process_frames;          // Should frames be processed by stack watermark barriers?
+   bool        _walk_cont;               // whether to walk frames on a continuation stack
+ 
+   NOT_PRODUCT(bool  _skip_missing;)
  
  #ifdef ASSERT
    void check_location_valid();
  #else
    void check_location_valid() {}
  #endif
  
   public:
-   debug_only(intptr_t* _update_for_id;) // Assert that RegisterMap is not updated twice for same frame
-   RegisterMap(JavaThread *thread, bool update_map = true, bool process_frames = true);
+   DEBUG_ONLY(intptr_t* _update_for_id;) // Assert that RegisterMap is not updated twice for same frame
+   RegisterMap(JavaThread *thread, bool update_map = true, bool process_frames = true, bool walk_cont = false);
+   RegisterMap(oop continuation, bool update_map = true);
    RegisterMap(const RegisterMap* map);
  
-   address location(VMReg reg) const {
+   address location(VMReg reg, intptr_t* sp) const {
      int index = reg->value() / location_valid_type_size;
      assert(0 <= reg->value() && reg->value() < reg_count, "range check");
      assert(0 <= index && index < location_valid_size, "range check");
      if (_location_valid[index] & ((LocationValidType)1 << (reg->value() % location_valid_type_size))) {
        return (address) _location[reg->value()];

@@ -101,11 +109,21 @@
  
    address location(VMReg base_reg, int slot_idx) const {
      if (slot_idx > 0) {
        return pd_location(base_reg, slot_idx);
      } else {
-       return location(base_reg);
+       return location(base_reg, (intptr_t*)NULL);
+     }
+   }
+ 
+   address trusted_location(VMReg reg) const {
+     return (address) _location[reg->value()];
+   }
+     
+   void verify(RegisterMap& other) {
+     for (int i = 0; i < reg_count; ++i) {
+       assert(_location[i] == other._location[i], "");
      }
    }
  
    void set_location(VMReg reg, address loc) {
      int index = reg->value() / location_valid_type_size;

@@ -124,14 +142,30 @@
    void set_include_argument_oops(bool f)  { _include_argument_oops = f; }
  
    JavaThread *thread()  const { return _thread; }
    bool update_map()     const { return _update_map; }
    bool process_frames() const { return _process_frames; }
+   bool walk_cont()      const { return _walk_cont; }
+ 
+   bool in_cont()        const { return _chunk() != NULL; } // Whether we are currently on the hstack; if true, frames are relativized
+   oop cont() const;
+   stackChunkHandle stack_chunk() const { return _chunk; }
+   void set_stack_chunk(stackChunkOop chunk);
+ 
+   const RegisterMap* as_RegisterMap() const { return this; }
+   RegisterMap* as_RegisterMap() { return this; }
  
    void print_on(outputStream* st) const;
    void print() const;
  
+ #ifndef PRODUCT
+   void set_skip_missing(bool value) { _skip_missing = value; }
+   bool should_skip_missing() const  { return _skip_missing; }
+ 
+   VMReg find_register_spilled_here(void* p, intptr_t* sp);
+ #endif
+ 
    // the following contains the definition of pd_xxx methods
  #include CPU_HEADER(registerMap)
  
  };
  
< prev index next >