[Development] FW: Tracing for applications

Arnaud Clère arnaud.clere at moulinarso.fr
Tue Dec 10 00:14:32 CET 2019


Hi,

Le lun. 9 déc. 2019 à 22:05, Lukast dev <lukast.dev at gmail.com> a écrit :
> But stack sampling sometimes sucks because you don't see if the function was called million times and thus it shows up in the profile
> or it is called once and is expensive and thus it shows up as hot spot. That's the benefit of tracing where you see number of calls and also
> can observe some meta data about the traced event like current memory consumption or any other counter you are interested in.

Ok, then maybe start with a few QDebug tracepoints tracing the data
that makes sense in your context, a macro allowing to trace the most
relevant functions lifetime (instantiate a small object tracing the
beginning of the function at construction and end of the function at
destruction...).
And if writing the trace becomes a bottleneck, have your
QtMessageHandler use a Statically-Defined Tracepoint handled by
tracegen.

That is all you have in Qt presently.

Cheers,
Arnaud


More information about the Development mailing list