ftrace: use quint32 for context counter

Some old platforms don't have atomic integer supports for 64-bit wise
integer.

As indicated in GPUVis:

	// Erase all knowledge of this ctx so it can be reused

We can reuse numbers after end_ctx, so with we should be fine with
32-bit integer.

Let's use a 32 bit integer for context.
This commit is contained in:
Đoàn Trần Công Danh 2021-02-24 18:21:54 +07:00 committed by David Edmundson
parent 5cc062c77c
commit 5ba3284712

View file

@ -73,7 +73,7 @@ class KWIN_EXPORT FTraceDuration
public: public:
template<typename... Args> FTraceDuration(Args... args) template<typename... Args> FTraceDuration(Args... args)
{ {
static QAtomicInteger<qulonglong> s_context = 0; static QAtomicInteger<quint32> s_context = 0;
QTextStream stream(&m_message); QTextStream stream(&m_message);
(stream << ... << args); (stream << ... << args);
stream.flush(); stream.flush();
@ -85,7 +85,7 @@ public:
private: private:
QByteArray m_message; QByteArray m_message;
qulonglong m_context; quint32 m_context;
}; };
} // namespace KWin } // namespace KWin