Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlProfilerServiceImpl Class Reference

#include <qqmlprofilerservice.h>

+ Inheritance diagram for QQmlProfilerServiceImpl:
+ Collaboration diagram for QQmlProfilerServiceImpl:

Signals

void startFlushTimer ()
 
void stopFlushTimer ()
 

Public Member Functions

void engineAboutToBeAdded (QJSEngine *engine) override
 
void engineAboutToBeRemoved (QJSEngine *engine) override
 
void engineAdded (QJSEngine *engine) override
 
void engineRemoved (QJSEngine *engine) override
 
void addGlobalProfiler (QQmlAbstractProfilerAdapter *profiler) override
 
void removeGlobalProfiler (QQmlAbstractProfilerAdapter *profiler) override
 
void startProfiling (QJSEngine *engine, quint64 features=std::numeric_limits< quint64 >::max()) override
 Start profiling the given engine.
 
void stopProfiling (QJSEngine *engine) override
 Stop profiling the given engine.
 
 QQmlProfilerServiceImpl (QObject *parent=nullptr)
 
 ~QQmlProfilerServiceImpl () override
 
void dataReady (QQmlAbstractProfilerAdapter *profiler) override
 
- Public Member Functions inherited from QQmlProfilerService
void startProfiling (QJSEngine *engine, quint64 features=std::numeric_limits< quint64 >::max())
 
void stopProfiling (QJSEngine *)
 

Protected Member Functions

void stateAboutToBeChanged (State state) override
 
void messageReceived (const QByteArray &) override
 
- Protected Member Functions inherited from QQmlConfigurableDebugService< QQmlProfilerService >
 QQmlConfigurableDebugService (float version, QObject *parent=nullptr)
 
void stopWaiting ()
 
void init ()
 
void stateChanged (QQmlDebugService::State newState) override
 
void engineAboutToBeAdded (QJSEngine *engine) override
 

Friends

class QQmlProfilerServiceFactory
 

Additional Inherited Members

- Public Types inherited from QQmlProfilerDefinitions
enum  Message {
  Event , RangeStart , RangeData , RangeLocation ,
  RangeEnd , Complete , PixmapCacheEvent , SceneGraphFrame ,
  MemoryAllocation , DebugMessage , Quick3DFrame , MaximumMessage
}
 
enum  EventType {
  FramePaint , Mouse , Key , AnimationFrame ,
  EndTrace , StartTrace , MaximumEventType
}
 
enum  RangeType {
  Painting , Compiling , Creating , Binding ,
  HandlingSignal , Javascript , MaximumRangeType
}
 
enum  PixmapEventType {
  PixmapSizeKnown , PixmapReferenceCountChanged , PixmapCacheCountChanged , PixmapLoadingStarted ,
  PixmapLoadingFinished , PixmapLoadingError , MaximumPixmapEventType
}
 
enum  SceneGraphFrameType {
  SceneGraphRendererFrame , SceneGraphAdaptationLayerFrame , SceneGraphContextFrame , SceneGraphRenderLoopFrame ,
  SceneGraphTexturePrepare , SceneGraphTextureDeletion , SceneGraphPolishAndSync , SceneGraphWindowsRenderShow ,
  SceneGraphWindowsAnimations , SceneGraphPolishFrame , MaximumSceneGraphFrameType , NumRenderThreadFrameTypes = SceneGraphPolishAndSync ,
  NumGUIThreadFrameTypes = MaximumSceneGraphFrameType - NumRenderThreadFrameTypes
}
 
enum  Quick3DFrameType {
  Quick3DRenderFrame , Quick3DSynchronizeFrame , Quick3DPrepareFrame , Quick3DMeshLoad ,
  Quick3DCustomMeshLoad , Quick3DTextureLoad , Quick3DGenerateShader , Quick3DLoadShader ,
  Quick3DParticleUpdate , Quick3DRenderCall , Quick3DRenderPass , Quick3DEventData ,
  MaximumQuick3DFrameType
}
 
