[Development] Follow up on QtCS 2017 logging/tracing session

Arnaud Clère arnaud.clere at minmaxmedical.com
Mon Oct 30 19:08:18 CET 2017

Hi all,

Following up on https://wiki.qt.io/QtCS2017_Discuss_Qt_Logging_enhancements I have posted at the bottom of the page a quick survey of the tracing/logging landscape.

My own conclusions are that there is almost no overlap between the 2 use cases and proposals.

For #1 (high-perf tracing for performance analysis and troubleshooting):
It is necessary to restrict a little bit the data that can be traced to make sure it can be assembled with only a few memcopy's at the tracepoint site.
It would be VERY interesting for Qt users to insert a few Statically-Defined Tracepoints (SDT) in critical Qt parts (QObject interactions, event processing, QPA) to facilitate Qt app profiling as is done in LTTng for C standard library and Java/Python agents:
I think the submitted tool can be used to cover the need, except a default "Qt provider" with hard-coded UUID would make things simpler for users (who may just be internal to Qt project).

For #2 (structured logging for convenient app troubleshooting):
Evolution from MS ReportEvent to EventSource.Write<T> tells us that app developers will generally not use SDTs but use the simplest available way to log their stuff, so improving the structure of qDebug() output is an important goal too...
I started to benchmark QDebug vs modmedLog  and we need to improve our implementation to provide an interesting migration path from existing qDebug() tracepoints to structured logging.
Supporting a binary format would probably be necessary to offer better performance than existing qDebug.
In this case, it may not be possible to fully integrate with native formats like CTF or EtwSelfDescribingFormat. Also, using a standard format like CBOR may be a better option in the long term.
When some performance loss is acceptable to get more structured logs, I think structured text formats like our TSV+JSON remain more convenient to use.

I will get back once modmedLog performance is on par with QDebug.
In the meantime, I hope the QUuid issue in "LTTNG and ETW tracing" support can be solved and some SDTs inserted into QtCore! That would be very nice.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20171030/d494f4f6/attachment.html>

More information about the Development mailing list