[Development] FW: Tracing for applications
lukast.dev at gmail.com
Thu Jan 27 08:19:28 CET 2022
I just noticed that Qt Creator has a nanotrace now.
Kinda cool! Tracegen from Qt and nanotrace from Qt Creator is probably
something that I was asking for originally in this thread.
Case closed! :)
ut 10. 12. 2019 o 14:55 Adam Light <aclight at gmail.com> napísal(a):
> On Mon, Dec 9, 2019 at 1:06 PM Lukast dev <lukast.dev at gmail.com> wrote:
>> 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.
> With respect to ETW tracing on Windows, it's not clear to me that you
> really even need to be able to emit your own data.
> I just wrote a post about ETW in a thread on the Qt Interest mailing list (
> As long as you have PDB symbol files available for the Qt libraries and
> your own application, you can use the data collected with the default
> settings of UIforETW to do most performance related analysis. You can
> easily see if a function was called a million times or if it was called
> once and was just slow. There is definitely a learning curve on the
> analysis side, but as I mentioned in my other post there are a lot of
> really good tutorials and examples of how to analyze the data.
> You might want to emit your own tracing data if you want to store specific
> intervals where it is not otherwise straightforward to measure the length
> of the interval by looking at function calls, or if you want to store some
> data to help you interpret the profiling information better (eg. size of
> some object like a QImage). If you do need to emit your own tracing data,
> it's not that difficult to do this yourself, at least with ETW.
> The "old" way of doing this is crazy complicated. The overview
> documentation is at
> But if you only need to emit data when running on Windows 10 and can meet
> a few other requirements, you can use the much simpler approach described
> This is what is being used in the Qt commit you pointed out earlier. Here
> are a couple other links that I found helpful using the tracelogging
> If you decide to go this route and are using UIforETW to collect your
> traces, you can easily configure it to record the data from your own
> provider. Here are the notes in our sources for how to do this:
> // To record data from this provider, I use UIforETW. Click the Settings
> // and in the "Extra user mode providers:" field, enter:
> // *MyTraceLoggingProvider
> // Note that the "*" is required.
> MyTraceLoggingProvider is the name you use in the call
> to TRACELOGGING_DEFINE_PROVIDER.
> Development mailing list
> Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development