Changeset 2548


Ignore:
Timestamp:
Oct 24, 2012, 1:32:15 PM (7 years ago)
Author:
ksherdy
Message:

Updated JSON project. Migration to IDISA library needed.

Location:
proto/JSON
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • proto/JSON/json_pablo_template.c

    r1467 r2548  
    66#include <sys/stat.h>
    77
    8 #include "../lib/lib_simd.h"
    98#include "../lib/perflib/perfsec.h"
    109#include "../lib/s2p.h"
     
    1817
    1918#ifdef BUFFER_PROFILING
    20         BOM_Table * perf_timer;
    21 #elif 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 * perf_timer = new CC(Events,NUM_EVENTS,cal_size);
     19    BOM_Table * parser_timer;
     20#elif PAPI
     21                #define PAPI_EVENTS_COUNT 2
     22                int PAPI_EVENTS[PAPI_EVENTS_COUNT] = {PAPI_TOT_CYC, PAPI_BR_MSP};       
     23    CC * parser_timer;
    2824#else
    29         void * perf_timer;
     25    void * parser_timer;
    3026#endif
    3127
     
    7672        while(1) {
    7773
    78                 PERF_SEC_START(perf_timer);
     74                PERF_SEC_START(parser_timer);
    7975
    8076                while (chars_avail >= BLOCK_SIZE) { /* process full blocks */
     
    194190                }
    195191
    196                 PERF_SEC_END(perf_timer, chars_avail);
     192                PERF_SEC_END(parser_timer, chars_avail);
    197193
    198194                buf_pos += chars_read;
     
    237233        // PERF_SEC_BIND(1);
    238234
    239         PERF_SEC_INIT(perf_timer);
     235        PERF_SEC_INIT(parser_timer);
    240236
    241237        do_process(infile, outfile);
    242238
    243         PERF_SEC_DUMP(perf_timer);
    244 
    245         PERF_SEC_DESTROY(perf_timer);
     239        PERF_SEC_DUMP(parser_timer);
     240
     241        PERF_SEC_DESTROY(parser_timer);
    246242
    247243        fclose(infile);
  • proto/JSON/src/Makefile

    r791 r2548  
    11SRCFILE=json.c
    2 PYBIT_SRCFILE=pybit_json.c
    32PABLO_SRCFILE=pablo_json.c
    43
    54OUTFILE=json
    6 PYBIT_OUTFILE=pybit_json
     5
    76PABLO_OUTFILE=pablo_json
    87
     
    2019
    2120PAPI_DIR=/usr/local/papi
     21
    2222ARCH=$(shell getconf LONG_BIT)
    2323ifeq ($(ARCH),32)
    2424    AFLAGS=-march=pentium4
    25     CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
     25    PAPI=-I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi -DPAPI -Ilib/cclib
    2626else
    2727    AFLAGS=-march=nocona -m64
    28     CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
     28    PAPI=-I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi -DPAPI -Ilib/cclib
    2929endif
    30 
    31 pybit:  $(PYBIT_SRCFILE)
    32         $(CC) -o $(PYBIT_OUTFILE) $(PYBIT_SRCFILE) $(AFLAGS)
    3330
    3431pablo:  $(PABLO_SRCFILE)
    3532        $(CC) -o $(PABLO_OUTFILE) $(PABLO_SRCFILE) $(AFLAGS)
    36 
    37 all:    $(SRCFILE)
    38         $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS)
    39 
    40 asm:  $(SRCFILE)
    41         $(CC) -o $(OUTFILE).s $(SRCFILE) $(AFLAGS) -S -fverbose-asm
    42        
    43 as: $(OUTFILE).s
    44         as $(OUTFILE).s -o $(OUTFILE).o
    45        
    46 as.o: $(OUTFILE).o
    47         $(CC) $(OUTFILE).o -o $(OUTFILE)       
    48 
    49 test: $(SRCFILE)
    50         python $(TEST)
    5133
    5234clean: 
Note: See TracChangeset for help on using the changeset viewer.