summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-06-26 14:06:35 -0700
committerGrace Kloba <klobag@google.com>2009-06-26 14:06:35 -0700
commitdac9d5be4c497a51b6e083bc9b232977d8e195c1 (patch)
treed0ffa8c15e38475b1fb61133ab609349d75579c2 /JavaScriptCore
parent14d2a338a0dd9fe7f2e7833ce90aed2f6eef6e34 (diff)
downloadexternal_webkit-dac9d5be4c497a51b6e083bc9b232977d8e195c1.zip
external_webkit-dac9d5be4c497a51b6e083bc9b232977d8e195c1.tar.gz
external_webkit-dac9d5be4c497a51b6e083bc9b232977d8e195c1.tar.bz2
Add JavaScript parsing into instrumentation. Also modify css parsing calculations.
Diffstat (limited to 'JavaScriptCore')
-rw-r--r--JavaScriptCore/parser/Parser.cpp11
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)