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

Updated JSON project. Migration to IDISA library needed.

File:
1 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);
Note: See TracChangeset for help on using the changeset viewer.