< prev index next >

src/hotspot/share/code/codeBlob.hpp

Print this page
@@ -58,17 +58,17 @@
  //  RuntimeBlob          : Non-compiled method code; generated glue code
  //   BufferBlob          : Used for non-relocatable code such as interpreter, stubroutines, etc.
  //    AdapterBlob        : Used to hold C2I/I2C adapters
  //    VtableBlob         : Used for holding vtable chunks
  //    MethodHandlesAdapterBlob : Used to hold MethodHandles adapters
- //    OptimizedEntryBlob : Used for upcalls from native code
  //   RuntimeStub         : Call to VM runtime methods
  //   SingletonBlob       : Super-class for all blobs that exist in only one instance
  //    DeoptimizationBlob : Used for deoptimization
  //    ExceptionBlob      : Used for stack unrolling
  //    SafepointBlob      : Used to handle illegal instruction exceptions
  //    UncommonTrapBlob   : Used to handle uncommon traps
+ //   OptimizedEntryBlob  : Used for upcalls from native code
  //
  //
  // Layout : continuous in the CodeCache
  //   - header
  //   - relocation

@@ -369,10 +369,12 @@
      int         frame_size,
      OopMapSet*  oop_maps,
      bool        caller_must_gc_arguments = false
    );
  
+   static void free(RuntimeBlob* blob);
+ 
    // GC support
    virtual bool is_alive() const                  = 0;
  
    void verify();
  

@@ -463,11 +465,11 @@
  //----------------------------------------------------------------------------------------------------
  // MethodHandlesAdapterBlob: used to hold MethodHandles adapters
  
  class MethodHandlesAdapterBlob: public BufferBlob {
  private:
-   MethodHandlesAdapterBlob(int size)                 : BufferBlob("MethodHandles adapters", size) {}
+   MethodHandlesAdapterBlob(int size): BufferBlob("MethodHandles adapters", size) {}
  
  public:
    // Creation
    static MethodHandlesAdapterBlob* create(int buffer_size);
  

@@ -738,20 +740,23 @@
  
  //----------------------------------------------------------------------------------------------------
  
  class ProgrammableUpcallHandler;
  
- class OptimizedEntryBlob: public BufferBlob {
+ class OptimizedEntryBlob: public RuntimeBlob {
    friend class ProgrammableUpcallHandler;
   private:
    intptr_t _exception_handler_offset;
    jobject _receiver;
    ByteSize _frame_data_offset;
  
-   OptimizedEntryBlob(const char* name, int size, CodeBuffer* cb, intptr_t exception_handler_offset,
+   OptimizedEntryBlob(const char* name, CodeBuffer* cb, int size,
+                      intptr_t exception_handler_offset,
                       jobject receiver, ByteSize frame_data_offset);
  
+   void* operator new(size_t s, unsigned size) throw();
+ 
    struct FrameData {
      JavaFrameAnchor jfa;
      JavaThread* thread;
      JNIHandleBlock* old_handles;
      JNIHandleBlock* new_handles;

@@ -761,20 +766,30 @@
    // defined in frame_ARCH.cpp
    FrameData* frame_data_for_frame(const frame& frame) const;
   public:
    // Creation
    static OptimizedEntryBlob* create(const char* name, CodeBuffer* cb,
-                                     intptr_t exception_handler_offset, jobject receiver,
-                                     ByteSize frame_data_offset);
+                                     intptr_t exception_handler_offset,
+                                     jobject receiver, ByteSize frame_data_offset);
+ 
+   static void free(OptimizedEntryBlob* blob);
  
    address exception_handler() { return code_begin() + _exception_handler_offset; }
    jobject receiver() { return _receiver; }
  
    JavaFrameAnchor* jfa_for_frame(const frame& frame) const;
  
-   void oops_do(OopClosure* f, const frame& frame);
- 
    // Typing
    virtual bool is_optimized_entry_blob() const override { return true; }
+ 
+   // GC/Verification support
+   void oops_do(OopClosure* f, const frame& frame);
+   virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) override;
+   virtual bool is_alive() const override { return true; }
+   virtual void verify() override;
+ 
+   // Misc.
+   virtual void print_on(outputStream* st) const override;
+   virtual void print_value_on(outputStream* st) const override;
  };
  
  #endif // SHARE_CODE_CODEBLOB_HPP
< prev index next >