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:
http://lttng.org/docs/v2.10/#doc-prebuilt-ust-helpers
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.

Thanks,
Arnaud
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to