[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-ia64-devel] [PATCH] xentrace buffer alignment
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx] >Sent: 2005年11月24日 22:11 > >On 24 Nov 2005, at 13:54, Tian, Kevin wrote: > >>> From: Tian, Kevin >>> Sent: 2005年11月24日 21:52 >>> >>> So t_rec will be placed at middle of 8 bytes boundary by t_recs[i] = >>> (struct t_rec >>> *)(buf + 1). Then later access to 64bit field within t_rec is >>> unaligned access. >>> >> >> Then another way is to modify above code to let type cast upon address >> aligned to next structure (t_recs) > >Yeah, that pointer arithmetic plus cast is gross. Also the way in which >trace-buffer locations are computed by user space tools (e.g., >xentrace) is nasty. I'll have a think about properly cleaning up the >layout. > >For now, I'll remove the unused 'nr_recs' field from the t_buf, and >that will just happen to get you the correct alignment. Not very nice, >but it'll do until I relay things out. > > -- Keir Sounds good. ;-) Thanks, Kevin _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |