< prev index next >

src/hotspot/share/runtime/rframe.hpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_RFRAME_HPP
  26 #define SHARE_VM_RUNTIME_RFRAME_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/frame.inline.hpp"
  30 
  31 // rframes ("recompiler frames") decorate stack frames with some extra information
  32 // needed by the recompiler.  The recompiler views the stack (at the time of recompilation)
  33 // as a list of rframes.
  34 
  35 class RFrame : public ResourceObj {
  36  protected:
  37   const frame _fr;                  // my frame
  38   JavaThread* const _thread;        // thread where frame resides.
  39   RFrame* _caller;                  // caller / callee rframes (or NULL)
  40   RFrame*const _callee;
  41   const int _num;                   // stack frame number (0 = most recent)
  42   int _invocations;                 // current invocation estimate (for this frame)
  43                                     // (i.e., how often was this frame called)
  44   int _distance;                    // recompilation search "distance" (measured in # of interpreted frames)
  45 
  46   RFrame(frame fr, JavaThread* thread, RFrame*const callee);
  47   virtual void init() = 0;          // compute invocations, loopDepth, etc.
  48   void print(const char* name);
  49 




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_RFRAME_HPP
  26 #define SHARE_VM_RUNTIME_RFRAME_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/frame.hpp"
  30 
  31 // rframes ("recompiler frames") decorate stack frames with some extra information
  32 // needed by the recompiler.  The recompiler views the stack (at the time of recompilation)
  33 // as a list of rframes.
  34 
  35 class RFrame : public ResourceObj {
  36  protected:
  37   const frame _fr;                  // my frame
  38   JavaThread* const _thread;        // thread where frame resides.
  39   RFrame* _caller;                  // caller / callee rframes (or NULL)
  40   RFrame*const _callee;
  41   const int _num;                   // stack frame number (0 = most recent)
  42   int _invocations;                 // current invocation estimate (for this frame)
  43                                     // (i.e., how often was this frame called)
  44   int _distance;                    // recompilation search "distance" (measured in # of interpreted frames)
  45 
  46   RFrame(frame fr, JavaThread* thread, RFrame*const callee);
  47   virtual void init() = 0;          // compute invocations, loopDepth, etc.
  48   void print(const char* name);
  49 


< prev index next >