@@ -90,8 +90,8 @@ enum class CodeBlobKind : u1 {
9090 Number_Of_Kinds
9191};
9292
93- class UpcallStub ; // for as_upcall_stub()
94- class RuntimeStub ; // for as_runtime_stub()
93+ class UpcallStub ; // for as_upcall_stub()
94+ class RuntimeStub ; // for as_runtime_stub()
9595class JavaFrameAnchor ; // for UpcallStub::jfa_for_frame
9696
9797class CodeBlob {
@@ -101,43 +101,39 @@ class CodeBlob {
101101
102102protected:
103103 // order fields from large to small to minimize padding between fields
104- ImmutableOopMapSet* _oop_maps; // OopMap for this CodeBlob
104+ ImmutableOopMapSet* _oop_maps; // OopMap for this CodeBlob
105105 const char * _name;
106106
107- int _size; // total size of CodeBlob in bytes
108- int _header_size; // size of header (depends on subclass)
109- int _relocation_size; // size of relocation
110- int _content_offset; // offset to where content region begins (this includes consts, insts, stubs)
111- int _code_offset; // offset to where instructions region begins (this includes insts, stubs)
112- int _frame_complete_offset; // instruction offsets in [0.._frame_complete_offset) have
113- // not finished setting up their frame. Beware of pc's in
114- // that range. There is a similar range(s) on returns
115- // which we don't detect.
116- int _data_offset; // offset to where data region begins
117- int _frame_size; // size of stack frame in words (NOT slots. On x64 these are 64bit words)
107+ int _size; // total size of CodeBlob in bytes
108+ int _relocation_size; // size of relocation (could be bigger than 64Kb)
109+ int _content_offset; // offset to where content region begins (this includes consts, insts, stubs)
110+ int _code_offset; // offset to where instructions region begins (this includes insts, stubs)
118111
119- S390_ONLY (int _ctable_offset;)
112+ int _data_offset; // offset to where data region begins
113+ int _frame_size; // size of stack frame in words (NOT slots. On x64 these are 64bit words)
120114
121- CodeBlobKind _kind; // Kind of this code blob
115+ S390_ONLY ( int _ctable_offset;)
122116
123- bool _caller_must_gc_arguments;
117+ uint16_t _header_size; // size of header (depends on subclass)
118+ int16_t _frame_complete_offset; // instruction offsets in [0.._frame_complete_offset) have
119+ // not finished setting up their frame. Beware of pc's in
120+ // that range. There is a similar range(s) on returns
121+ // which we don't detect.
122+
123+ CodeBlobKind _kind; // Kind of this code blob
124+
125+ bool _caller_must_gc_arguments;
124126
125127#ifndef PRODUCT
126128 AsmRemarks _asm_remarks;
127129 DbgStrings _dbg_strings;
128- #endif // not PRODUCT
129-
130- DEBUG_ONLY ( void verify_parameters () );
131-
132- CodeBlob (const char * name, CodeBlobKind kind, int size, int header_size, int relocation_size,
133- int content_offset, int code_offset, int data_offset, int frame_complete_offset,
134- int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments);
130+ #endif
135131
136- CodeBlob (const char * name, CodeBlobKind kind, CodeBuffer* cb, int size, int header_size,
137- int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
132+ CodeBlob (const char * name, CodeBlobKind kind, CodeBuffer* cb, int size, uint16_t header_size,
133+ int16_t frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
138134
139135 // Simple CodeBlob used for simple BufferBlob.
140- CodeBlob (const char * name, CodeBlobKind kind, int size, int header_size);
136+ CodeBlob (const char * name, CodeBlobKind kind, int size, uint16_t header_size);
141137
142138 void operator delete (void * p) { }
143139
@@ -152,7 +148,7 @@ class CodeBlob {
152148 static unsigned int align_code_offset (int offset);
153149
154150 // Deletion
155- virtual void purge (bool free_code_cache_data, bool unregister_nmethod );
151+ void purge ();
156152
157153 // Typing
158154 bool is_nmethod () const { return _kind == CodeBlobKind::Nmethod; }
@@ -225,7 +221,6 @@ class CodeBlob {
225221
226222 const ImmutableOopMap* oop_map_for_slot (int slot, address return_address) const ;
227223 const ImmutableOopMap* oop_map_for_return_address (address return_address) const ;
228- virtual void preserve_callee_argument_oops (frame fr, const RegisterMap* reg_map, OopClosure* f) = 0;
229224
230225 // Frame support. Sizes are in word units.
231226 int frame_size () const { return _frame_size; }
@@ -273,7 +268,7 @@ class RuntimeBlob : public CodeBlob {
273268
274269 // Creation
275270 // a) simple CodeBlob
276- RuntimeBlob (const char * name, CodeBlobKind kind, int size, int header_size)
271+ RuntimeBlob (const char * name, CodeBlobKind kind, int size, uint16_t header_size)
277272 : CodeBlob(name, kind, size, header_size)
278273 {}
279274
@@ -285,8 +280,8 @@ class RuntimeBlob : public CodeBlob {
285280 CodeBlobKind kind,
286281 CodeBuffer* cb,
287282 int size,
288- int header_size,
289- int frame_complete,
283+ uint16_t header_size,
284+ int16_t frame_complete,
290285 int frame_size,
291286 OopMapSet* oop_maps,
292287 bool caller_must_gc_arguments = false
@@ -324,10 +319,9 @@ class BufferBlob: public RuntimeBlob {
324319
325320 static void free (BufferBlob* buf);
326321
327- // GC/Verification support
328- void preserve_callee_argument_oops (frame fr, const RegisterMap* reg_map, OopClosure* f) override { /* nothing to do */ }
329-
322+ // Verification support
330323 void verify () override ;
324+
331325 void print_on (outputStream* st) const override ;
332326 void print_value_on (outputStream* st) const override ;
333327};
@@ -381,7 +375,7 @@ class RuntimeStub: public RuntimeBlob {
381375 const char * name,
382376 CodeBuffer* cb,
383377 int size,
384- int frame_complete,
378+ int16_t frame_complete,
385379 int frame_size,
386380 OopMapSet* oop_maps,
387381 bool caller_must_gc_arguments
@@ -394,7 +388,7 @@ class RuntimeStub: public RuntimeBlob {
394388 static RuntimeStub* new_runtime_stub (
395389 const char * stub_name,
396390 CodeBuffer* cb,
397- int frame_complete,
391+ int16_t frame_complete,
398392 int frame_size,
399393 OopMapSet* oop_maps,
400394 bool caller_must_gc_arguments,
@@ -405,10 +399,9 @@ class RuntimeStub: public RuntimeBlob {
405399
406400 address entry_point () const { return code_begin (); }
407401
408- // GC/Verification support
409- void preserve_callee_argument_oops (frame fr, const RegisterMap *reg_map, OopClosure* f) override { /* nothing to do */ }
410-
402+ // Verification support
411403 void verify () override ;
404+
412405 void print_on (outputStream* st) const override ;
413406 void print_value_on (outputStream* st) const override ;
414407};
@@ -429,7 +422,7 @@ class SingletonBlob: public RuntimeBlob {
429422 CodeBlobKind kind,
430423 CodeBuffer* cb,
431424 int size,
432- int header_size,
425+ uint16_t header_size,
433426 int frame_size,
434427 OopMapSet* oop_maps
435428 )
@@ -438,9 +431,9 @@ class SingletonBlob: public RuntimeBlob {
438431
439432 address entry_point () { return code_begin (); }
440433
441- // GC/Verification support
442- void preserve_callee_argument_oops (frame fr, const RegisterMap *reg_map, OopClosure* f) override { /* nothing to do */ }
434+ // Verification support
443435 void verify () override ; // does nothing
436+
444437 void print_on (outputStream* st) const override ;
445438 void print_value_on (outputStream* st) const override ;
446439};
@@ -632,7 +625,6 @@ class UpcallStub: public RuntimeBlob {
632625
633626 // GC/Verification support
634627 void oops_do (OopClosure* f, const frame& frame);
635- void preserve_callee_argument_oops (frame fr, const RegisterMap* reg_map, OopClosure* f) override ;
636628 void verify () override ;
637629
638630 // Misc.
0 commit comments