Ignore:
Timestamp:
Sep 14, 2016, 2:56:54 PM (3 years ago)
Author:
nmedfort
Message:

Work on multiplexing and distribution passes + a few AST modification bug fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/icgrep.cpp

    r5154 r5156  
    2121
    2222#include <iostream> // MEEE
     23
     24#ifdef PRINT_TIMING_INFORMATION
     25#include <hrtime.h>
     26#include <util/papi_helper.hpp>
     27#endif
     28
    2329static cl::OptionCategory LegacyGrepOptions("A. Standard Grep Options",
    2430                                       "These are standard grep options intended for compatibility with typical grep usage.");
     
    228234
    229235    if (Threads <= 1) {
     236
     237        #ifdef PRINT_TIMING_INFORMATION
     238        // PAPI_RES_STL, PAPI_STL_CCY, PAPI_FUL_CCY, PAPI_MEM_WCY
     239        // PAPI_RES_STL, PAPI_BR_MSP, PAPI_LST_INS, PAPI_L1_TCM
     240        papi::PapiCounter<4> papiCounters({PAPI_RES_STL, PAPI_STL_CCY, PAPI_FUL_CCY, PAPI_MEM_WCY});
     241        #endif
    230242        for (unsigned i = 0; i != inputFiles.size(); ++i) {
     243            #ifdef PRINT_TIMING_INFORMATION
     244            papiCounters.start();
     245            const timestamp_t execution_start = read_cycle_counter();
     246            #endif
    231247            grepEngine.doGrep(inputFiles[i], i, CountOnly, total_CountOnly, UTF_16);
     248            #ifdef PRINT_TIMING_INFORMATION
     249            const timestamp_t execution_end = read_cycle_counter();
     250            papiCounters.stop();
     251            std::cerr << "EXECUTION TIME: " << inputFiles[i] << ":" << "CYCLES|" << (execution_end - execution_start) << papiCounters << std::endl;
     252            #endif
    232253        }       
    233254    } else if (Threads > 1) {
Note: See TracChangeset for help on using the changeset viewer.