src/share/vm/code/codeBlob.hpp

Tue, 08 Aug 2017 15:57:29 +0800

author
aoqi
date
Tue, 08 Aug 2017 15:57:29 +0800
changeset 6876
710a3c8b516e
parent 5919
469216acdb28
parent 0
f90c822e73f8
child 9203
53eec13fbaa5
permissions
-rw-r--r--

merge

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation.
aoqi@0 8 *
aoqi@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 12 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 13 * accompanied this code).
aoqi@0 14 *
aoqi@0 15 * You should have received a copy of the GNU General Public License version
aoqi@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 18 *
aoqi@0 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 20 * or visit www.oracle.com if you need additional information or have any
aoqi@0 21 * questions.
aoqi@0 22 *
aoqi@0 23 */
aoqi@0 24
aoqi@0 25 #ifndef SHARE_VM_CODE_CODEBLOB_HPP
aoqi@0 26 #define SHARE_VM_CODE_CODEBLOB_HPP
aoqi@0 27
aoqi@0 28 #include "asm/codeBuffer.hpp"
aoqi@0 29 #include "compiler/oopMap.hpp"
aoqi@0 30 #include "runtime/frame.hpp"
aoqi@0 31 #include "runtime/handles.hpp"
aoqi@0 32
aoqi@0 33 // CodeBlob - superclass for all entries in the CodeCache.
aoqi@0 34 //
aoqi@0 35 // Suptypes are:
aoqi@0 36 // nmethod : Compiled Java methods (include method that calls to native code)
aoqi@0 37 // RuntimeStub : Call to VM runtime methods
aoqi@0 38 // DeoptimizationBlob : Used for deoptimizatation
aoqi@0 39 // ExceptionBlob : Used for stack unrolling
aoqi@0 40 // SafepointBlob : Used to handle illegal instruction exceptions
aoqi@0 41 //
aoqi@0 42 //
aoqi@0 43 // Layout:
aoqi@0 44 // - header
aoqi@0 45 // - relocation
aoqi@0 46 // - content space
aoqi@0 47 // - instruction space
aoqi@0 48 // - data space
aoqi@0 49 class DeoptimizationBlob;
aoqi@0 50
aoqi@0 51 class CodeBlob VALUE_OBJ_CLASS_SPEC {
aoqi@0 52
aoqi@0 53 friend class VMStructs;
aoqi@0 54
aoqi@0 55 private:
aoqi@0 56 const char* _name;
aoqi@0 57 int _size; // total size of CodeBlob in bytes
aoqi@0 58 int _header_size; // size of header (depends on subclass)
aoqi@0 59 int _relocation_size; // size of relocation
aoqi@0 60 int _content_offset; // offset to where content region begins (this includes consts, insts, stubs)
aoqi@0 61 int _code_offset; // offset to where instructions region begins (this includes insts, stubs)
aoqi@0 62 int _frame_complete_offset; // instruction offsets in [0.._frame_complete_offset) have
aoqi@0 63 // not finished setting up their frame. Beware of pc's in
aoqi@0 64 // that range. There is a similar range(s) on returns
aoqi@0 65 // which we don't detect.
aoqi@0 66 int _data_offset; // offset to where data region begins
aoqi@0 67 int _frame_size; // size of stack frame
aoqi@0 68 OopMapSet* _oop_maps; // OopMap for this CodeBlob
aoqi@0 69 CodeStrings _strings;
aoqi@0 70
aoqi@0 71 public:
aoqi@0 72 // Returns the space needed for CodeBlob
aoqi@0 73 static unsigned int allocation_size(CodeBuffer* cb, int header_size);
aoqi@0 74
aoqi@0 75 // Creation
aoqi@0 76 // a) simple CodeBlob
aoqi@0 77 // frame_complete is the offset from the beginning of the instructions
aoqi@0 78 // to where the frame setup (from stackwalk viewpoint) is complete.
aoqi@0 79 CodeBlob(const char* name, int header_size, int size, int frame_complete, int locs_size);
aoqi@0 80
aoqi@0 81 // b) full CodeBlob
aoqi@0 82 CodeBlob(
aoqi@0 83 const char* name,
aoqi@0 84 CodeBuffer* cb,
aoqi@0 85 int header_size,
aoqi@0 86 int size,
aoqi@0 87 int frame_complete,
aoqi@0 88 int frame_size,
aoqi@0 89 OopMapSet* oop_maps
aoqi@0 90 );
aoqi@0 91
aoqi@0 92 // Deletion
aoqi@0 93 void flush();
aoqi@0 94
aoqi@0 95 // Typing
aoqi@0 96 virtual bool is_buffer_blob() const { return false; }
aoqi@0 97 virtual bool is_nmethod() const { return false; }
aoqi@0 98 virtual bool is_runtime_stub() const { return false; }
aoqi@0 99 virtual bool is_deoptimization_stub() const { return false; }
aoqi@0 100 virtual bool is_uncommon_trap_stub() const { return false; }
aoqi@0 101 virtual bool is_exception_stub() const { return false; }
aoqi@0 102 virtual bool is_safepoint_stub() const { return false; }
aoqi@0 103 virtual bool is_adapter_blob() const { return false; }
aoqi@0 104 virtual bool is_method_handles_adapter_blob() const { return false; }
aoqi@0 105
aoqi@0 106 virtual bool is_compiled_by_c2() const { return false; }
aoqi@0 107 virtual bool is_compiled_by_c1() const { return false; }
aoqi@0 108
aoqi@0 109 // Casting
aoqi@0 110 nmethod* as_nmethod_or_null() { return is_nmethod() ? (nmethod*) this : NULL; }
aoqi@0 111
aoqi@0 112 // Boundaries
aoqi@0 113 address header_begin() const { return (address) this; }
aoqi@0 114 address header_end() const { return ((address) this) + _header_size; };
aoqi@0 115 relocInfo* relocation_begin() const { return (relocInfo*) header_end(); };
aoqi@0 116 relocInfo* relocation_end() const { return (relocInfo*)(header_end() + _relocation_size); }
aoqi@0 117 address content_begin() const { return (address) header_begin() + _content_offset; }
aoqi@0 118 address content_end() const { return (address) header_begin() + _data_offset; }
aoqi@0 119 address code_begin() const { return (address) header_begin() + _code_offset; }
aoqi@0 120 address code_end() const { return (address) header_begin() + _data_offset; }
aoqi@0 121 address data_begin() const { return (address) header_begin() + _data_offset; }
aoqi@0 122 address data_end() const { return (address) header_begin() + _size; }
aoqi@0 123
aoqi@0 124 // Offsets
aoqi@0 125 int relocation_offset() const { return _header_size; }
aoqi@0 126 int content_offset() const { return _content_offset; }
aoqi@0 127 int code_offset() const { return _code_offset; }
aoqi@0 128 int data_offset() const { return _data_offset; }
aoqi@0 129
aoqi@0 130 // Sizes
aoqi@0 131 int size() const { return _size; }
aoqi@0 132 int header_size() const { return _header_size; }
aoqi@0 133 int relocation_size() const { return (address) relocation_end() - (address) relocation_begin(); }
aoqi@0 134 int content_size() const { return content_end() - content_begin(); }
aoqi@0 135 int code_size() const { return code_end() - code_begin(); }
aoqi@0 136 int data_size() const { return data_end() - data_begin(); }
aoqi@0 137
aoqi@0 138 // Containment
aoqi@0 139 bool blob_contains(address addr) const { return header_begin() <= addr && addr < data_end(); }
aoqi@0 140 bool relocation_contains(relocInfo* addr) const{ return relocation_begin() <= addr && addr < relocation_end(); }
aoqi@0 141 bool content_contains(address addr) const { return content_begin() <= addr && addr < content_end(); }
aoqi@0 142 bool code_contains(address addr) const { return code_begin() <= addr && addr < code_end(); }
aoqi@0 143 bool data_contains(address addr) const { return data_begin() <= addr && addr < data_end(); }
aoqi@0 144 bool contains(address addr) const { return content_contains(addr); }
aoqi@0 145 bool is_frame_complete_at(address addr) const { return code_contains(addr) &&
aoqi@0 146 addr >= code_begin() + _frame_complete_offset; }
aoqi@0 147
aoqi@0 148 // CodeCache support: really only used by the nmethods, but in order to get
aoqi@0 149 // asserts and certain bookkeeping to work in the CodeCache they are defined
aoqi@0 150 // virtual here.
aoqi@0 151 virtual bool is_zombie() const { return false; }
aoqi@0 152 virtual bool is_locked_by_vm() const { return false; }
aoqi@0 153
aoqi@0 154 virtual bool is_unloaded() const { return false; }
aoqi@0 155 virtual bool is_not_entrant() const { return false; }
aoqi@0 156
aoqi@0 157 // GC support
aoqi@0 158 virtual bool is_alive() const = 0;
aoqi@0 159
aoqi@0 160 // OopMap for frame
aoqi@0 161 OopMapSet* oop_maps() const { return _oop_maps; }
aoqi@0 162 void set_oop_maps(OopMapSet* p);
aoqi@0 163 OopMap* oop_map_for_return_address(address return_address);
aoqi@0 164 virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { ShouldNotReachHere(); }
aoqi@0 165
aoqi@0 166 // Frame support
aoqi@0 167 int frame_size() const { return _frame_size; }
aoqi@0 168 void set_frame_size(int size) { _frame_size = size; }
aoqi@0 169
aoqi@0 170 // Returns true, if the next frame is responsible for GC'ing oops passed as arguments
aoqi@0 171 virtual bool caller_must_gc_arguments(JavaThread* thread) const { return false; }
aoqi@0 172
aoqi@0 173 // Naming
aoqi@0 174 const char* name() const { return _name; }
aoqi@0 175 void set_name(const char* name) { _name = name; }
aoqi@0 176
aoqi@0 177 // Debugging
aoqi@0 178 virtual void verify();
aoqi@0 179 void print() const { print_on(tty); }
aoqi@0 180 virtual void print_on(outputStream* st) const;
aoqi@0 181 virtual void print_value_on(outputStream* st) const;
aoqi@0 182
aoqi@0 183 // Deal with Disassembler, VTune, Forte, JvmtiExport, MemoryService.
aoqi@0 184 static void trace_new_stub(CodeBlob* blob, const char* name1, const char* name2 = "");
aoqi@0 185
aoqi@0 186 // Print the comment associated with offset on stream, if there is one
aoqi@0 187 virtual void print_block_comment(outputStream* stream, address block_begin) const {
aoqi@0 188 intptr_t offset = (intptr_t)(block_begin - code_begin());
aoqi@0 189 _strings.print_block_comment(stream, offset);
aoqi@0 190 }
aoqi@0 191
aoqi@0 192 // Transfer ownership of comments to this CodeBlob
aoqi@0 193 void set_strings(CodeStrings& strings) {
aoqi@0 194 _strings.assign(strings);
aoqi@0 195 }
aoqi@0 196 };
aoqi@0 197
aoqi@0 198
aoqi@0 199 //----------------------------------------------------------------------------------------------------
aoqi@0 200 // BufferBlob: used to hold non-relocatable machine code such as the interpreter, stubroutines, etc.
aoqi@0 201
aoqi@0 202 class BufferBlob: public CodeBlob {
aoqi@0 203 friend class VMStructs;
aoqi@0 204 friend class AdapterBlob;
aoqi@0 205 friend class MethodHandlesAdapterBlob;
aoqi@0 206
aoqi@0 207 private:
aoqi@0 208 // Creation support
aoqi@0 209 BufferBlob(const char* name, int size);
aoqi@0 210 BufferBlob(const char* name, int size, CodeBuffer* cb);
aoqi@0 211
aoqi@0 212 void* operator new(size_t s, unsigned size, bool is_critical = false) throw();
aoqi@0 213
aoqi@0 214 public:
aoqi@0 215 // Creation
aoqi@0 216 static BufferBlob* create(const char* name, int buffer_size);
aoqi@0 217 static BufferBlob* create(const char* name, CodeBuffer* cb);
aoqi@0 218
aoqi@0 219 static void free(BufferBlob* buf);
aoqi@0 220
aoqi@0 221 // Typing
aoqi@0 222 virtual bool is_buffer_blob() const { return true; }
aoqi@0 223
aoqi@0 224 // GC/Verification support
aoqi@0 225 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ }
aoqi@0 226 bool is_alive() const { return true; }
aoqi@0 227
aoqi@0 228 void verify();
aoqi@0 229 void print_on(outputStream* st) const;
aoqi@0 230 void print_value_on(outputStream* st) const;
aoqi@0 231 };
aoqi@0 232
aoqi@0 233
aoqi@0 234 //----------------------------------------------------------------------------------------------------
aoqi@0 235 // AdapterBlob: used to hold C2I/I2C adapters
aoqi@0 236
aoqi@0 237 class AdapterBlob: public BufferBlob {
aoqi@0 238 private:
aoqi@0 239 AdapterBlob(int size, CodeBuffer* cb);
aoqi@0 240
aoqi@0 241 public:
aoqi@0 242 // Creation
aoqi@0 243 static AdapterBlob* create(CodeBuffer* cb);
aoqi@0 244
aoqi@0 245 // Typing
aoqi@0 246 virtual bool is_adapter_blob() const { return true; }
aoqi@0 247 };
aoqi@0 248
aoqi@0 249
aoqi@0 250 //----------------------------------------------------------------------------------------------------
aoqi@0 251 // MethodHandlesAdapterBlob: used to hold MethodHandles adapters
aoqi@0 252
aoqi@0 253 class MethodHandlesAdapterBlob: public BufferBlob {
aoqi@0 254 private:
aoqi@0 255 MethodHandlesAdapterBlob(int size) : BufferBlob("MethodHandles adapters", size) {}
aoqi@0 256
aoqi@0 257 public:
aoqi@0 258 // Creation
aoqi@0 259 static MethodHandlesAdapterBlob* create(int buffer_size);
aoqi@0 260
aoqi@0 261 // Typing
aoqi@0 262 virtual bool is_method_handles_adapter_blob() const { return true; }
aoqi@0 263 };
aoqi@0 264
aoqi@0 265
aoqi@0 266 //----------------------------------------------------------------------------------------------------
aoqi@0 267 // RuntimeStub: describes stubs used by compiled code to call a (static) C++ runtime routine
aoqi@0 268
aoqi@0 269 class RuntimeStub: public CodeBlob {
aoqi@0 270 friend class VMStructs;
aoqi@0 271 private:
aoqi@0 272 bool _caller_must_gc_arguments;
aoqi@0 273
aoqi@0 274 // Creation support
aoqi@0 275 RuntimeStub(
aoqi@0 276 const char* name,
aoqi@0 277 CodeBuffer* cb,
aoqi@0 278 int size,
aoqi@0 279 int frame_complete,
aoqi@0 280 int frame_size,
aoqi@0 281 OopMapSet* oop_maps,
aoqi@0 282 bool caller_must_gc_arguments
aoqi@0 283 );
aoqi@0 284
aoqi@0 285 void* operator new(size_t s, unsigned size) throw();
aoqi@0 286
aoqi@0 287 public:
aoqi@0 288 // Creation
aoqi@0 289 static RuntimeStub* new_runtime_stub(
aoqi@0 290 const char* stub_name,
aoqi@0 291 CodeBuffer* cb,
aoqi@0 292 int frame_complete,
aoqi@0 293 int frame_size,
aoqi@0 294 OopMapSet* oop_maps,
aoqi@0 295 bool caller_must_gc_arguments
aoqi@0 296 );
aoqi@0 297
aoqi@0 298 // Typing
aoqi@0 299 bool is_runtime_stub() const { return true; }
aoqi@0 300
aoqi@0 301 // GC support
aoqi@0 302 bool caller_must_gc_arguments(JavaThread* thread) const { return _caller_must_gc_arguments; }
aoqi@0 303
aoqi@0 304 address entry_point() { return code_begin(); }
aoqi@0 305
aoqi@0 306 // GC/Verification support
aoqi@0 307 void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { /* nothing to do */ }
aoqi@0 308 bool is_alive() const { return true; }
aoqi@0 309
aoqi@0 310 void verify();
aoqi@0 311 void print_on(outputStream* st) const;
aoqi@0 312 void print_value_on(outputStream* st) const;
aoqi@0 313 };
aoqi@0 314
aoqi@0 315
aoqi@0 316 //----------------------------------------------------------------------------------------------------
aoqi@0 317 // Super-class for all blobs that exist in only one instance. Implements default behaviour.
aoqi@0 318
aoqi@0 319 class SingletonBlob: public CodeBlob {
aoqi@0 320 friend class VMStructs;
aoqi@0 321
aoqi@0 322 protected:
aoqi@0 323 void* operator new(size_t s, unsigned size) throw();
aoqi@0 324
aoqi@0 325 public:
aoqi@0 326 SingletonBlob(
aoqi@0 327 const char* name,
aoqi@0 328 CodeBuffer* cb,
aoqi@0 329 int header_size,
aoqi@0 330 int size,
aoqi@0 331 int frame_size,
aoqi@0 332 OopMapSet* oop_maps
aoqi@0 333 )
aoqi@0 334 : CodeBlob(name, cb, header_size, size, CodeOffsets::frame_never_safe, frame_size, oop_maps)
aoqi@0 335 {};
aoqi@0 336
aoqi@0 337 address entry_point() { return code_begin(); }
aoqi@0 338
aoqi@0 339 bool is_alive() const { return true; }
aoqi@0 340
aoqi@0 341 void verify(); // does nothing
aoqi@0 342 void print_on(outputStream* st) const;
aoqi@0 343 void print_value_on(outputStream* st) const;
aoqi@0 344 };
aoqi@0 345
aoqi@0 346
aoqi@0 347 //----------------------------------------------------------------------------------------------------
aoqi@0 348 // DeoptimizationBlob
aoqi@0 349
aoqi@0 350 class DeoptimizationBlob: public SingletonBlob {
aoqi@0 351 friend class VMStructs;
aoqi@0 352 private:
aoqi@0 353 int _unpack_offset;
aoqi@0 354 int _unpack_with_exception;
aoqi@0 355 int _unpack_with_reexecution;
aoqi@0 356
aoqi@0 357 int _unpack_with_exception_in_tls;
aoqi@0 358
aoqi@0 359 // Creation support
aoqi@0 360 DeoptimizationBlob(
aoqi@0 361 CodeBuffer* cb,
aoqi@0 362 int size,
aoqi@0 363 OopMapSet* oop_maps,
aoqi@0 364 int unpack_offset,
aoqi@0 365 int unpack_with_exception_offset,
aoqi@0 366 int unpack_with_reexecution_offset,
aoqi@0 367 int frame_size
aoqi@0 368 );
aoqi@0 369
aoqi@0 370 public:
aoqi@0 371 // Creation
aoqi@0 372 static DeoptimizationBlob* create(
aoqi@0 373 CodeBuffer* cb,
aoqi@0 374 OopMapSet* oop_maps,
aoqi@0 375 int unpack_offset,
aoqi@0 376 int unpack_with_exception_offset,
aoqi@0 377 int unpack_with_reexecution_offset,
aoqi@0 378 int frame_size
aoqi@0 379 );
aoqi@0 380
aoqi@0 381 // Typing
aoqi@0 382 bool is_deoptimization_stub() const { return true; }
aoqi@0 383 bool exception_address_is_unpack_entry(address pc) const {
aoqi@0 384 address unpack_pc = unpack();
aoqi@0 385 return (pc == unpack_pc || (pc + frame::pc_return_offset) == unpack_pc);
aoqi@0 386 }
aoqi@0 387
aoqi@0 388
aoqi@0 389
aoqi@0 390
aoqi@0 391 // GC for args
aoqi@0 392 void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { /* Nothing to do */ }
aoqi@0 393
aoqi@0 394 // Printing
aoqi@0 395 void print_value_on(outputStream* st) const;
aoqi@0 396
aoqi@0 397 address unpack() const { return code_begin() + _unpack_offset; }
aoqi@0 398 address unpack_with_exception() const { return code_begin() + _unpack_with_exception; }
aoqi@0 399 address unpack_with_reexecution() const { return code_begin() + _unpack_with_reexecution; }
aoqi@0 400
aoqi@0 401 // Alternate entry point for C1 where the exception and issuing pc
aoqi@0 402 // are in JavaThread::_exception_oop and JavaThread::_exception_pc
aoqi@0 403 // instead of being in registers. This is needed because C1 doesn't
aoqi@0 404 // model exception paths in a way that keeps these registers free so
aoqi@0 405 // there may be live values in those registers during deopt.
aoqi@0 406 void set_unpack_with_exception_in_tls_offset(int offset) {
aoqi@0 407 _unpack_with_exception_in_tls = offset;
aoqi@0 408 assert(code_contains(code_begin() + _unpack_with_exception_in_tls), "must be PC inside codeblob");
aoqi@0 409 }
aoqi@0 410 address unpack_with_exception_in_tls() const { return code_begin() + _unpack_with_exception_in_tls; }
aoqi@0 411 };
aoqi@0 412
aoqi@0 413
aoqi@0 414 //----------------------------------------------------------------------------------------------------
aoqi@0 415 // UncommonTrapBlob (currently only used by Compiler 2)
aoqi@0 416
aoqi@0 417 #ifdef COMPILER2
aoqi@0 418
aoqi@0 419 class UncommonTrapBlob: public SingletonBlob {
aoqi@0 420 friend class VMStructs;
aoqi@0 421 private:
aoqi@0 422 // Creation support
aoqi@0 423 UncommonTrapBlob(
aoqi@0 424 CodeBuffer* cb,
aoqi@0 425 int size,
aoqi@0 426 OopMapSet* oop_maps,
aoqi@0 427 int frame_size
aoqi@0 428 );
aoqi@0 429
aoqi@0 430 public:
aoqi@0 431 // Creation
aoqi@0 432 static UncommonTrapBlob* create(
aoqi@0 433 CodeBuffer* cb,
aoqi@0 434 OopMapSet* oop_maps,
aoqi@0 435 int frame_size
aoqi@0 436 );
aoqi@0 437
aoqi@0 438 // GC for args
aoqi@0 439 void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { /* nothing to do */ }
aoqi@0 440
aoqi@0 441 // Typing
aoqi@0 442 bool is_uncommon_trap_stub() const { return true; }
aoqi@0 443 };
aoqi@0 444
aoqi@0 445
aoqi@0 446 //----------------------------------------------------------------------------------------------------
aoqi@0 447 // ExceptionBlob: used for exception unwinding in compiled code (currently only used by Compiler 2)
aoqi@0 448
aoqi@0 449 class ExceptionBlob: public SingletonBlob {
aoqi@0 450 friend class VMStructs;
aoqi@0 451 private:
aoqi@0 452 // Creation support
aoqi@0 453 ExceptionBlob(
aoqi@0 454 CodeBuffer* cb,
aoqi@0 455 int size,
aoqi@0 456 OopMapSet* oop_maps,
aoqi@0 457 int frame_size
aoqi@0 458 );
aoqi@0 459
aoqi@0 460 public:
aoqi@0 461 // Creation
aoqi@0 462 static ExceptionBlob* create(
aoqi@0 463 CodeBuffer* cb,
aoqi@0 464 OopMapSet* oop_maps,
aoqi@0 465 int frame_size
aoqi@0 466 );
aoqi@0 467
aoqi@0 468 // GC for args
aoqi@0 469 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ }
aoqi@0 470
aoqi@0 471 // Typing
aoqi@0 472 bool is_exception_stub() const { return true; }
aoqi@0 473 };
aoqi@0 474 #endif // COMPILER2
aoqi@0 475
aoqi@0 476
aoqi@0 477 //----------------------------------------------------------------------------------------------------
aoqi@0 478 // SafepointBlob: handles illegal_instruction exceptions during a safepoint
aoqi@0 479
aoqi@0 480 class SafepointBlob: public SingletonBlob {
aoqi@0 481 friend class VMStructs;
aoqi@0 482 private:
aoqi@0 483 // Creation support
aoqi@0 484 SafepointBlob(
aoqi@0 485 CodeBuffer* cb,
aoqi@0 486 int size,
aoqi@0 487 OopMapSet* oop_maps,
aoqi@0 488 int frame_size
aoqi@0 489 );
aoqi@0 490
aoqi@0 491 public:
aoqi@0 492 // Creation
aoqi@0 493 static SafepointBlob* create(
aoqi@0 494 CodeBuffer* cb,
aoqi@0 495 OopMapSet* oop_maps,
aoqi@0 496 int frame_size
aoqi@0 497 );
aoqi@0 498
aoqi@0 499 // GC for args
aoqi@0 500 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ }
aoqi@0 501
aoqi@0 502 // Typing
aoqi@0 503 bool is_safepoint_stub() const { return true; }
aoqi@0 504 };
aoqi@0 505
aoqi@0 506 #endif // SHARE_VM_CODE_CODEBLOB_HPP

mercurial