summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2019-03-26 15:23:48 +0100
committerMilian Wolff <milian.wolff@kdab.com>2019-04-05 11:57:46 +0000
commit5f62202e6c89269da3e9faaea4c88d0f19416cc1 (patch)
tree47c510d6defdd9b0ec8ab5aa1b3e23f4d851dac5 /src/corelib
parent6ce2a87c23bbaacece7d32df276f64a0058e447d (diff)
Add tracepoint to qt_message_print
This allows us to deduce a lot about what a Qt application is doing, since the debug output usually contains a lot of information. Change-Id: I28a18afd151a1640a44ba8c7c9cd87d5d66c99b0 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/global/qlogging.cpp3
-rw-r--r--src/corelib/qtcore.tracepoints2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 168934c202..30232170fb 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -57,6 +57,7 @@
#include "private/qloggingregistry_p.h"
#include "private/qcoreapplication_p.h"
#include "private/qsimd_p.h"
+#include <qtcore_tracepoints_p.h>
#endif
#ifdef Q_OS_WIN
#include <qt_windows.h>
@@ -1811,6 +1812,8 @@ static void ungrabMessageHandler() { }
static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
{
#ifndef QT_BOOTSTRAPPED
+ Q_TRACE(qt_message_print, msgType, context.category, context.function, context.file, context.line, message);
+
// qDebug, qWarning, ... macros do not check whether category is enabled
if (isDefaultCategory(context.category)) {
if (QLoggingCategory *defaultCategory = QLoggingCategory::defaultCategory()) {
diff --git a/src/corelib/qtcore.tracepoints b/src/corelib/qtcore.tracepoints
index a9a08071f3..f9018acdbf 100644
--- a/src/corelib/qtcore.tracepoints
+++ b/src/corelib/qtcore.tracepoints
@@ -38,3 +38,5 @@ QMetaObject_activate_begin_slot_functor(void *slotObject)
QMetaObject_activate_end_slot_functor(void *slotObject)
QMetaObject_activate_begin_declarative_signal(QObject *sender, int signalIndex)
QMetaObject_activate_end_declarative_signal(QObject *sender, int signalIndex)
+
+qt_message_print(int type, const char *category, const char *function, const char *file, int line, const QString &message)