377 // Deal with Disassembler, VTune, Forte, JvmtiExport, MemoryService. 378 static void trace_new_stub(RuntimeBlob* blob, const char* name1, const char* name2 = ""); 379 }; 380 381 class WhiteBox; 382 //---------------------------------------------------------------------------------------------------- 383 // BufferBlob: used to hold non-relocatable machine code such as the interpreter, stubroutines, etc. 384 385 class BufferBlob: public RuntimeBlob { 386 friend class VMStructs; 387 friend class AdapterBlob; 388 friend class VtableBlob; 389 friend class MethodHandlesAdapterBlob; 390 friend class BufferedValueTypeBlob; 391 friend class WhiteBox; 392 393 private: 394 // Creation support 395 BufferBlob(const char* name, int size); 396 BufferBlob(const char* name, int size, CodeBuffer* cb); 397 BufferBlob(const char* name, int size, CodeBuffer* cb, int frame_complete, int frame_size, OopMapSet* oop_maps); 398 399 // This ordinary operator delete is needed even though not used, so the 400 // below two-argument operator delete will be treated as a placement 401 // delete rather than an ordinary sized delete; see C++14 3.7.4.2/p2. 402 void operator delete(void* p); 403 void* operator new(size_t s, unsigned size) throw(); 404 405 public: 406 // Creation 407 static BufferBlob* create(const char* name, int buffer_size); 408 static BufferBlob* create(const char* name, CodeBuffer* cb); 409 410 static void free(BufferBlob* buf); 411 412 // Typing 413 virtual bool is_buffer_blob() const { return true; } 414 415 // GC/Verification support 416 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ } 417 bool is_alive() const { return true; } 418 419 void verify(); 420 void print_on(outputStream* st) const; 421 void print_value_on(outputStream* st) const; 422 }; 423 424 425 //---------------------------------------------------------------------------------------------------- 426 // AdapterBlob: used to hold C2I/I2C adapters 427 428 class AdapterBlob: public BufferBlob { 429 private: 430 AdapterBlob(int size, CodeBuffer* cb, int frame_complete, int frame_size, OopMapSet* oop_maps); 431 432 public: 433 // Creation 434 static AdapterBlob* create(CodeBuffer* cb, 435 int frame_complete, 436 int frame_size, 437 OopMapSet* oop_maps); 438 439 // Typing 440 virtual bool is_adapter_blob() const { return true; } 441 442 bool caller_must_gc_arguments(JavaThread* thread) const { return true; } 443 }; 444 445 //--------------------------------------------------------------------------------------------------- 446 class VtableBlob: public BufferBlob { 447 private: 448 VtableBlob(const char*, int); 449 450 public: 451 // Creation 452 static VtableBlob* create(const char* name, int buffer_size); 453 454 // Typing 455 virtual bool is_vtable_blob() const { return true; } 456 }; 457 | 377 // Deal with Disassembler, VTune, Forte, JvmtiExport, MemoryService. 378 static void trace_new_stub(RuntimeBlob* blob, const char* name1, const char* name2 = ""); 379 }; 380 381 class WhiteBox; 382 //---------------------------------------------------------------------------------------------------- 383 // BufferBlob: used to hold non-relocatable machine code such as the interpreter, stubroutines, etc. 384 385 class BufferBlob: public RuntimeBlob { 386 friend class VMStructs; 387 friend class AdapterBlob; 388 friend class VtableBlob; 389 friend class MethodHandlesAdapterBlob; 390 friend class BufferedValueTypeBlob; 391 friend class WhiteBox; 392 393 private: 394 // Creation support 395 BufferBlob(const char* name, int size); 396 BufferBlob(const char* name, int size, CodeBuffer* cb); 397 BufferBlob(const char* name, int size, CodeBuffer* cb, int frame_complete, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments = false); 398 399 // This ordinary operator delete is needed even though not used, so the 400 // below two-argument operator delete will be treated as a placement 401 // delete rather than an ordinary sized delete; see C++14 3.7.4.2/p2. 402 void operator delete(void* p); 403 void* operator new(size_t s, unsigned size) throw(); 404 405 public: 406 // Creation 407 static BufferBlob* create(const char* name, int buffer_size); 408 static BufferBlob* create(const char* name, CodeBuffer* cb); 409 410 static void free(BufferBlob* buf); 411 412 // Typing 413 virtual bool is_buffer_blob() const { return true; } 414 415 // GC/Verification support 416 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ } 417 bool is_alive() const { return true; } 418 419 void verify(); 420 void print_on(outputStream* st) const; 421 void print_value_on(outputStream* st) const; 422 }; 423 424 425 //---------------------------------------------------------------------------------------------------- 426 // AdapterBlob: used to hold C2I/I2C adapters 427 428 class AdapterBlob: public BufferBlob { 429 private: 430 AdapterBlob(int size, CodeBuffer* cb, int frame_complete, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments = false); 431 432 public: 433 // Creation 434 static AdapterBlob* create(CodeBuffer* cb, 435 int frame_complete, 436 int frame_size, 437 OopMapSet* oop_maps, 438 bool caller_must_gc_arguments = false); 439 440 // Typing 441 virtual bool is_adapter_blob() const { return true; } 442 443 bool caller_must_gc_arguments(JavaThread* thread) const { return true; } 444 }; 445 446 //--------------------------------------------------------------------------------------------------- 447 class VtableBlob: public BufferBlob { 448 private: 449 VtableBlob(const char*, int); 450 451 public: 452 // Creation 453 static VtableBlob* create(const char* name, int buffer_size); 454 455 // Typing 456 virtual bool is_vtable_blob() const { return true; } 457 }; 458 |