Skip to contentSkip to conversation

: Fix xentrace buffer allocation

PATCH In review Andre Przywara 2 participants 2 messages Aug 16, 2010 – Aug 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix xentrace buffer allocation

Hi,

during experiments with xentrace we found that the t_info buffer allocation does not match the constants describing the buffer size. Attached patch fixes this, so changes of the buffer size only requires a single line change in the future. Thanks to Uwe for reporting this.

Regards,
Andre.

Signature · 3 lines
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
xen/common/trace.c +3 -3
diff -r 774dfc178c39 xen/common/trace.c
@@ -321,9 +321,9 @@
     /* Calculate offset in u32 of first mfn */
     calc_tinfo_first_offset();
 
-    /* t_info size fixed at 2 pages for now.  That should be big enough / small enough
-     * until it's worth making it dynamic. */
-    t_info = alloc_xenheap_pages(1, 0);
+    /* t_info size is fixed for now. Currently this works great, so there
+     * seems to be no need to make it dynamic. */
+    t_info = alloc_xenheap_pages(get_order_from_pages(T_INFO_PAGES), 0);
 
     if ( t_info == NULL )
     {

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Acked-by on v1 1/1
#1 lore raw

Not sure why the comment needs to be changed, but other than that:

Quoted 23 lines · Andre Przywara

Hi,

during experiments with xentrace we found that the t_info buffer allocation does not match the constants describing the buffer size. Attached patch fixes this, so changes of the buffer size only requires a single line change in the future. Thanks to Uwe for reporting this.

Regards,
Andre.

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel