From ac56e7cda724aa7463ef6ffe5f0e93bd3208cb51 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 2 Jun 2014 18:33:19 +0200 Subject: Javascript heap profiler This profiler tracks every memory allocation and deallocation, by the MemoryManager as well as the V4 VM, and exposes them as a stream of events to the profiler service. Change-Id: I85297d498f0a7eb55df5d7829c4b7307de980519 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4profiling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4profiling.cpp') diff --git a/src/qml/jsruntime/qv4profiling.cpp b/src/qml/jsruntime/qv4profiling.cpp index 8a0cc56448..f1c70c6b33 100644 --- a/src/qml/jsruntime/qv4profiling.cpp +++ b/src/qml/jsruntime/qv4profiling.cpp @@ -63,7 +63,9 @@ FunctionCallProperties FunctionCall::resolve() const Profiler::Profiler() : enabled(false) { static int metatype = qRegisterMetaType >(); + static int metatype2 = qRegisterMetaType >(); Q_UNUSED(metatype); + Q_UNUSED(metatype2); m_timer.start(); } @@ -87,7 +89,7 @@ void Profiler::reportData() FunctionCallProperties props = call.resolve(); resolved.insert(std::upper_bound(resolved.begin(), resolved.end(), props, comp), props); } - emit dataReady(resolved); + emit dataReady(resolved, m_memory_data); } void Profiler::startProfiling() -- cgit v1.2.3