summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2019-03-27 14:00:21 +0100
committerMilian Wolff <milian.wolff@kdab.com>2019-04-05 11:57:59 +0000
commitf4c41b9797f08f173049502fa7bd465cf5bde938 (patch)
tree903f3fbfacecfa4df71201d2e18d3d74ec5eb3f7 /src/corelib
parent127518deda5a05fda2ce24be98aaaeb7b975f163 (diff)
Add missing _exit tracepoints for event handling
This allows tools that look for matching `foo_entry/exit` pairs in the trace data to work properly. An unmatched `_entry` would otherwise confuse them, making them think that the call stack is continuously increasing. Change-Id: Idff7f587ea25c46ec86ad623cc82d503db34a194 Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp4
-rw-r--r--src/corelib/qtcore.tracepoints2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index d173ec029b..596941b5a9 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1197,7 +1197,7 @@ bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event)
{
// Note: when adjusting the tracepoints in here
// consider adjusting QApplicationPrivate::notify_helper too.
- Q_TRACE(QCoreApplication_notify_entry, receiver, event, event->type());
+ Q_TRACE_SCOPE(QCoreApplication_notify, receiver, event, event->type());
// send to all application event filters (only does anything in the main thread)
if (QCoreApplication::self
@@ -1489,7 +1489,7 @@ bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
*/
void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
{
- Q_TRACE(QCoreApplication_postEvent_entry, receiver, event, event->type());
+ Q_TRACE_SCOPE(QCoreApplication_postEvent, receiver, event, event->type());
if (receiver == 0) {
qWarning("QCoreApplication::postEvent: Unexpected null receiver");
diff --git a/src/corelib/qtcore.tracepoints b/src/corelib/qtcore.tracepoints
index f9018acdbf..3a70136741 100644
--- a/src/corelib/qtcore.tracepoints
+++ b/src/corelib/qtcore.tracepoints
@@ -16,6 +16,7 @@ QEvent_ctor(QEvent *event, int type)
QEvent_dtor(QEvent *event, int type)
QCoreApplication_postEvent_entry(QObject *receiver, QEvent *event, int type)
+QCoreApplication_postEvent_exit(QObject *receiver, QEvent *event, int type)
QCoreApplication_postEvent_event_compressed(QObject *receiver, QEvent *event)
QCoreApplication_postEvent_event_posted(QObject *receiver, QEvent *event, int type)
@@ -23,6 +24,7 @@ QCoreApplication_sendEvent(QObject *receiver, QEvent *event, int type)
QCoreApplication_sendSpontaneousEvent(QObject *receiver, QEvent *event, int type)
QCoreApplication_notify_entry(QObject *receiver, QEvent *event, int type)
+QCoreApplication_notify_exit(QObject *receiver, QEvent *event, int type)
QCoreApplication_notify_event_filtered(QObject *receiver, QEvent *event, int type)
QCoreApplication_notify_before_delivery(QObject *receiver, QEvent *event, int type)
QCoreApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)