Ignore:
Timestamp:
Dec 15, 2011, 12:38:09 AM (8 years ago)
Author:
vla24
Message:

Added some code to support performance tests using PAPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/SymbolTable/symtab_pbgs_div_template.cpp

    r1721 r1786  
    1010#elif CODE_CLOCKER
    1111        #define NUM_EVENTS 1
    12         int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
    13         //int Events[NUM_EVENTS] = {PAPI_L2_DCM};
    14         //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
     12        //      int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
     13//              int Events[NUM_EVENTS] = {PAPI_L2_DCM};
     14                int Events[NUM_EVENTS] = {PAPI_L1_DCM};
     15//              int Events[NUM_EVENTS] = {PAPI_BR_MSP};
    1516        int cal_size = 20;
    1617        CC * parser_timer = new CC(Events,NUM_EVENTS,cal_size);
     
    353354      matcher.Advance_buffer();
    354355      tracker.Advance_buffer();
    355       PERF_SEC_END(parser_timer, chars_avail);
     356#ifndef CACHE_PERF
     357    PERF_SEC_END(parser_timer, chars_avail);
     358#else
     359    PERF_SEC_END(parser_timer, 1);
     360#endif
    356361
    357362      int bytes_left = chars_read - chars_avail;
     
    393398    matcher.Advance_buffer();
    394399    tracker.Advance_buffer();
    395 
     400#ifndef CACHE_PERF
    396401    PERF_SEC_END(parser_timer, chars_avail);
     402#else
     403    PERF_SEC_END(parser_timer, 1);
     404#endif
    397405    if (matcher.depth != 0) {
    398406      fprintf(stderr, "tag matching error (depth %i) at position %i\n", matcher.depth, buffer_base);
Note: See TracChangeset for help on using the changeset viewer.