[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Allow building with perfc and perfc_arrays



Attempts to build with either perfc or perfc_arrays fails.  Some of
this is specific to the platform (eg, __x86_64__).  Add simple-minded
fixes to allow building with these options.

This patch resolves these issues and now builds on i386 and x86_64


Signed-off-by: Ben Thomas (ben@xxxxxxxxxxxxxxx)



# HG changeset patch
# Node ID 3a3b034fde8c6644465b1a9d4135142a75740a34
# Parent  1ca3d63e70082c57dd918b0875d28ad679f842a2


building with perfc fails -> simple fix
building with perfc and perfc_arrays on x86_64 fails -> do the
     simple-minded thing and just add the missing elements


diff -r 1ca3d63e7008 -r 3a3b034fde8c xen/common/perfc.c
--- a/xen/common/perfc.c        Wed Feb 15 22:06:12 2006 +0000
+++ b/xen/common/perfc.c        Thu Feb 16 14:50:21 2006 -0500
@@ -144,7 +144,7 @@ static int perfc_copy_info(dom0_perfc_de
     {
         for ( i = 0; i < NR_PERFCTRS; i++ )
         {
-            strncpy(perfc_d[i].name, perfc_info[i].name,
+            strncpy((char *)perfc_d[i].name, perfc_info[i].name,
                     sizeof(perfc_d[i].name));
             perfc_d[i].name[sizeof(perfc_d[i].name)-1] = '\0';
 
diff -r 1ca3d63e7008 -r 3a3b034fde8c xen/include/xen/perfc_defn.h
--- a/xen/include/xen/perfc_defn.h      Wed Feb 15 22:06:12 2006 +0000
+++ b/xen/include/xen/perfc_defn.h      Thu Feb 16 14:50:21 2006 -0500
@@ -125,4 +125,26 @@ PERFCOUNTER_CPU(remove_write_bad_predict
 PERFCOUNTER_CPU(remove_write_bad_prediction, "remove_write bad prediction")
 PERFCOUNTER_CPU(update_hl2e_invlpg,     "update_hl2e calls invlpg")
 
+/* perfc */
+
+#ifdef __x86_64__
+PERFCOUNTER_CPU(validate_entry_changes,  "validate_entry_changes")
+PERFCOUNTER_CPU(shadow_l3_pages,         "shadow_l3_pages")
+PERFCOUNTER_CPU(shadow_l4_pages,         "shadow_l4_pages")
+PERFCOUNTER_CPU(shadow_set_l2e_force_map,"shadow_set_l3e_force_map")
+PERFCOUNTER_CPU(shadow_set_l3e_force_map,"shadow_set_l3e_force_map")
+PERFCOUNTER_CPU(resync_l3,              "resync_l3")
+PERFCOUNTER_CPU(resync_l4,              "resync_l4")
+PERFCOUNTER_CPU(shadow_l3_table_count,  "shadow_l3_table_count")
+PERFCOUNTER_CPU(shadow_l4_table_count,  "shadow_l4_table_count")
+PERFCOUNTER_CPU(apshot_pages,            "apshot_pages")
+
+/* perfc_arrays */
+
+PERFCOUNTER_ARRAY(shm_l3_updates,          "shm_l3_updates",
+                  PERFC_MAX_PT_UPDATES)
+PERFCOUNTER_ARRAY(shm_l4_updates,          "shm_l4_updates",
+                  PERFC_MAX_PT_UPDATES)
+#endif /* x86_64 */
+
 /*#endif*/ /* __XEN_PERFC_DEFN_H__ */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.