< prev index next >

src/hotspot/share/runtime/frame.hpp

Print this page




 320  public:
 321   // Method & constant pool cache
 322   Method* interpreter_frame_method() const;
 323   void interpreter_frame_set_method(Method* method);
 324   Method** interpreter_frame_method_addr() const;
 325   ConstantPoolCache** interpreter_frame_cache_addr() const;
 326   oop* interpreter_frame_mirror_addr() const;
 327 
 328   void interpreter_frame_set_mirror(oop mirror);
 329 
 330  public:
 331   // Entry frames
 332   JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); }
 333   JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const;
 334   JavaCallWrapper** entry_frame_call_wrapper_addr() const;
 335   intptr_t* entry_frame_argument_at(int offset) const;
 336 
 337   // tells whether there is another chunk of Delta stack above
 338   bool entry_frame_is_first() const;
 339 
 340   // Compiled frames:
 341 
 342  public:
 343   // Given the index of a local, and the number of argument words
 344   // in this stack frame, tell which word of the stack frame to find
 345   // the local in.  Arguments are stored above the ofp/rpc pair,
 346   // while other locals are stored below it.
 347   // Since monitors (BasicLock blocks) are also assigned indexes,
 348   // but may have different storage requirements, their presence
 349   // can also affect the calculation of offsets.
 350   static int local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors);
 351 
 352   // Given the index of a monitor, etc., tell which word of the
 353   // stack frame contains the start of the BasicLock block.
 354   // Note that the local index by convention is the __higher__
 355   // of the two indexes allocated to the block.
 356   static int monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors);
 357 
 358   // Tell the smallest value that local_offset_for_compiler will attain.
 359   // This is used to help determine how much stack frame to allocate.
 360   static int min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors);
 361 
 362   // Tells if this register must be spilled during a call.
 363   // On Intel, all registers are smashed by calls.
 364   static bool volatile_across_calls(Register reg);
 365 
 366 
 367   // Safepoints
 368 
 369  public:
 370   oop saved_oop_result(RegisterMap* map) const;
 371   void set_saved_oop_result(RegisterMap* map, oop obj);
 372 
 373   // For debugging
 374  private:
 375   const char* print_name() const;
 376 
 377   void describe_pd(FrameValues& values, int frame_no);
 378 
 379  public:
 380   void print_value() const { print_value_on(tty,NULL); }
 381   void print_value_on(outputStream* st, JavaThread *thread) const;
 382   void print_on(outputStream* st) const;
 383   void interpreter_frame_print_on(outputStream* st) const;
 384   void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
 385   static void print_C_frame(outputStream* st, char* buf, int buflen, address pc);
 386 


 398   void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f);
 399 
 400   // Iteration of oops
 401   void oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache);
 402   void oops_entry_do(OopClosure* f, const RegisterMap* map);
 403   void oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* map);
 404   int adjust_offset(Method* method, int index); // helper for above fn
 405  public:
 406   // Memory management
 407   void oops_do(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cf, map, true); }
 408   void nmethods_do(CodeBlobClosure* cf);
 409 
 410   // RedefineClasses support for finding live interpreted methods on the stack
 411   void metadata_do(void f(Metadata*));
 412 
 413   // Verification
 414   void verify(const RegisterMap* map);
 415   static bool verify_return_pc(address x);
 416   // Usage:
 417   // assert(frame::verify_return_pc(return_address), "must be a return pc");
 418 
 419   int pd_oop_map_offset_adjustment() const;
 420 
 421   NOT_PRODUCT(void pd_ps();)  // platform dependent frame printing
 422 
 423 #include CPU_HEADER(frame)
 424 
 425 };
 426 
 427 #ifndef PRODUCT
 428 // A simple class to describe a location on the stack
 429 class FrameValue VALUE_OBJ_CLASS_SPEC {
 430  public:
 431   intptr_t* location;
 432   char* description;
 433   int owner;
 434   int priority;
 435 
 436   FrameValue() {
 437     location = NULL;
 438     description = NULL;
 439     owner = -1;




 320  public:
 321   // Method & constant pool cache
 322   Method* interpreter_frame_method() const;
 323   void interpreter_frame_set_method(Method* method);
 324   Method** interpreter_frame_method_addr() const;
 325   ConstantPoolCache** interpreter_frame_cache_addr() const;
 326   oop* interpreter_frame_mirror_addr() const;
 327 
 328   void interpreter_frame_set_mirror(oop mirror);
 329 
 330  public:
 331   // Entry frames
 332   JavaCallWrapper* entry_frame_call_wrapper() const { return *entry_frame_call_wrapper_addr(); }
 333   JavaCallWrapper* entry_frame_call_wrapper_if_safe(JavaThread* thread) const;
 334   JavaCallWrapper** entry_frame_call_wrapper_addr() const;
 335   intptr_t* entry_frame_argument_at(int offset) const;
 336 
 337   // tells whether there is another chunk of Delta stack above
 338   bool entry_frame_is_first() const;
 339 



























 340   // Safepoints
 341 
 342  public:
 343   oop saved_oop_result(RegisterMap* map) const;
 344   void set_saved_oop_result(RegisterMap* map, oop obj);
 345 
 346   // For debugging
 347  private:
 348   const char* print_name() const;
 349 
 350   void describe_pd(FrameValues& values, int frame_no);
 351 
 352  public:
 353   void print_value() const { print_value_on(tty,NULL); }
 354   void print_value_on(outputStream* st, JavaThread *thread) const;
 355   void print_on(outputStream* st) const;
 356   void interpreter_frame_print_on(outputStream* st) const;
 357   void print_on_error(outputStream* st, char* buf, int buflen, bool verbose = false) const;
 358   static void print_C_frame(outputStream* st, char* buf, int buflen, address pc);
 359 


 371   void oops_interpreted_arguments_do(Symbol* signature, bool has_receiver, OopClosure* f);
 372 
 373   // Iteration of oops
 374   void oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache);
 375   void oops_entry_do(OopClosure* f, const RegisterMap* map);
 376   void oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* map);
 377   int adjust_offset(Method* method, int index); // helper for above fn
 378  public:
 379   // Memory management
 380   void oops_do(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cf, map, true); }
 381   void nmethods_do(CodeBlobClosure* cf);
 382 
 383   // RedefineClasses support for finding live interpreted methods on the stack
 384   void metadata_do(void f(Metadata*));
 385 
 386   // Verification
 387   void verify(const RegisterMap* map);
 388   static bool verify_return_pc(address x);
 389   // Usage:
 390   // assert(frame::verify_return_pc(return_address), "must be a return pc");


 391 
 392   NOT_PRODUCT(void pd_ps();)  // platform dependent frame printing
 393 
 394 #include CPU_HEADER(frame)
 395 
 396 };
 397 
 398 #ifndef PRODUCT
 399 // A simple class to describe a location on the stack
 400 class FrameValue VALUE_OBJ_CLASS_SPEC {
 401  public:
 402   intptr_t* location;
 403   char* description;
 404   int owner;
 405   int priority;
 406 
 407   FrameValue() {
 408     location = NULL;
 409     description = NULL;
 410     owner = -1;


< prev index next >