aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4profiling_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-07 08:10:15 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:18:05 +0000
commitfd221cf6e056b7239fc2fa2faeccd9ddeb542199 (patch)
treea453f21ac01aa01a16a7a4f378ec2ed60e07512f /src/qml/jsruntime/qv4profiling_p.h
parent01c338023a3a604bb24c2efb18d48f9bac33e6bc (diff)
Introduce a JS stack frame that corresponds to the C++ stack frame
The frame currently contains the function itself and the current context. Change-Id: I7d3402627fbc90e860a7bdc277585f365f5b4cb5 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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h
index e7b6909690..adf9853f62 100644
--- a/src/qml/jsruntime/qv4profiling_p.h
+++ b/src/qml/jsruntime/qv4profiling_p.h
@@ -61,7 +61,7 @@
#define Q_V4_PROFILE_ALLOC(engine, size, type) (!engine)
#define Q_V4_PROFILE_DEALLOC(engine, size, type) (!engine)
-#define Q_V4_PROFILE(engine, function) (function->code(function))
+#define Q_V4_PROFILE(engine, function, jsFunction) (function->code(function, jsFunction))
QT_BEGIN_NAMESPACE
@@ -85,11 +85,11 @@ QT_END_NAMESPACE
(engine->profiler()->featuresEnabled & (1 << Profiling::FeatureMemoryAllocation)) ?\
engine->profiler()->trackDealloc(size, type) : false)
-#define Q_V4_PROFILE(engine, function)\
+#define Q_V4_PROFILE(engine, function, jsFunction)\
(Q_UNLIKELY(engine->profiler()) &&\
(engine->profiler()->featuresEnabled & (1 << Profiling::FeatureFunctionCall)) ?\
- Profiling::FunctionCallProfiler::profileCall(engine->profiler(), function) :\
- function->code(function))
+ Profiling::FunctionCallProfiler::profileCall(engine->profiler(), function, jsFunction) :\
+ function->code(function, jsFunction))
QT_BEGIN_NAMESPACE
@@ -279,10 +279,10 @@ public:
profiler->m_data.append(FunctionCall(function, startTime, profiler->m_timer.nsecsElapsed()));
}
- static ReturnedValue profileCall(Profiler *profiler, Function *function)
+ static ReturnedValue profileCall(Profiler *profiler, Function *function, const FunctionObject *jsFunction)
{
FunctionCallProfiler callProfiler(profiler, function);
- return function->code(function);
+ return function->code(function, jsFunction);
}
Profiler *profiler;