4#ifndef QQMLPROFILER_P_H
5#define QQMLPROFILER_P_H
18#include <private/qfinitestack_p.h>
19#include <private/qqmlbinding_p.h>
20#include <private/qqmlboundsignal_p.h>
21#include <private/qqmlglobal_p.h>
22#include <private/qv4function_p.h>
24#if QT_CONFIG(qml_debug)
28#include <QtCore/qurl.h>
29#include <QtCore/qstring.h>
33#if !QT_CONFIG(qml_debug)
35#define Q_QML_PROFILE_IF_ENABLED(feature, profiler, Code)
36#define Q_QML_PROFILE(feature, profiler, Method)
37#define Q_QML_OC_PROFILE(member, Code)
81#define Q_QML_PROFILE_IF_ENABLED(feature, profiler, Code)\
82 if (profiler && (profiler->featuresEnabled & (1 << feature))) {\
87#define Q_QML_PROFILE(feature, profiler, Method)\
88 Q_QML_PROFILE_IF_ENABLED(feature, profiler, profiler->Method)
90#define Q_QML_OC_PROFILE(member, Code)\
91 Q_QML_PROFILE_IF_ENABLED(QQmlProfilerDefinitions::ProfileCreating, member.profiler, Code)
101 QQmlProfilerData(
qint64 time = -1,
int messageType = -1,
103 time(
time), locationId(locationId), messageType(messageType), detailType(detailType)
129 struct RefLocation :
public Location {
139 function->executableCompilationUnit()->addref();
155 boundSignal->addref();
165 RefLocation(
const RefLocation &
other)
167 locationType(
other.locationType),
174 RefLocation &operator=(
const RefLocation &
other)
176 if (
this != &
other) {
178 Location::operator=(
other);
179 locationType =
other.locationType;
197 switch (locationType) {
199 function->executableCompilationUnit()->addref();
205 boundSignal->addref();
221 switch (locationType) {
223 function->executableCompilationUnit()->release();
229 boundSignal->release();
273 m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
277 RefLocation &
location = m_locations[locationId];
291 m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
295 RefLocation &
location = m_locations[locationId];
308 m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
312 RefLocation &
location = m_locations[locationId];
319 m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(),
329 RefLocation &
location = m_locations[locationId];
334 template<RangeType Range>
337 m_data.append(QQmlProfilerData(m_timer.nsecsElapsed(), 1 <<
RangeEnd, Range));
344 template<
typename Object>
350 void startProfiling(
quint64 features);
351 void stopProfiling();
370 QQmlProfilerHelper(
QQmlProfiler *profiler) : profiler(profiler) {}
375 QQmlProfilerHelper(profiler)
378 startBinding(function));
384 endRange<Binding>());
390 QQmlProfilerHelper(profiler)
393 startHandlingSignal(expression));
399 endRange<QQmlProfiler::HandlingSignal>());
405 QQmlProfilerHelper(profiler)
424 ranges.allocate(maxDepth);
429 if (ranges.count() > 0)
437 if (ranges.capacity() > ranges.count())
474 profiler(
parent->profiler)
477 profiler->startCreating(
parent->pop());
484 endRange<QQmlProfilerDefinitions::Creating>());
494#if QT_CONFIG(qml_debug)
The QQmlDataBlob encapsulates a data request that can be issued to a QQmlTypeLoader.
QV4::Function * function() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
GLenum GLenum GLsizei void GLsizei void * column
GLsizei const void * pointer
#define Q_QML_PROFILE(feature, profiler, Method)
#define Q_QML_PROFILE_IF_ENABLED(feature, profiler, Code)
#define Q_AUTOTEST_EXPORT
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64
QUrl url("example.com")
[constructor-url-reference]
QQmlBindingProfiler(quintptr, QV4::Function *)
QQmlCompilingProfiler(quintptr, QQmlDataBlob *)
QQmlHandlingSignalProfiler(quintptr, QQmlBoundSignalExpression *)
QQmlObjectCompletionProfiler(QQmlVmeProfiler *)
void update(QV4::CompiledData::CompilationUnit *, const QV4::CompiledData::Object *, const QString &, const QUrl &)
QQmlObjectCreationProfiler(quintptr, const QV4::CompiledData::Object *)
static const quintptr profiler
const QV4::CompiledData::Object * pop()
void push(const QV4::CompiledData::Object *)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent