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_stl_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);
     
    222223
    223224@stream_stmts
    224 
    225225/* Full Buffers */
    226226
    227227    while (chars_avail == BUFFER_SIZE) {
    228228      PERF_SEC_START(parser_timer);
     229
    229230      for (int blk = 0; blk < SEGMENT_BLOCKS; blk++) {
    230231          block_base = blk*BLOCK_SIZE;
     
    236237      matcher.Advance_buffer();
    237238      tracker.Advance_buffer();
    238       PERF_SEC_END(parser_timer, chars_avail);
     239#ifndef CACHE_PERF
     240    PERF_SEC_END(parser_timer, chars_avail);
     241#else
     242    PERF_SEC_END(parser_timer, 1);
     243#endif
    239244           
    240245      int bytes_left = chars_read - chars_avail;
     
    280285    matcher.Advance_buffer();
    281286    tracker.Advance_buffer();
    282 
     287#ifndef CACHE_PERF
    283288    PERF_SEC_END(parser_timer, chars_avail);
     289#else
     290    PERF_SEC_END(parser_timer, 1);
     291#endif
     292
    284293    if (matcher.depth != 0) {
    285294      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.