From 5ba32847129b48b25794524667a7346e6b9d0682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 24 Feb 2021 18:21:54 +0700 Subject: [PATCH] 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. --- src/ftrace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ftrace.h b/src/ftrace.h index dca96dfd24..b3586571f9 100644 --- a/src/ftrace.h +++ b/src/ftrace.h @@ -73,7 +73,7 @@ class KWIN_EXPORT FTraceDuration public: template FTraceDuration(Args... args) { - static QAtomicInteger s_context = 0; + static QAtomicInteger s_context = 0; QTextStream stream(&m_message); (stream << ... << args); stream.flush(); @@ -85,7 +85,7 @@ public: private: QByteArray m_message; - qulonglong m_context; + quint32 m_context; }; } // namespace KWin