enum  ProfileFeature {
  ProfileJavaScript , ProfileMemory , ProfilePixmapCache , ProfileSceneGraph ,
  ProfileAnimations , ProfilePainting , ProfileCompiling , ProfileCreating ,
  ProfileBinding , ProfileHandlingSignal , ProfileInputEvents , ProfileDebugMessages ,
  ProfileQuick3D , MaximumProfileFeature
}
 
enum  InputEventType {
  InputKeyPress , InputKeyRelease , InputKeyUnknown , InputMousePress ,
  InputMouseRelease , InputMouseMove , InputMouseDoubleClick , InputMouseWheel ,
  InputMouseUnknown , MaximumInputEventType
}
 
- Protected Attributes inherited from QQmlConfigurableDebugService< QQmlProfilerService >
QRecursiveMutex m_configMutex
 
QList< QJSEngine * > m_waitingEngines
 
bool m_waitingForConfiguration
 

Detailed Description

Definition at line 41 of file qqmlprofilerservice.h.

Constructor & Destructor Documentation

◆ QQmlProfilerServiceImpl()

QT_BEGIN_NAMESPACE QQmlProfilerServiceImpl::QQmlProfilerServiceImpl ( QObject * parent = nullptr)

Definition at line 23 of file qqmlprofilerservice.cpp.

◆ ~QQmlProfilerServiceImpl()

QQmlProfilerServiceImpl::~QQmlProfilerServiceImpl ( )
override

Definition at line 46 of file qqmlprofilerservice.cpp.

References qDeleteAll().

+ Here is the call graph for this function:

Member Function Documentation

◆ addGlobalProfiler()

void QQmlProfilerServiceImpl::addGlobalProfiler ( QQmlAbstractProfilerAdapter * profiler)
override

Definition at line 166 of file qqmlprofilerservice.cpp.

References QList< T >::append(), lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, QQmlAbstractProfilerAdapter::startProfiling(), and QQmlAbstractProfilerAdapter::synchronize().

+ Here is the call graph for this function:

◆ dataReady()

void QQmlProfilerServiceImpl::dataReady ( QQmlAbstractProfilerAdapter * profiler)
override

Definition at line 54 of file qqmlprofilerservice.cpp.

References QMultiMap< Key, T >::begin(), QMultiMap< Key, T >::cbegin(), QMultiMap< Key, T >::cend(), emit, QMultiMap< Key, T >::end(), engine, QMultiMap< Key, T >::erase(), i, QMultiMap< Key, T >::insert(), it, lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, and QList< T >::removeOne().

+ Here is the call graph for this function:

◆ engineAboutToBeAdded()

void QQmlProfilerServiceImpl::engineAboutToBeAdded ( QJSEngine * engine)
override

Definition at line 88 of file qqmlprofilerservice.cpp.

References QThread::currentThread(), engine, QQmlConfigurableDebugService< Base >::engineAboutToBeAdded(), QQmlEnginePrivate::get(), QJSEngine::handle(), lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, Q_ASSERT_X, Q_FUNC_INFO, qmlEngine(), QObject::thread(), and QQmlEnginePrivate::typeLoader.

+ Here is the call graph for this function:

◆ engineAboutToBeRemoved()

void QQmlProfilerServiceImpl::engineAboutToBeRemoved ( QJSEngine * engine)
override

Definition at line 122 of file qqmlprofilerservice.cpp.

References QList< T >::append(), QThread::currentThread(), emit, engine, isRunning(), QQmlAbstractProfilerAdapter::isRunning(), it, lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, Q_ASSERT_X, Q_FUNC_INFO, QQmlAbstractProfilerAdapter::startWaiting(), stopProfiling(), and QObject::thread().

+ Here is the call graph for this function:

◆ engineAdded()

void QQmlProfilerServiceImpl::engineAdded ( QJSEngine * engine)
override

