Ignore:
Timestamp:
Sep 9, 2010, 7:10:37 PM (15 years ago)
Author:
[email protected]
Message:

2010-09-09 Michael Saboff <[email protected]>

Reviewed by Gavin Barraclough.

Added a regular expression tracing facility. This tracing is connected
to jsc. Every compiled regular expression object is added to a list.
When the process exits, each regular expression dumps its pattern,
JIT address, number of times it was executed and the number of matches.
This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
wtf/Platform.h.
https://bugs.webkit.org/show_bug.cgi?id=45401

  • JavaScriptCore.exp:
  • jsc.cpp: (runWithScripts):
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): (JSC::JSGlobalData::~JSGlobalData): (JSC::JSGlobalData::addRegExpToTrace): (JSC::JSGlobalData::dumpRegExpTrace):
  • runtime/JSGlobalData.h:
  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::create): (JSC::RegExp::match):
  • runtime/RegExp.h:
  • wtf/Platform.h:
  • yarr/RegexJIT.h: (JSC::Yarr::RegexCodeBlock::getAddr):

2010-09-09 Michael Saboff <[email protected]>

Reviewed by Gavin Barraclough.

Added ListHashSet.h as an exported header in support of RegExp tracing.
https://bugs.webkit.org/show_bug.cgi?id=45401

  • ForwardingHeaders/wtf/ListHashSet.h: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExp.h

    r66936 r67146  
    4949        int match(const UString&, int startOffset, Vector<int, 32>* ovector = 0);
    5050        unsigned numSubpatterns() const { return m_numSubpatterns; }
     51       
     52#if ENABLE(REGEXP_TRACING)
     53        void printTraceData();
     54#endif
    5155
    5256    private:
     
    6165        const char* m_constructionError;
    6266        unsigned m_numSubpatterns;
    63        
     67#if ENABLE(REGEXP_TRACING)
     68        unsigned m_rtMatchCallCount;
     69        unsigned m_rtMatchFoundCount;
     70#endif
     71
    6472        OwnPtr<RegExpRepresentation> m_representation;
    6573    };
Note: See TracChangeset for help on using the changeset viewer.