src/share/vm/code/stubs.hpp

changeset 4107
b31471cdc53e
parent 3900
d2a62e0f25eb
child 4153
b9a9ed0f8eeb
     1.1 --- a/src/share/vm/code/stubs.hpp	Thu Sep 20 16:49:17 2012 +0200
     1.2 +++ b/src/share/vm/code/stubs.hpp	Mon Sep 24 10:30:14 2012 -0700
     1.3 @@ -25,6 +25,7 @@
     1.4  #ifndef SHARE_VM_CODE_STUBS_HPP
     1.5  #define SHARE_VM_CODE_STUBS_HPP
     1.6  
     1.7 +#include "asm/codeBuffer.hpp"
     1.8  #include "memory/allocation.hpp"
     1.9  #ifdef TARGET_OS_FAMILY_linux
    1.10  # include "os_linux.inline.hpp"
    1.11 @@ -71,7 +72,8 @@
    1.12  class Stub VALUE_OBJ_CLASS_SPEC {
    1.13   public:
    1.14    // Initialization/finalization
    1.15 -  void    initialize(int size)                   { ShouldNotCallThis(); }                // called to initialize/specify the stub's size
    1.16 +  void    initialize(int size,
    1.17 +                     CodeComments& comments)     { ShouldNotCallThis(); }                // called to initialize/specify the stub's size
    1.18    void    finalize()                             { ShouldNotCallThis(); }                // called before the stub is deallocated
    1.19  
    1.20    // General info/converters
    1.21 @@ -104,7 +106,8 @@
    1.22  class StubInterface: public CHeapObj<mtCode> {
    1.23   public:
    1.24    // Initialization/finalization
    1.25 -  virtual void    initialize(Stub* self, int size)         = 0; // called after creation (called twice if allocated via (request, commit))
    1.26 +  virtual void    initialize(Stub* self, int size,
    1.27 +                             CodeComments& comments)       = 0; // called after creation (called twice if allocated via (request, commit))
    1.28    virtual void    finalize(Stub* self)                     = 0; // called before deallocation
    1.29  
    1.30    // General info/converters
    1.31 @@ -132,7 +135,8 @@
    1.32                                                             \
    1.33     public:                                                 \
    1.34      /* Initialization/finalization */                      \
    1.35 -    virtual void    initialize(Stub* self, int size)       { cast(self)->initialize(size); }       \
    1.36 +    virtual void    initialize(Stub* self, int size,       \
    1.37 +                               CodeComments& comments)     { cast(self)->initialize(size, comments); } \
    1.38      virtual void    finalize(Stub* self)                   { cast(self)->finalize(); }             \
    1.39                                                             \
    1.40      /* General info */                                     \
    1.41 @@ -171,7 +175,8 @@
    1.42    Stub* current_stub() const                     { return stub_at(_queue_end); }
    1.43  
    1.44    // Stub functionality accessed via interface
    1.45 -  void  stub_initialize(Stub* s, int size)       { assert(size % CodeEntryAlignment == 0, "size not aligned"); _stub_interface->initialize(s, size); }
    1.46 +  void  stub_initialize(Stub* s, int size,
    1.47 +                        CodeComments& comments)  { assert(size % CodeEntryAlignment == 0, "size not aligned"); _stub_interface->initialize(s, size, comments); }
    1.48    void  stub_finalize(Stub* s)                   { _stub_interface->finalize(s); }
    1.49    int   stub_size(Stub* s) const                 { return _stub_interface->size(s); }
    1.50    bool  stub_contains(Stub* s, address pc) const { return _stub_interface->code_begin(s) <= pc && pc < _stub_interface->code_end(s); }
    1.51 @@ -200,7 +205,8 @@
    1.52    // Stub allocation (atomic transactions)
    1.53    Stub* request_committed(int code_size);        // request a stub that provides exactly code_size space for code
    1.54    Stub* request(int requested_code_size);        // request a stub with a (maximum) code space - locks the queue
    1.55 -  void  commit (int committed_code_size);        // commit the previously requested stub - unlocks the queue
    1.56 +  void  commit (int committed_code_size,
    1.57 +                CodeComments& comments);         // commit the previously requested stub - unlocks the queue
    1.58  
    1.59    // Stub deallocation
    1.60    void  remove_first();                          // remove the first stub in the queue

mercurial