changeset 42064 | a530dbabe64f |
parent 42040 | 70ec5a09a0d5 |
child 42581 | 2fdb039ea5b5 |
42063:dca9294d9f59 | 42064:a530dbabe64f |
---|---|
28 #include "asm/codeBuffer.hpp" |
28 #include "asm/codeBuffer.hpp" |
29 #include "compiler/compilerDefinitions.hpp" |
29 #include "compiler/compilerDefinitions.hpp" |
30 #include "compiler/oopMap.hpp" |
30 #include "compiler/oopMap.hpp" |
31 #include "runtime/frame.hpp" |
31 #include "runtime/frame.hpp" |
32 #include "runtime/handles.hpp" |
32 #include "runtime/handles.hpp" |
33 #include "utilities/macros.hpp" |
|
33 |
34 |
34 // CodeBlob Types |
35 // CodeBlob Types |
35 // Used in the CodeCache to assign CodeBlobs to different CodeHeaps |
36 // Used in the CodeCache to assign CodeBlobs to different CodeHeaps |
36 struct CodeBlobType { |
37 struct CodeBlobType { |
37 enum { |
38 enum { |
93 |
94 |
94 ImmutableOopMapSet* _oop_maps; // OopMap for this CodeBlob |
95 ImmutableOopMapSet* _oop_maps; // OopMap for this CodeBlob |
95 bool _caller_must_gc_arguments; |
96 bool _caller_must_gc_arguments; |
96 CodeStrings _strings; |
97 CodeStrings _strings; |
97 const char* _name; |
98 const char* _name; |
99 S390_ONLY(int _ctable_offset;) |
|
98 |
100 |
99 CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments); |
101 CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments); |
100 CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments); |
102 CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments); |
101 public: |
103 public: |
102 // Returns the space needed for CodeBlob |
104 // Returns the space needed for CodeBlob |
137 address content_begin() const { return _content_begin; } |
139 address content_begin() const { return _content_begin; } |
138 address content_end() const { return _code_end; } // _code_end == _content_end is true for all types of blobs for now, it is also checked in the constructor |
140 address content_end() const { return _code_end; } // _code_end == _content_end is true for all types of blobs for now, it is also checked in the constructor |
139 address code_begin() const { return _code_begin; } |
141 address code_begin() const { return _code_begin; } |
140 address code_end() const { return _code_end; } |
142 address code_end() const { return _code_end; } |
141 address data_end() const { return _data_end; } |
143 address data_end() const { return _data_end; } |
144 |
|
145 // This field holds the beginning of the const section in the old code buffer. |
|
146 // It is needed to fix relocations of pc-relative loads when resizing the |
|
147 // the constant pool or moving it. |
|
148 S390_ONLY(address ctable_begin() const { return header_begin() + _ctable_offset; }) |
|
149 void set_ctable_begin(address ctable) { S390_ONLY(_ctable_offset = ctable - header_begin();) } |
|
142 |
150 |
143 // Sizes |
151 // Sizes |
144 int size() const { return _size; } |
152 int size() const { return _size; } |
145 int header_size() const { return _header_size; } |
153 int header_size() const { return _header_size; } |
146 int relocation_size() const { return (address) relocation_end() - (address) relocation_begin(); } |
154 int relocation_size() const { return (address) relocation_end() - (address) relocation_begin(); } |