WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [PATCH] xentrace buffer alignment


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


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel