Skip to content
  • Blue Swirl's avatar
    escc: avoid structure holes spotted by pahole · d7b95534
    Blue Swirl authored
    
    
    Edited report from pahole on amd64 host:
    struct ChannelState {
    ...
    	ChnType                    type;                 /*    32     4 */
    
    	/* XXX 4 bytes hole, try to pack */
    ...
    	uint8_t                    rregs[16];            /*    66    16 */
    
    	/* XXX 2 bytes hole, try to pack */
    ...
    	/* size: 392, cachelines: 7 */
    	/* sum members: 382, holes: 2, sum holes: 6 */
    	/* padding: 4 */
    	/* last cacheline: 8 bytes */
    };	/* definitions: 1 */
    
    Fix by rearranging the structure to avoid padding.
    
    Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
    d7b95534