Ignore:
Timestamp:
Jun 28, 2008, 3:21:20 PM (17 years ago)
Author:
Darin Adler
Message:

2008-06-28 Darin Adler <Darin Adler>

Reviewed by Oliver.

  • pcre/pcre_compile.cpp: (jsRegExpCompile): Compile in the string if REGEXP_HISTOGRAM is on.
  • pcre/pcre_exec.cpp: (jsRegExpExecute): Add hook to time execution. (Histogram::~Histogram): Print a sorted list of what took time. (Histogram::add): Accumulate records of what took time. (HistogramTimeLogger::~HistogramTimeLogger): Hook that calls Histogram::add at the right moment and creates the global histogram object.
  • pcre/pcre_internal.h: Define REGEXP_HISTOGRAM.
  • pcre/pcre_tables.cpp: Added missing include of "config.h". Not needed any more, but an omissions an earlier version of this patch detected.
  • pcre/pcre_ucp_searchfuncs.cpp: Ditto.
  • pcre/pcre_xclass.cpp: Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/pcre_internal.h

    r34560 r34858  
    7070#ifndef DFTABLES
    7171
     72// Change the following to 1 to dump used regular expressions at process exit time.
     73#define REGEXP_HISTOGRAM 0
     74
    7275#include "Assertions.h"
    7376
     
    316319#define EXTRACT_BASIC_MAX  100
    317320
    318 /* The index of names and the
    319 code vector run on as long as necessary after the end. We store an explicit
    320 offset to the name table so that if a regex is compiled on one host, saved, and
    321 then run on another where the size of pointers is different, all might still
    322 be well. For the case of compiled-on-4 and run-on-8, we include an extra
    323 pointer that is always NULL.
    324 */
     321/* The code vector runs on as long as necessary after the end. */
    325322
    326323struct JSRegExp {
     
    332329    unsigned short firstByte;
    333330    unsigned short reqByte;
     331
     332#if REGEXP_HISTOGRAM
     333    size_t stringOffset;
     334    size_t stringLength;
     335#endif
    334336};
    335337
Note: See TracChangeset for help on using the changeset viewer.