aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-07-27 15:33:43 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-08-04 13:34:17 +0000
commite77e9dc2c32edd0f7c437df48fc40c9b6a2a03cc (patch)
tree48c31d513cadf394a2a87e6d11b2b7bdb7ffe98f /src/qml/jsruntime
parentef0b5349fb94c5134dc570ca26c30050a3277553 (diff)
Profile eval() and global script execution
Change-Id: If2d71a74e836a5f689567a0230a8d4d9fc339f91 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp3
-rw-r--r--src/qml/jsruntime/qv4script.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index 2603c09b47..ec7b9b3f7d 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -37,6 +37,7 @@
#include "qv4context_p.h"
#include "qv4function_p.h"
#include "qv4debugging_p.h"
+#include "qv4profiling_p.h"
#include "qv4script_p.h"
#include "qv4scopedvalue_p.h"
#include "qv4string_p.h"
@@ -380,7 +381,7 @@ ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) const
ctx->d()->strictMode = false;
ctx->d()->compilationUnit = function->compilationUnit;
- return function->code(ctx->engine(), function->codeData);
+ return Q_V4_PROFILE(ctx->engine(), function);
}
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 576488275e..0bf4f21acb 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -37,6 +37,7 @@
#include "qv4function_p.h"
#include "qv4context_p.h"
#include "qv4debugging_p.h"
+#include "qv4profiling_p.h"
#include "qv4scopedvalue_p.h"
#include <private/qqmljsengine_p.h>
@@ -293,7 +294,7 @@ ReturnedValue Script::run()
scope->d()->lookups = vmFunction->compilationUnit->runtimeLookups;
scope->d()->compilationUnit = vmFunction->compilationUnit;
- return vmFunction->code(engine, vmFunction->codeData);
+ return Q_V4_PROFILE(engine, vmFunction);
} else {
Scoped<QmlContextWrapper> qmlObj(valueScope, qml.value());
ScopedFunctionObject f(valueScope, engine->memoryManager->alloc<QmlBindingWrapper>(scope, vmFunction, qmlObj));