diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-09-27 19:40:24 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-08 02:45:16 +0200 |
commit | 583d05863e4aa1c6af1948795ce42b928a0017d0 (patch) | |
tree | bd0fc1b404e86314f5cbfa5bcb1e6c1f203b608b /src/plugins/bearer/connman/qofonoservice_linux_p.h | |
parent | 4533cc994484a2308297e64e99af005fb4dca065 (diff) |
Reorder the members in QThreadData to avoid padding holes
Before this change, this struct had size 104 and a total of 21 padding
bytes. Now it's down to 88 bytes and only 5 bytes of padding.
pahole report on a 64-bit system:
class QAtomicInt _ref; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
public:
class QThread * thread; /* 8 8 */
HANDLE threadId; /* 16 8 */
bool quitNow; /* 24 1 */
/* XXX 3 bytes hole, try to pack */
int loopLevel; /* 28 4 */
class QAtomicPointer<QAbstractEventDispatcher> eventDispatcher; /* 32 8 */
class QStack<QEventLoop*> eventLoops; /* 40 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
class QPostEventList postEventList; /* 48 32 */
bool canWait; /* 80 1 */
/* XXX 7 bytes hole, try to pack */
class QVector<void*> tls; /* 88 8 */
bool isAdopted; /* 96 1 */
/* size: 104, cachelines: 2, members: 11 */
/* sum members: 90, holes: 3, sum holes: 14 */
/* padding: 7 */
Change-Id: I1fc88e0b312f38eccdea440734fd37e0519285a2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/plugins/bearer/connman/qofonoservice_linux_p.h')
0 files changed, 0 insertions, 0 deletions