diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-08-07 20:02:02 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-08-21 20:02:01 +0000 |
commit | 42c812b98bbdb1d9e12b111f779a4cc6d987727d (patch) | |
tree | 5acedc51629ec8aa3ece207b9204ab75327b5a1f /trace-events | |
parent | d7b9553489f896bbcdb47403edb92f0bfb02eeaa (diff) |
m48t59: avoid structure holes spotted by pahole
Report from pahole on amd64 host:
struct M48t59State {
uint32_t type; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
qemu_irq IRQ; /* 8 8 */
uint32_t io_base; /* 16 4 */
uint32_t size; /* 20 4 */
time_t time_offset; /* 24 8 */
time_t stop_time; /* 32 8 */
struct tm alarm; /* 40 56 */
/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
struct QEMUTimer * alrm_timer; /* 96 8 */
struct QEMUTimer * wd_timer; /* 104 8 */
uint8_t lock; /* 112 1 */
/* XXX 1 byte hole, try to pack */
uint16_t addr; /* 114 2 */
/* XXX 4 bytes hole, try to pack */
uint8_t * buffer; /* 120 8 */
/* --- cacheline 2 boundary (128 bytes) --- */
/* size: 128, cachelines: 2 */
/* sum members: 119, holes: 3, sum holes: 9 */
}; /* definitions: 1 */
Fix by rearranging the structure to avoid padding.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'trace-events')
0 files changed, 0 insertions, 0 deletions