Changeset 480 for proto


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

Update template.c to provide code clocker support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/template.c

    r467 r480  
    1414#include "xmldecl.c"
    1515
    16 #define BUFFER_PROFILING
    17 #include "../lib/perflib/perfsec.h"
     16#if (defined(BUFFER_PROFILING) || defined(CODE_CLOCKER))
     17  #include "../lib/perflib/perfsec.h"
     18#endif
    1819
    1920#ifdef BUFFER_PROFILING
    20 BOM_Table * parser_timer;
     21  BOM_Table * parser_timer;
    2122#endif
    2223
     24#ifdef CODE_CLOCKER
     25        #define NUM_EVENTS 1
     26        int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
     27        //int Events[NUM_EVENTS] = {PAPI_L2_DCM};
     28        //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
     29        int cal_size = 20;
     30        CC * parser_timer = new CC(Events,NUM_EVENTS,cal_size);
     31#endif
    2332
    2433#define s2p_step(s0,s1,hi_mask,shift,p0,p1)  \
     
    239248       
    240249        PERF_SEC_DUMP(parser_timer);
     250       
     251        PERF_SEC_DESTROY(parser_timer);
    241252
    242253        fclose(infile);
Note: See TracChangeset for help on using the changeset viewer.