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>
This commit is contained in:
parent
127518deda
commit
f4c41b9797
@ -1197,7 +1197,7 @@ bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event)
|
|||||||
{
|
{
|
||||||
// Note: when adjusting the tracepoints in here
|
// Note: when adjusting the tracepoints in here
|
||||||
// consider adjusting QApplicationPrivate::notify_helper too.
|
// 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)
|
// send to all application event filters (only does anything in the main thread)
|
||||||
if (QCoreApplication::self
|
if (QCoreApplication::self
|
||||||
@ -1489,7 +1489,7 @@ bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
|
|||||||
*/
|
*/
|
||||||
void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
|
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) {
|
if (receiver == 0) {
|
||||||
qWarning("QCoreApplication::postEvent: Unexpected null receiver");
|
qWarning("QCoreApplication::postEvent: Unexpected null receiver");
|
||||||
|
@ -16,6 +16,7 @@ QEvent_ctor(QEvent *event, int type)
|
|||||||
QEvent_dtor(QEvent *event, int type)
|
QEvent_dtor(QEvent *event, int type)
|
||||||
|
|
||||||
QCoreApplication_postEvent_entry(QObject *receiver, 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_compressed(QObject *receiver, QEvent *event)
|
||||||
QCoreApplication_postEvent_event_posted(QObject *receiver, QEvent *event, int type)
|
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_sendSpontaneousEvent(QObject *receiver, QEvent *event, int type)
|
||||||
|
|
||||||
QCoreApplication_notify_entry(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_event_filtered(QObject *receiver, QEvent *event, int type)
|
||||||
QCoreApplication_notify_before_delivery(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)
|
QCoreApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)
|
||||||
|
@ -3697,7 +3697,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
|
|||||||
// to the ones in QCoreApplicationPrivate::notify_helper; the reason for their
|
// to the ones in QCoreApplicationPrivate::notify_helper; the reason for their
|
||||||
// duplication is because tracepoint symbols are not exported by QtCore.
|
// duplication is because tracepoint symbols are not exported by QtCore.
|
||||||
// If you adjust the tracepoints here, consider adjusting QCoreApplicationPrivate too.
|
// If you adjust the tracepoints here, consider adjusting QCoreApplicationPrivate too.
|
||||||
Q_TRACE(QApplication_notify_entry, receiver, e, e->type());
|
Q_TRACE_SCOPE(QApplication_notify, receiver, e, e->type());
|
||||||
|
|
||||||
// send to all application event filters
|
// send to all application event filters
|
||||||
if (threadRequiresCoreApplication()
|
if (threadRequiresCoreApplication()
|
||||||
|
@ -5,6 +5,7 @@ QT_END_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
QApplication_notify_entry(QObject *receiver, QEvent *event, int type)
|
QApplication_notify_entry(QObject *receiver, QEvent *event, int type)
|
||||||
|
QApplication_notify_exit(QObject *receiver, QEvent *event, int type)
|
||||||
QApplication_notify_event_filtered(QObject *receiver, QEvent *event, int type)
|
QApplication_notify_event_filtered(QObject *receiver, QEvent *event, int type)
|
||||||
QApplication_notify_before_delivery(QObject *receiver, QEvent *event, int type)
|
QApplication_notify_before_delivery(QObject *receiver, QEvent *event, int type)
|
||||||
QApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)
|
QApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user