aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4profiling_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-12-01 15:19:25 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2016-12-01 14:51:43 +0000
commit973bace494e6694c90dc3e52f7cb230a7d428ac0 (patch)
tree3a31123064b751f0fcd1ef7fa1bd3f6b3a270b7d /src/qml/jsruntime/qv4profiling_p.h
parent808a30ed11fe4f18758080dc429fce016e27aa8a (diff)
V4: Make the first QML profiling check as quick as possible
In most cases there is no QML profiler attached, so hint the compiler about that. Change-Id: Ied75e58e608ccc689d2a9a1b0bf6e8f65769c94f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4profiling_p.h')
-rw-r--r--src/qml/jsruntime/qv4profiling_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h
index e06cb64a61..d27e853343 100644
--- a/src/qml/jsruntime/qv4profiling_p.h
+++ b/src/qml/jsruntime/qv4profiling_p.h
@@ -86,7 +86,7 @@ QT_END_NAMESPACE
engine->profiler()->trackDealloc(size, type) : false)
#define Q_V4_PROFILE(engine, function)\
- (engine->profiler() &&\
+ (Q_UNLIKELY(engine->profiler()) &&\
(engine->profiler()->featuresEnabled & (1 << Profiling::FeatureFunctionCall)) ?\
Profiling::FunctionCallProfiler::profileCall(engine->profiler(), engine, function) :\
function->code(engine, function->codeData))