Changeset 133 for trunk/src/bitlex.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/bitlex.c

    r130 r133  
    992992        printf("Entered AnalyzeBuffer, buffer_limit_pos = %i\n", buffer_limit_pos);
    993993#endif
     994#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BITLEX_ALL)
     995        code_clocker->cc_start_interval();
     996#endif
    994997        x8basis = basis;
    995998        lexer_base_pos = base_pos; /* for error reporting. */
     
    9971000        buffer_blocks = (buffer_limit_pos + BLOCKSIZE - 1)/BLOCKSIZE;
    9981001        buffer_units = buffer_limit_pos;
    999 #ifdef CODE_CLOCKING
    1000 /*
    1001         start_Interval(char_validation_clocker);
    1002 */
    1003 #endif
     1002#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == CHARSET_VALIDATION)
     1003        code_clocker->cc_start_interval();
     1004#endif
     1005
    10041006        Do_CharsetValidation();
    10051007        /* Ignore error bits before start_pos which only arise
     
    10161018                CharSetValidationError((char *) entity_Info->encoding, lexer_base_pos + err_pos);
    10171019        }
    1018 #ifdef CODE_CLOCKING
    1019 /*
    1020         end_Interval(char_validation_clocker, buffer_blocks * BLOCKSIZE);
    1021 */
    1022 #endif
    1023 #ifdef CODE_CLOCKING
    1024 /*
    1025         start_Interval(WS_Control_clocker);
    1026 */
     1020#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == CHARSET_VALIDATION)
     1021                code_clocker->cc_end_interval(buffer_units);
     1022#endif
     1023#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == WS_CONTROL)
     1024        code_clocker->cc_start_interval();
    10271025#endif
    10281026
     
    10341032        err_pos = bitstream_scan0(validation_stream);
    10351033        if (err_pos < buffer_units) XMLCharacterError(lexer_base_pos + err_pos);
    1036 #ifdef CODE_CLOCKING
    1037 /*
    1038         end_Interval(WS_Control_clocker, BUFFER_SIZE);
    1039 */
    1040 #endif
    1041 #ifdef CODE_CLOCKING
    1042 /*
    1043         start_Interval(MarkupStreams_clocker);
    1044 */
     1034#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == WS_CONTROL)
     1035        code_clocker->cc_end_interval(buffer_units);
     1036#endif
     1037#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == MARKUP_STREAMS)
     1038        code_clocker->cc_start_interval();
    10451039#endif
    10461040        Do_MarkupStreams();
     1041#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == MARKUP_STREAMS)
     1042        code_clocker->cc_end_interval(buffer_units);
     1043#endif
    10471044#ifdef DEBUG
    10481045        printf("Do_MarkupStreams() complete.\n");
    10491046#endif
    1050 #ifdef CODE_CLOCKING
    1051 /*
    1052         end_Interval(MarkupStreams_clocker, BUFFER_SIZE);
    1053 */
    1054 #endif
     1047
    10551048        if (buffer_units < BUFFER_SIZE) {
    10561049                BitBlock final_block_mask =
     
    10631056                }
    10641057        }
    1065 
    1066 }
    1067 
     1058#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BITLEX_ALL)
     1059                code_clocker->cc_end_interval(buffer_units);
     1060#endif
     1061
     1062}
     1063
Note: See TracChangeset for help on using the changeset viewer.