diff options
| author | Antti Määttä <antti.maatta@qt.io> | 2022-09-19 08:23:13 +0300 |
|---|---|---|
| committer | Antti Määttä <antti.maatta@qt.io> | 2023-01-13 12:43:44 +0200 |
| commit | 9bdf74a4f23d009777f1cbdb0078aa70060a3da5 (patch) | |
| tree | 19266522b16ee01f15bfcf3be58dbad515b62808 /src/gui/kernel/qguiapplication.cpp | |
| parent | f488c657216115d33753429e8500b99b6e8e7c4c (diff) | |
| download | qtbase-9bdf74a4f23d009777f1cbdb0078aa70060a3da5.tar.gz | |
Add tracepointgen tool and convert qtgui to use it
Allows automatically generating tracepoint files by scanning source
files for instrumentation macros.
This makes it easier to add tracepoint support to modules and also
ensures that the tracepoint files do not get out of sync with the
functions they are tracing.
Q_TRACE_INSTRUMENT generates entry/exit tracespoints for a function
it is set. Q_TRACE_PARAM_REPLACE is used to change a function parameter
for these functions to convert it to supported parameter type.
Q_TRACE_POINT can be used to create a standalone tracepoint.
Q_TRACE_PREFIX can be used to add prefix for generated tracing backend
for example to add includes for types used in the trace points..
Task-number: QTBUG-107238
Pick-to: 6.5
Change-Id: Ib395b80838434ceb72683dac0545ca20c4d09455
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
| -rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 88d3a390aa..741a02875a 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1529,7 +1529,7 @@ void QGuiApplicationPrivate::eventDispatcherReady() platform_integration->initialize(); } -void QGuiApplicationPrivate::init() +void Q_TRACE_INSTRUMENT(qtgui) QGuiApplicationPrivate::init() { Q_TRACE_SCOPE(QGuiApplicationPrivate_init); @@ -2016,8 +2016,9 @@ bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArra return window->nativeEvent(eventType, message, result); } -void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e) +void Q_TRACE_INSTRUMENT(qtgui) QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e) { + Q_TRACE_PARAM_REPLACE(QWindowSystemInterfacePrivate::WindowSystemEvent *, int); Q_TRACE_SCOPE(QGuiApplicationPrivate_processWindowSystemEvent, e->type); switch(e->type) { |
