From dac9d5be4c497a51b6e083bc9b232977d8e195c1 Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Fri, 26 Jun 2009 14:06:35 -0700 Subject: Add JavaScript parsing into instrumentation. Also modify css parsing calculations. --- JavaScriptCore/parser/Parser.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'JavaScriptCore') 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) -- cgit v1.1