summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/parser/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/parser/Parser.cpp')
-rw-r--r--JavaScriptCore/parser/Parser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/JavaScriptCore/parser/Parser.cpp b/JavaScriptCore/parser/Parser.cpp
index 96f4ae6..da47ab2 100644
--- a/JavaScriptCore/parser/Parser.cpp
+++ b/JavaScriptCore/parser/Parser.cpp
@@ -35,10 +35,17 @@ 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
m_sourceElements = 0;
int defaultErrLine;
@@ -65,6 +72,9 @@ void Parser::parse(JSGlobalData* globalData, int* errLine, UString* errMsg)
*errMsg = "Parse error";
m_sourceElements = 0;
}
+#ifdef ANDROID_INSTRUMENT
+ android::TimeCounter::record(android::TimeCounter::JavaScriptParseTimeCounter, __FUNCTION__);
+#endif
}
void Parser::reparseInPlace(JSGlobalData* globalData, FunctionBodyNode* functionBodyNode)