Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

static int KPRF_NAME() FuncCompareOnTopOfStack ( const void *  pv1,
const void *  pv2 
) [static]

Compares two REPROTFUNC records to determin which has the higher on-stack time.

Definition at line 400 of file prfreader.cpp.h.

References KPRF_TYPE.

Referenced by FuncCompareCallsFrom(), FuncCompareOnTopOfStackAvg(), FuncCompareOnTopOfStackMax(), FuncCompareOnTopOfStackMin(), and WriteHtmlReport().

{
    KPRF_TYPE(PC,FUNC) p1 = (*(KPRF_TYPE(P,REPORTFUNC) *)pv1)->pFunc;
    KPRF_TYPE(PC,FUNC) p2 = (*(KPRF_TYPE(P,REPORTFUNC) *)pv2)->pFunc;
    if (p1->OnTopOfStack.SumTicks > p2->OnTopOfStack.SumTicks)
        return -1;
    if (p1->OnTopOfStack.SumTicks < p2->OnTopOfStack.SumTicks)
        return 1;
    if (p1->OnTopOfStack.MaxTicks > p2->OnTopOfStack.MaxTicks)
        return -1;
    if (p1->OnTopOfStack.MaxTicks < p2->OnTopOfStack.MaxTicks)
        return 1;
    if (p1->OnTopOfStack.MinTicks > p2->OnTopOfStack.MinTicks)
        return -1;
    if (p1->OnTopOfStack.MinTicks < p2->OnTopOfStack.MinTicks)
        return 1;
    if (p1 < p2)
        return -1;
    return 1;
}


Generated by  Doxygen 1.6.0   Back to index