perf.h
ubixos/times.h
ubixos/types.h
sys/_types.h
src/sys/include/net/arch/perf.h
ubixos/times.h
PERF_START
PERF_STOP
x
void void perf_init (char *fname) perf_init char * fname
void void perf_print (unsigned long c1l, unsigned long c1h, unsigned long c2l, unsigned long c2h, char *key) perf_print unsigned long c1l unsigned long c1h unsigned long c2l unsigned long c2h char * key
void void perf_print_times (struct tms *start, struct tms *end, char *key) perf_print_times struct tms * start struct tms * end char * key

    /*
    *Copyright(c)2001,SwedishInstituteofComputerScience.
    *Allrightsreserved.
    *
    *Redistributionanduseinsourceandbinaryforms,withorwithout
    *modification,arepermittedprovidedthatthefollowingconditions
    *aremet:
    *1.Redistributionsofsourcecodemustretaintheabovecopyright
    *notice,thislistofconditionsandthefollowingdisclaimer.
    *2.Redistributionsinbinaryformmustreproducetheabovecopyright
    *notice,thislistofconditionsandthefollowingdisclaimerinthe
    *documentationand/orothermaterialsprovidedwiththedistribution.
    *3.NeitherthenameoftheInstitutenorthenamesofitscontributors
    *maybeusedtoendorseorpromoteproductsderivedfromthissoftware
    *withoutspecificpriorwrittenpermission.
    *
    *THISSOFTWAREISPROVIDEDBYTHEINSTITUTEANDCONTRIBUTORS``ASIS''AND
    *ANYEXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THE
    *IMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSE
    *AREDISCLAIMED.INNOEVENTSHALLTHEINSTITUTEORCONTRIBUTORSBELIABLE
    *FORANYDIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,ORCONSEQUENTIAL
    *DAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODS
    *ORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    *HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICT
    *LIABILITY,ORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAY
    *OUTOFTHEUSEOFTHISSOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOF
    *SUCHDAMAGE.
    *
    *ThisfileispartofthelwIPTCP/IPstack.
    *
    *Author:AdamDunkels<adam@sics.se>
    *
    *$Id: perf_8h.xml 88 2016-01-12 00:11:29Z reddawg $
    */
    #ifndef__ARCH_PERF_H__
    #define__ARCH_PERF_H__

    #include<ubixos/times.h>

    #ifdefPERF
    #definePERF_START{\
    unsignedlong__c1l,__c1h,__c2l,__c2h;\
    __asm__(".byte0x0f,0x31":"=a"(__c1l),"=d"(__c1h))
    #definePERF_STOP(x)__asm__(".byte0x0f,0x31":"=a"(__c2l),"=d"(__c2h));\
    perf_print(__c1l,__c1h,__c2l,__c2h,x);}

    /*#definePERF_STARTdo{\
    structtms__perf_start,__perf_end;\
    times(&__perf_start)
    #definePERF_STOP(x)times(&__perf_end);\
    perf_print_times(&__perf_start,&__perf_end,x);\
    }while(0)*/
    #else/*PERF*/
    #definePERF_START/*nulldefinition*/
    #definePERF_STOP(x)/*nulldefinition*/
    #endif/*PERF*/

    voidperf_print(unsignedlongc1l,unsignedlongc1h,
    unsignedlongc2l,unsignedlongc2h,
    char*key);

    voidperf_print_times(structtms*start,structtms*end,char*key);

    voidperf_init(char*fname);

    #endif/*__ARCH_PERF_H__*/