Changeset 133 for trunk/src/engine.c


Ignore:
Timestamp:
May 5, 2008, 6:02:00 PM (11 years ago)
Author:
cameron
Message:

PAPI instrumentation of various parabix components.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine.c

    r132 r133  
    186186template <CodeUnit_Base C>
    187187inline void ParsingEngine<C>::AdvanceBuffers(int preserve_pos){
     188#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == ADVANCE_BUFFERS)
     189        code_clocker->cc_start_interval();
     190#endif
    188191
    189192        int advance_amt = min(preserve_pos, text_or_markup_start) - buffer_base_pos;
     
    194197        buffer_limit_pos = min(BUFFER_SIZE, byteplex->units_in_buffer);
    195198        int blocks_in_buffer = (buffer_limit_pos + BLOCKSIZE - 1)/BLOCKSIZE;
     199#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BYTEPLEX)
     200        code_clocker->cc_start_interval();
     201#endif
    196202        byteplex->DoByteplex();
    197203        byteplex->PreparePseudoASCII_Stream();
     204#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BYTEPLEX)
     205        code_clocker->cc_end_interval(buffer_limit_pos);
     206#endif
     207#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BITPLEX)
     208        code_clocker->cc_start_interval();
     209#endif
    198210        bitplex->TransposeToBitStreams(byteplex->x8data, blocks_in_buffer);
    199         lexer->AnalyzeBuffer(bitplex->x8basis, buffer_base_pos, buffer_rel_pos, buffer_limit_pos);
     211#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BITPLEX)
     212        code_clocker->cc_end_interval(buffer_limit_pos);
     213#endif
     214        lexer->AnalyzeBuffer(bitplex->x8basis, buffer_base_pos, buffer_rel_pos, buffer_limit_pos);
     215#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == ADVANCE_BUFFERS)
     216        code_clocker->cc_end_interval(buffer_limit_pos);
     217#endif
     218
    200219}
    201220
     
    235254#ifndef OMIT_BITBUFFER_LIMIT_TEST_IN_ADVANCE
    236255  if (buffer_rel_pos >= BUFFER_SIZE) {
     256       
    237257        FinalizeBuffer_action(preserve_pos);
    238258        AdvanceBuffers(preserve_pos);
Note: See TracChangeset for help on using the changeset viewer.