src/hotspot/share/code/icBuffer.hpp
changeset 52857 7e268f863ff0
parent 47216 71c04702a3d5
child 52896 98408c7c0b73
equal deleted inserted replaced
52856:5f3b9b633731 52857:7e268f863ff0
    28 #include "asm/codeBuffer.hpp"
    28 #include "asm/codeBuffer.hpp"
    29 #include "code/stubs.hpp"
    29 #include "code/stubs.hpp"
    30 #include "interpreter/bytecodes.hpp"
    30 #include "interpreter/bytecodes.hpp"
    31 #include "memory/allocation.hpp"
    31 #include "memory/allocation.hpp"
    32 #include "utilities/align.hpp"
    32 #include "utilities/align.hpp"
       
    33 #include "utilities/macros.hpp"
    33 
    34 
    34 //
    35 //
    35 // For CompiledIC's:
    36 // For CompiledIC's:
    36 //
    37 //
    37 // In cases where we do not have MT-safe state transformation,
    38 // In cases where we do not have MT-safe state transformation,
    98   friend class ICStub;
    99   friend class ICStub;
    99 
   100 
   100   static int ic_stub_code_size();
   101   static int ic_stub_code_size();
   101 
   102 
   102   static StubQueue* _buffer;
   103   static StubQueue* _buffer;
   103   static ICStub*    _next_stub;
       
   104 
   104 
   105   static CompiledICHolder* _pending_released;
   105   static CompiledICHolder* _pending_released;
   106   static int _pending_count;
   106   static int _pending_count;
   107 
   107 
       
   108   DEBUG_ONLY(static volatile int _needs_refill;)
       
   109 
   108   static StubQueue* buffer()                         { return _buffer;         }
   110   static StubQueue* buffer()                         { return _buffer;         }
   109   static void       set_next_stub(ICStub* next_stub) { _next_stub = next_stub; }
       
   110   static ICStub*    get_next_stub()                  { return _next_stub;      }
       
   111 
       
   112   static void       init_next_stub();
       
   113 
   111 
   114   static ICStub* new_ic_stub();
   112   static ICStub* new_ic_stub();
   115 
       
   116 
   113 
   117   // Machine-dependent implementation of ICBuffer
   114   // Machine-dependent implementation of ICBuffer
   118   static void    assemble_ic_buffer_code(address code_begin, void* cached_value, address entry_point);
   115   static void    assemble_ic_buffer_code(address code_begin, void* cached_value, address entry_point);
   119   static address ic_buffer_entry_point  (address code_begin);
   116   static address ic_buffer_entry_point  (address code_begin);
   120   static void*   ic_buffer_cached_value (address code_begin);
   117   static void*   ic_buffer_cached_value (address code_begin);
   127   // Access
   124   // Access
   128   static bool contains(address instruction_address);
   125   static bool contains(address instruction_address);
   129 
   126 
   130     // removes the ICStubs after backpatching
   127     // removes the ICStubs after backpatching
   131   static void update_inline_caches();
   128   static void update_inline_caches();
       
   129   static void refill_ic_stubs();
   132 
   130 
   133   // for debugging
   131   // for debugging
   134   static bool is_empty();
   132   static bool is_empty();
   135 
   133 
   136   static void release_pending_icholders();
   134   static void release_pending_icholders();
   137   static void queue_for_release(CompiledICHolder* icholder);
   135   static void queue_for_release(CompiledICHolder* icholder);
   138   static int pending_icholder_count() { return _pending_count; }
   136   static int pending_icholder_count() { return _pending_count; }
   139 
   137 
   140   // New interface
   138   // New interface
   141   static void    create_transition_stub(CompiledIC *ic, void* cached_value, address entry);
   139   static bool    create_transition_stub(CompiledIC *ic, void* cached_value, address entry);
   142   static address ic_destination_for(CompiledIC *ic);
   140   static address ic_destination_for(CompiledIC *ic);
   143   static void*   cached_value_for(CompiledIC *ic);
   141   static void*   cached_value_for(CompiledIC *ic);
   144 };
   142 };
   145 
   143 
   146 #endif // SHARE_VM_CODE_ICBUFFER_HPP
   144 #endif // SHARE_VM_CODE_ICBUFFER_HPP