OpenCoverage

qquickprofiler.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickprofiler.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7QQuickProfiler *QQuickProfiler::s_instance = nullptr;-
8quint64 QQuickProfiler::featuresEnabled = 0;-
9-
10void QQuickProfiler::initialize(QObject *parent)-
11{-
12 ((s_instance == nullptr) ? static_cast<void>(0) : qt_assert("s_instance == nullptr", __FILE__, 55));-
13 s_instance = new QQuickProfiler(parent);-
14}
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlprofilerservice
24
15-
16void animationTimerCallback(qint64 delta)-
17{-
18 if (QQuickProfiler::featuresEnabled & (1 << QQuickProfiler::ProfileAnimations)
QQuickProfiler...ileAnimations)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlprofilerservice
FALSEnever evaluated
) { QQuickProfiler::animationFrame(delta, QThread::currentThread() == QCoreApplication::instance()->thread() ? QQuickProfiler::GuiThread : QQuickProfiler::RenderThread); }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
else (
never executed: (void)0 ;
void)0
never executed: (void)0 ;
0-6
190
20 ;
never executed: (void)0 ;
0
21}-
22-
23void QQuickProfiler::registerAnimationCallback()-
24{-
25 QUnifiedTimer::instance()->registerProfilerCallback(&animationTimerCallback);-
26}
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlprofilerservice
24
27-
28class CallbackRegistrationHelper : public QObject {-
29 public:-
30#pragma GCC diagnostic push-
31 -
32#pragma GCC diagnostic ignored "-Wsuggest-override"-
33 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
34#pragma GCC diagnostic ignored "-Wattributes"-
35 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
36#pragma GCC diagnostic pop-
37 struct QPrivateSignal {};-
38public:-
39 void registerAnimationTimerCallback()-
40 {-
41 QQuickProfiler::registerAnimationCallback();-
42 delete this;-
43 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlprofilerservice
24
44};-
45-
46-
47QQuickProfiler::QQuickProfiler(QObject *parent) : QObject(parent)-
48{-
49-
50 m_timer.start();-
51 CallbackRegistrationHelper *helper = new CallbackRegistrationHelper;-
52 helper->moveToThread(QCoreApplication::instance()->thread());-
53-
54-
55 QObject signalSource;-
56 connect(&signalSource, &QObject::destroyed,-
57 helper, &CallbackRegistrationHelper::registerAnimationTimerCallback,-
58 Qt::QueuedConnection);-
59}
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlprofilerservice
24
60-
61QQuickProfiler::~QQuickProfiler()-
62{-
63 QMutexLocker lock(&m_dataMutex);-
64 featuresEnabled = 0;-
65 s_instance = nullptr;-
66}
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlprofilerservice
24
67-
68void QQuickProfiler::startProfilingImpl(quint64 features)-
69{-
70 QMutexLocker lock(&m_dataMutex);-
71 featuresEnabled = features;-
72}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
6
73-
74void QQuickProfiler::stopProfilingImpl()-
75{-
76 QMutexLocker lock(&m_dataMutex);-
77 featuresEnabled = 0;-
78 dataReady(m_data);-
79 m_data.clear();-
80}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlprofilerservice
6
81-
82void QQuickProfiler::reportDataImpl()-
83{-
84 QMutexLocker lock(&m_dataMutex);-
85 dataReady(m_data);-
86 m_data.clear();-
87}
never executed: end of block
0
88-
89void QQuickProfiler::setTimer(const QElapsedTimer &t)-
90{-
91 QMutexLocker lock(&m_dataMutex);-
92 m_timer = t;-
93}
executed 24 times by 3 tests: end of block
Executed by:
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmlprofilerservice
24
94-
95-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0