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_ls_template.cpp

    r1777 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);
     
    221222
    222223@stream_stmts
    223 
    224224/* Full Buffers */
    225225    while (chars_avail == BUFFER_SIZE) {
    226226      PERF_SEC_START(parser_timer);
     227
    227228      for (int blk = 0; blk < SEGMENT_BLOCKS; blk++) {
    228229          block_base = blk*BLOCK_SIZE;
     
    234235      matcher.Advance_buffer();
    235236      tracker.Advance_buffer();
    236       PERF_SEC_END(parser_timer, chars_avail);
     237#ifndef CACHE_PERF
     238    PERF_SEC_END(parser_timer, chars_avail);
     239#else
     240    PERF_SEC_END(parser_timer, 1);
     241#endif
    237242
    238243      int bytes_left = chars_read - chars_avail;
     
    281286    ls_symbol_table.bind();
    282287    ls_symbol_table.finalize();
    283 
     288#ifndef CACHE_PERF
    284289    PERF_SEC_END(parser_timer, chars_avail);
     290#else
     291    PERF_SEC_END(parser_timer, 1);
     292#endif
    285293    if (matcher.depth != 0) {
    286294      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.