Definition at line 107 of file qqmlprofilerservice.cpp.

References QThread::currentThread(), engine, it, lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, Q_ASSERT_X, Q_FUNC_INFO, startProfiling(), and QObject::thread().

+ Here is the call graph for this function:

◆ engineRemoved()

void QQmlProfilerServiceImpl::engineRemoved ( QJSEngine * engine)
override

Definition at line 144 of file qqmlprofilerservice.cpp.

References QThread::currentThread(), engine, it, lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, Q_ASSERT_X, Q_FUNC_INFO, QMultiHash< Key, T >::remove(), and QObject::thread().

+ Here is the call graph for this function:

◆ messageReceived()

void QQmlProfilerServiceImpl::messageReceived ( const QByteArray & message)
overrideprotected

◆ removeGlobalProfiler()

void QQmlProfilerServiceImpl::removeGlobalProfiler ( QQmlAbstractProfilerAdapter * profiler)
override

Definition at line 182 of file qqmlprofilerservice.cpp.

References lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, and QList< T >::removeOne().

+ Here is the call graph for this function:

◆ startFlushTimer

void QQmlProfilerServiceImpl::startFlushTimer ( )
signal

Referenced by messageReceived(), and startProfiling().

+ Here is the caller graph for this function:

◆ startProfiling()

void QQmlProfilerServiceImpl::startProfiling ( QJSEngine * engine,
quint64 features = std::numeric_limits<quint64>::max() )
override

Start profiling the given engine.

If engine is 0, start all engine profilers that aren't currently running.

If any engine profiler is started like that also start all global profilers.

Definition at line 208 of file qqmlprofilerservice.cpp.

References QMultiHash< Key, T >::begin(), d, emit, QMultiHash< Key, T >::end(), engine, QQmlProfilerDefinitions::Event, i, QQmlDebugConnector::instance(), QQmlAbstractProfilerAdapter::isRunning(), it, lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, QElapsedTimer::nsecsElapsed(), QQmlProfilerDefinitions::ProfileDebugMessages, startFlushTimer(), QQmlAbstractProfilerAdapter::startProfiling(), and QQmlProfilerDefinitions::StartTrace.

Referenced by engineAdded(), and messageReceived().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateAboutToBeChanged()

void QQmlProfilerServiceImpl::stateAboutToBeChanged ( State state)
overrideprotected

Definition at line 382 of file qqmlprofilerservice.cpp.

References it, QMultiHash< Key, T >::keyBegin(), QMultiHash< Key, T >::keyEnd(), lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, newState(), state, and stopProfiling().

+ Here is the call graph for this function:

◆ stopFlushTimer

void QQmlProfilerServiceImpl::stopFlushTimer ( )
signal

Referenced by messageReceived(), and stopProfiling().

+ Here is the caller graph for this function:

◆ stopProfiling()

void QQmlProfilerServiceImpl::stopProfiling ( QJSEngine * engine)
override

Stop profiling the given engine.

If engine is 0, stop all currently running engine profilers.

If afterwards no more engine profilers are running, also stop all global profilers. Otherwise only make them report their data.

Definition at line 268 of file qqmlprofilerservice.cpp.

References QMultiHash< Key, T >::begin(), emit, QMultiHash< Key, T >::end(), engine, i, QMultiMap< Key, T >::insert(), QQmlAbstractProfilerAdapter::isRunning(), lock, QQmlConfigurableDebugService< QQmlProfilerService >::m_configMutex, QQmlAbstractProfilerAdapter::reportData(), stopFlushTimer(), and QQmlAbstractProfilerAdapter::stopProfiling().

Referenced by engineAboutToBeRemoved(), messageReceived(), and stateAboutToBeChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QQmlProfilerServiceFactory

friend class QQmlProfilerServiceFactory
friend

Definition at line 74 of file qqmlprofilerservice.h.


The documentation for this class was generated from the following files: