Changeset 2550


Ignore:
Timestamp:
Oct 24, 2012, 1:49:46 PM (6 years ago)
Author:
ksherdy
Message:

Updated project with PAPI support.

Location:
proto/u8u16
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/u8u16/pablo_template.cpp

    r1824 r2550  
    2121
    2222// Profiling
    23 #if (defined(BUFFER_PROFILING) || defined(CODE_CLOCKER))
     23#if (defined(BUFFER_PROFILING) || defined(PAPI))
    2424  #include "../lib/perflib/perfsec.h"
    2525#endif
    2626
    2727#ifdef BUFFER_PROFILING
    28 BOM_Table * transcode_timer;
     28    BOM_Table * transcode_timer;
     29#elif PAPI
     30                #define PAPI_EVENTS_COUNT 2
     31                int PAPI_EVENTS[PAPI_EVENTS_COUNT] = {PAPI_TOT_CYC, PAPI_BR_MSP};       
     32    CC * transcode_timer;
     33#else
     34    void * transcode_timer;
    2935#endif
    3036
    31 #define SEGMENT_BLOCKS 10
    32 
    33 #ifdef CODE_CLOCKER
    34         #define NUM_EVENTS 1
    35         int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
    36         //int Events[NUM_EVENTS] = {PAPI_L2_DCM};
    37         //int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
    38         int cal_size = 20;
    39         CC * transcode_timer = new CC(Events,NUM_EVENTS,cal_size);
    40 #endif
    4137
    4238/*===========================================================================*/
  • proto/u8u16/src/Makefile

    r1592 r2550  
    1818ifeq ($(ARCH),32)
    1919    AFLAGS=-march=pentium4
    20     CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
     20    PAPI=-I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi -DPAPI -I../lib/cclib -Ilib/cclib
    2121else
    2222    AFLAGS=-march=nocona -m64
    23     CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
     23    PAPI=-I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi -DPAPI -Ilib/cclib
    2424endif
    2525
     
    2727        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS)
    2828
    29 code_clocker:   $(SRCFILE)
    30         $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) $(CODE_CLOCKER)
     29papi:   $(SRCFILE)
     30        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) $(PAPI)
    3131
    3232buffer_profiling: $(SRCFILE)
Note: See TracChangeset for help on using the changeset viewer.