Changeset 918


Ignore:
Timestamp:
Feb 16, 2011, 5:57:35 PM (8 years ago)
Author:
lindanl
Message:

Add code clocker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/src/xmlwf_multipass.cpp

    r917 r918  
    77
    88#define BLOCK_SIZE 128
    9 #define SEGMENT_BLOCKS 24
     9#define SEGMENT_BLOCKS 28
    1010#define BUFFER_SIZE (BLOCK_SIZE * SEGMENT_BLOCKS * 1)
    1111#define OVERLAP_BUFSIZE 16
     
    5252#elif CODE_CLOCKER
    5353        #define NUM_EVENTS 1
    54         int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
    55         //int Events[NUM_EVENTS] = {PAPI_L2_DCM};
    56         //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
     54//      int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
     55        int Events[NUM_EVENTS] = {PAPI_VEC_INS};
     56//      int Events[NUM_EVENTS] = {PAPI_L1_DCM};
     57//      int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
    5758        int cal_size = 20;
     59#if PASS == TOTAL
    5860        CC * parser_timer = new CC(Events,NUM_EVENTS,cal_size);
     61#endif
     62#if PASS == S2P
     63        CC * s2p_timer = new CC(Events,NUM_EVENTS,cal_size);
     64#endif
     65#if PASS == CLASSIFY
     66        CC * classify_timer = new CC(Events,NUM_EVENTS,cal_size);
     67#endif
     68#if PASS == SCOPE
     69        CC * scope_timer = new CC(Events,NUM_EVENTS,cal_size);
     70#endif
     71#if PASS == CTCDPI
     72        CC * CtCDPI_timer = new CC(Events,NUM_EVENTS,cal_size);
     73#endif
     74#if PASS == TAGS
     75        CC * tags_timer = new CC(Events,NUM_EVENTS,cal_size);
     76#endif
     77#if PASS == REFS
     78        CC * refs_timer = new CC(Events,NUM_EVENTS,cal_size);
     79#endif
     80#if PASS == VALIDATE
     81        CC * validate_timer = new CC(Events,NUM_EVENTS,cal_size);
     82#endif
     83#if PASS == CHECK
     84        CC * check_timer = new CC(Events,NUM_EVENTS,cal_size);
     85#endif
     86#if PASS == POSTPROCESS
     87        CC * postprocess_timer = new CC(Events,NUM_EVENTS,cal_size);
     88#endif
    5989#else
    6090        void * parser_timer;
     
    12191249
    12201250//      PERF_SEC_BIND(1);
    1221 
     1251#if PASS == TOTAL
    12221252        PERF_SEC_INIT(parser_timer);
     1253#endif
     1254#if PASS == S2P
    12231255        PERF_SEC_INIT(s2p_timer);
     1256#endif
     1257#if PASS == CLASSIFY
    12241258        PERF_SEC_INIT(classify_timer);
     1259#endif
     1260#if PASS == SCOPE
    12251261        PERF_SEC_INIT(scope_timer);
     1262#endif
     1263#if PASS == TAGS
     1264        PERF_SEC_INIT(tags_timer);
     1265#endif
     1266#if PASS == CTCDPI
     1267        PERF_SEC_INIT(CtCDPI_timer);
     1268#endif
     1269#if PASS == REFS
     1270        PERF_SEC_INIT(refs_timer);
     1271#endif
     1272#if PASS == VALIDATE
     1273        PERF_SEC_INIT(validate_timer);
     1274#endif
     1275#if PASS == CHECK
     1276        PERF_SEC_INIT(check_timer);
     1277#endif
     1278#if PASS == POSTPROCESS
    12261279        PERF_SEC_INIT(postprocess_timer);
    1227         PERF_SEC_INIT(tags_timer);
    1228         PERF_SEC_INIT(CtCDPI_timer);
    1229         PERF_SEC_INIT(refs_timer);
    1230         PERF_SEC_INIT(check_timer);
    1231         PERF_SEC_INIT(validate_timer);
     1280#endif
    12321281
    12331282        do_process(infile, outfile);
     
    12731322#endif
    12741323
     1324
     1325#if PASS == TOTAL
     1326        parser_timer->display_raw_data();
    12751327        PERF_SEC_DESTROY(parser_timer);
     1328#endif
     1329#if PASS == S2P
    12761330        PERF_SEC_DESTROY(s2p_timer);
     1331#endif
     1332#if PASS == CLASSIFY
    12771333        PERF_SEC_DESTROY(classify_timer);
     1334#endif
     1335#if PASS == SCOPE
    12781336        PERF_SEC_DESTROY(scope_timer);
     1337#endif
     1338#if PASS == TAGS
     1339        PERF_SEC_DESTROY(tags_timer);
     1340#endif
     1341#if PASS == CTCDPI
     1342        PERF_SEC_DESTROY(CtCDPI_timer);
     1343#endif
     1344#if PASS == REFS
     1345        PERF_SEC_DESTROY(refs_timer);
     1346#endif
     1347#if PASS == VALIDATE
     1348        PERF_SEC_DESTROY(validate_timer);
     1349#endif
     1350#if PASS == CHECK
     1351        PERF_SEC_DESTROY(check_timer);
     1352#endif
     1353#if PASS == POSTPROCESS
    12791354        PERF_SEC_DESTROY(postprocess_timer);
    1280         PERF_SEC_DESTROY(CtCDPI_timer);
    1281         PERF_SEC_DESTROY(refs_timer);
    1282         PERF_SEC_DESTROY(check_timer);
    1283         PERF_SEC_DESTROY(validate_timer);
    1284         PERF_SEC_DESTROY(tags_timer);
     1355#endif
    12851356
    12861357        fclose(infile);
Note: See TracChangeset for help on using the changeset viewer.