diff options
Diffstat (limited to 'JavaScriptCore')
-rw-r--r-- | JavaScriptCore/parser/Parser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/JavaScriptCore/parser/Parser.cpp b/JavaScriptCore/parser/Parser.cpp index 886a513..6c22687 100644 --- a/JavaScriptCore/parser/Parser.cpp +++ b/JavaScriptCore/parser/Parser.cpp @@ -35,10 +35,18 @@ using std::auto_ptr; extern int jscyyparse(void*); #endif +#ifdef ANDROID_INSTRUMENT +#include "TimeCounter.h" +#endif + namespace JSC { void Parser::parse(JSGlobalData* globalData, int* errLine, UString* errMsg) { +#ifdef ANDROID_INSTRUMENT + android::TimeCounter::start(android::TimeCounter::JavaScriptParseTimeCounter); +#endif + ASSERT(!m_sourceElements); int defaultErrLine; @@ -66,6 +74,9 @@ void Parser::parse(JSGlobalData* globalData, int* errLine, UString* errMsg) *errMsg = "Parse error"; m_sourceElements.clear(); } +#ifdef ANDROID_INSTRUMENT + android::TimeCounter::record(android::TimeCounter::JavaScriptParseTimeCounter, __FUNCTION__); +#endif } void Parser::reparseInPlace(JSGlobalData* globalData, FunctionBodyNode* functionBodyNode) |