src/share/vm/code/codeBlob.hpp

Fri, 06 May 2011 16:33:13 -0700

author
never
date
Fri, 06 May 2011 16:33:13 -0700
changeset 2895
167b70ff3abc
parent 2314
f95d63e2154a
child 3969
1d7922586cf6
permissions
-rw-r--r--

6939861: JVM should handle more conversion operations
Reviewed-by: twisti, jrose

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

mercurial