hotspot/src/share/vm/runtime/frame.hpp
changeset 25714 87fa6860b5ae
parent 22929 cb114f3238ef
child 25717 7493b8ac31b7
equal deleted inserted replaced
25713:e2ed3bec8c2c 25714:87fa6860b5ae
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   239 
   239 
   240   // Interpreter frames:
   240   // Interpreter frames:
   241 
   241 
   242  private:
   242  private:
   243   intptr_t** interpreter_frame_locals_addr() const;
   243   intptr_t** interpreter_frame_locals_addr() const;
   244   intptr_t*  interpreter_frame_bcx_addr() const;
   244   intptr_t*  interpreter_frame_bcp_addr() const;
   245   intptr_t*  interpreter_frame_mdx_addr() const;
   245   intptr_t*  interpreter_frame_mdp_addr() const;
   246 
   246 
   247  public:
   247  public:
   248   // Locals
   248   // Locals
   249 
   249 
   250   // The _at version returns a pointer because the address is used for GC.
   250   // The _at version returns a pointer because the address is used for GC.
   251   intptr_t* interpreter_frame_local_at(int index) const;
   251   intptr_t* interpreter_frame_local_at(int index) const;
   252 
   252 
   253   void interpreter_frame_set_locals(intptr_t* locs);
   253   void interpreter_frame_set_locals(intptr_t* locs);
   254 
   254 
   255   // byte code index/pointer (use these functions for unchecked frame access only!)
       
   256   intptr_t interpreter_frame_bcx() const                  { return *interpreter_frame_bcx_addr(); }
       
   257   void interpreter_frame_set_bcx(intptr_t bcx);
       
   258 
       
   259   // byte code index
   255   // byte code index
   260   jint interpreter_frame_bci() const;
   256   jint interpreter_frame_bci() const;
   261   void interpreter_frame_set_bci(jint bci);
       
   262 
   257 
   263   // byte code pointer
   258   // byte code pointer
   264   address interpreter_frame_bcp() const;
   259   address interpreter_frame_bcp() const;
   265   void    interpreter_frame_set_bcp(address bcp);
   260   void    interpreter_frame_set_bcp(address bcp);
   266 
       
   267   // Unchecked access to the method data index/pointer.
       
   268   // Only use this if you know what you are doing.
       
   269   intptr_t interpreter_frame_mdx() const                  { return *interpreter_frame_mdx_addr(); }
       
   270   void interpreter_frame_set_mdx(intptr_t mdx);
       
   271 
   261 
   272   // method data pointer
   262   // method data pointer
   273   address interpreter_frame_mdp() const;
   263   address interpreter_frame_mdp() const;
   274   void    interpreter_frame_set_mdp(address dp);
   264   void    interpreter_frame_set_mdp(address dp);
   275 
   265 
   434   void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cld_f, cf, map, true); }
   424   void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf, RegisterMap* map) { oops_do_internal(f, cld_f, cf, map, true); }
   435   void nmethods_do(CodeBlobClosure* cf);
   425   void nmethods_do(CodeBlobClosure* cf);
   436 
   426 
   437   // RedefineClasses support for finding live interpreted methods on the stack
   427   // RedefineClasses support for finding live interpreted methods on the stack
   438   void metadata_do(void f(Metadata*));
   428   void metadata_do(void f(Metadata*));
   439 
       
   440   void gc_prologue();
       
   441   void gc_epilogue();
       
   442   void pd_gc_epilog();
       
   443 
   429 
   444 # ifdef ENABLE_ZAP_DEAD_LOCALS
   430 # ifdef ENABLE_ZAP_DEAD_LOCALS
   445  private:
   431  private:
   446   class CheckValueClosure: public OopClosure {
   432   class CheckValueClosure: public OopClosure {
   447    public:
   433    public:
   475   void zap_dead_deoptimized_locals(JavaThread* thread, const RegisterMap* map);
   461   void zap_dead_deoptimized_locals(JavaThread* thread, const RegisterMap* map);
   476 # endif
   462 # endif
   477   // Verification
   463   // Verification
   478   void verify(const RegisterMap* map);
   464   void verify(const RegisterMap* map);
   479   static bool verify_return_pc(address x);
   465   static bool verify_return_pc(address x);
   480   static bool is_bci(intptr_t bcx);
       
   481   // Usage:
   466   // Usage:
   482   // assert(frame::verify_return_pc(return_address), "must be a return pc");
   467   // assert(frame::verify_return_pc(return_address), "must be a return pc");
   483 
   468 
   484   int pd_oop_map_offset_adjustment() const;
   469   int pd_oop_map_offset_adjustment() const;
   485 
   470