FileDocCategorySizeDatePackage
Call.javaAPI DocAndroid 1.5 API3669Wed May 06 22:41:10 BST 2009com.android.traceview

Call

public class Call extends Object implements TimeLineView.Block

Fields Summary
private static final int
METHOD_ACTION_MASK
private static final int
IS_RECURSIVE
private int
mThreadId
private int
mFlags
MethodData
mMethodData
long
mThreadStartTime
0-based thread-local start time
long
mGlobalStartTime
global start time
long
mGlobalEndTime
global end time
private String
mName
Constructors Summary
Call(String name, MethodData methodData)
This constructor is used for the root of a Call tree. The name is the name of the corresponding thread.


                              
        
        mName = name;
        mMethodData = methodData;
    
Call()

    
Call(int threadId, MethodData methodData, long time, int methodAction)

        mThreadId = threadId;
        mMethodData = methodData;
        mThreadStartTime = time;
        mFlags = methodAction & METHOD_ACTION_MASK;
        mName = methodData.getProfileName();
    
Methods Summary
public voidaddExclusiveTime(long elapsed)

        mMethodData.addElapsedExclusive(elapsed);
        if ((mFlags & IS_RECURSIVE) == 0) {
            mMethodData.addTopExclusive(elapsed);
        }
    
public voidaddInclusiveTime(long elapsed, com.android.traceview.Call parent)

        boolean isRecursive = (mFlags & IS_RECURSIVE) != 0;
        mMethodData.addElapsedInclusive(elapsed, isRecursive, parent);
    
public doubleaddWeight(int x, int y, double weight)

        return mMethodData.addWeight(x, y, weight);
    
public voidclearWeight()

        mMethodData.clearWeight();
    
public voiddump()

        System.out.printf("%s [%d, %d]\n", mName, mGlobalStartTime, mGlobalEndTime);
    
public org.eclipse.swt.graphics.ColorgetColor()

        return mMethodData.getColor();
    
public longgetEndTime()

        return mGlobalEndTime;
    
intgetMethodAction()

        return mFlags & METHOD_ACTION_MASK;
    
public MethodDatagetMethodData()

        return mMethodData;
    
public java.lang.StringgetName()

        return mName;
    
public longgetStartTime()

        return mGlobalStartTime;
    
intgetThreadId()

        return mThreadId;
    
public booleanisRecursive()

        return (mFlags & IS_RECURSIVE) != 0;
    
public voidset(int threadId, MethodData methodData, long time, int methodAction)

        mThreadId = threadId;
        mMethodData = methodData;
        mThreadStartTime = time;
        mFlags = methodAction & METHOD_ACTION_MASK;
        mName = methodData.getProfileName();
    
public voidsetName(java.lang.String name)

        mName = name;
    
public voidsetRecursive(boolean isRecursive)

        if (isRecursive) {
            mFlags |= IS_RECURSIVE;
        } else {
            mFlags &= ~IS_RECURSIVE;
        }
    
public voidupdateName()

        mName = mMethodData.getProfileName();