Changeset 479 for proto/Compiler


Ignore:
Timestamp:
Jul 13, 2010, 2:40:50 PM (9 years ago)
Author:
ksherdy
Message:

Update template.c to provide code clocker support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/p-workspace/template.c

    r446 r479  
    1111typedef SIMD_type BitBlock;
    1212
    13 #define BUFFER_PROFILING
    14 #include "perfsec.h"
     13#if (defined(BUFFER_PROFILING) || defined(CODE_CLOCKER))
     14  #include "perfsec.h"
     15#endif
    1516
    1617#ifdef BUFFER_PROFILING
    17 BOM_Table * parser_timer;
     18  BOM_Table * parser_timer;
    1819#endif
    1920
     21#ifdef CODE_CLOCKER
     22        #define NUM_EVENTS 1
     23        int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
     24        //int Events[NUM_EVENTS] = {PAPI_L2_DCM};
     25        //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
     26        int cal_size = 20;
     27        CC * parser_timer = new CC(Events,NUM_EVENTS,cal_size);
     28#endif
    2029
    2130#define s2p_step(s0,s1,hi_mask,shift,p0,p1)  \
     
    200209        PERF_SEC_DUMP(parser_timer);
    201210
     211        PERF_SEC_DESTROY(parser_timer);
     212       
    202213        fclose(infile);
    203214        fclose(outfile);
Note: See TracChangeset for help on using the changeset viewer.