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_hash_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};
     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};
    1416        //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
    1517        int cal_size = 20;
     
    5355    PERF_SEC_DESTROY(parser_timer);
    5456
     57#if PRINT_SYMBOL_DISTRIBUTION
     58    symbol_table.Print_Symbol_Table_Distribution();
     59#endif
     60
    5561    fclose(infile);
    5662    fclose(outfile);
    57 
    58 #if PRINT_SYMBOL_DISTRIBUTION
    59     print_GIDS(gids);
    60 #endif
    6163    return(0);
    6264}
     
    243245      matcher.Advance_buffer();
    244246      tracker.Advance_buffer();
    245       PERF_SEC_END(parser_timer, chars_avail);
     247
     248#ifndef CACHE_PERF
     249    PERF_SEC_END(parser_timer, chars_avail);
     250#else
     251    PERF_SEC_END(parser_timer, 1);
     252#endif
    246253           
    247254      int bytes_left = chars_read - chars_avail;
     
    287294    matcher.Advance_buffer();
    288295    tracker.Advance_buffer();
    289 
     296#ifndef CACHE_PERF
    290297    PERF_SEC_END(parser_timer, chars_avail);
     298#else
     299    PERF_SEC_END(parser_timer, 1);
     300#endif
    291301    if (matcher.depth != 0) {
    292302      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.