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

    r1721 r1786  
    1111#elif CODE_CLOCKER
    1212        #define NUM_EVENTS 1
    13         int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
    14         //int Events[NUM_EVENTS] = {PAPI_L2_DCM};
    15         //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
     13//      int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
     14//      int Events[NUM_EVENTS] = {PAPI_L2_DCM};
     15        int Events[NUM_EVENTS] = {PAPI_L1_DCM};
     16//      int Events[NUM_EVENTS] = {PAPI_BR_MSP};
    1617        int cal_size = 20;
    1718        CC * parser_timer = new CC(Events,NUM_EVENTS,cal_size);
     
    7374    PERF_SEC_DESTROY(parser_timer);
    7475
    75     fclose(infile);
    76     fclose(outfile);
    77 
    7876#if PRINT_SYMBOL_DISTRIBUTION
    7977//    print_GIDS();
    8078    pbgs_symbol_table.Print_Symbol_Table_Distribution();
    8179#endif
     80
     81    fclose(infile);
     82    fclose(outfile);
    8283
    8384    return 0;
     
    751752      matcher.Advance_buffer();
    752753      tracker.Advance_buffer();
    753       PERF_SEC_END(parser_timer, chars_avail);
     754#ifndef CACHE_PERF
     755    PERF_SEC_END(parser_timer, chars_avail);
     756#else
     757    PERF_SEC_END(parser_timer, 1);
     758#endif
    754759
    755760      int bytes_left = chars_read - chars_avail;
     
    790795    matcher.Advance_buffer();
    791796    tracker.Advance_buffer();
    792 
     797#ifndef CACHE_PERF
    793798    PERF_SEC_END(parser_timer, chars_avail);
     799#else
     800    PERF_SEC_END(parser_timer, 1);
     801#endif
    794802    if (matcher.depth != 0) {
    795803      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.