Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

CpuStack Class Reference

Stack for CPU profiling purposes. More...

#include <cpuStack.h>

List of all members.

Public Methods

 CpuStack ()
 Default constructor.

 ~CpuStack ()
 Destructor.

void push (JVMPI_CallFrame &callFrame, jlong entryTime)
 Pushes method call on the stack. More...

void pop (jlong exitTime, jlong &totalTime, jlong &pureTime)
 Bills the cost of a top method and pops it from the stack. More...

int getTopCallTrace (int maxFrames, JVMPI_CallFrame *frames) const
 Gets top call trace. More...


Private Methods

void grow ()
 Grows the stack.


Private Attributes

Framestack
 stack array.

long size
 stack size.

long top
 top stack index.


Detailed Description

Stack for CPU profiling purposes.

Essentially this class represents an image of a thread call stack and serves for recording method entry times and other information needed for computing of method total and pure time consumation. The events JVMPI_EVENT_METHOD_ENTRY and JVMPI_EVENT_METHOD_EXIT are used to update the stack in an obvious way.

See also:
Thread
Author:
Petr Luner

Definition at line 52 of file cpuStack.h.


Member Function Documentation

int CpuStack::getTopCallTrace int    maxFrames,
JVMPI_CallFrame *    frames
const
 

Gets top call trace.

Parameters:
maxFrames  maximum frames to return
frames  buffer for returned frames
Returns:
number of frames returned

Definition at line 58 of file cpuStack.cpp.

void CpuStack::pop jlong    exitTime,
jlong &    totalTime,
jlong &    pureTime
 

Bills the cost of a top method and pops it from the stack.

Parameters:
exitTime  top method exit time
totalTime  total time consumed by top method
pureTime  pure time consumed by top method

Definition at line 51 of file cpuStack.cpp.

void CpuStack::push JVMPI_CallFrame &    callFrame,
jlong    entryTime
 

Pushes method call on the stack.

Parameters:
callFrame  JVMPI method call frame
entryTime  time of method entry

Definition at line 42 of file cpuStack.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Jan 28 14:53:28 2002 for Java Profiler Dynamic Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001