diff options
| author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2023-01-10 11:30:45 +0100 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-01-10 20:55:17 +0000 |
| commit | 7f1d3c09c9620d6aa5c7c94429e0e2a10a82b6d6 (patch) | |
| tree | eacc7b9bf324dfc1bfc8c5c861524719f0e490d9 /src/gui/doc/snippets/textdocument-selections/mainwindow.cpp | |
| parent | df030e06a81cf636aa766053af979ae79c2ab69d (diff) | |
QTimerInfo: re-pack the members
0148c6925ec3b6b9a9d2f57ae44fea292a6625e1 added support for qint64
intervals in the abstract dispatcher. Changing the `int` interval
to `qint64` causes padding in the QTimerInfo struct.
On X86-64:
struct TimerInfo {
int id; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
qint64 interval; /* 8 8 */
enum TimerType timerType; /* 16 4 */
/* XXX 4 bytes hole, try to pack */
struct timespec timeout; /* 24 16 */
class QObject * obj; /* 40 8 */
class QTimerInfo * * activateRef; /* 48 8 */
/* size: 56, cachelines: 1, members: 6 */
/* sum members: 48, holes: 2, sum holes: 8 */
/* last cacheline: 56 bytes */
};
On ARM32:
struct TimerInfo {
int id; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
qint64 interval; /* 8 8 */
enum TimerType timerType; /* 16 4 */
struct timespec timeout; /* 20 8 */
class QObject * obj; /* 28 4 */
class QTimerInfo * * activateRef; /* 32 4 */
/* size: 40, cachelines: 1, members: 6 */
/* sum members: 32, holes: 1, sum holes: 4 */
/* padding: 4 */
/* last cacheline: 40 bytes */
};
Change the order of the members, so we remove the padding:
struct TimerInfo {
int id; /* 0 4 */
enum TimerType timerType; /* 4 4 */
qint64 interval; /* 8 8 */
struct timespec timeout; /* 16 16 */
class QObject * obj; /* 32 8 */
class QTimerInfo * * activateRef; /* 40 8 */
/* size: 48, cachelines: 1, members: 6 */
/* last cacheline: 48 bytes */
};
Pick-to: 6.5
Change-Id: Ia1cc56e497f87611fa411a19361f8ebb13ff1f67
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-selections/mainwindow.cpp')
0 files changed, 0 insertions, 0 deletions
