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-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Allow building with perfc and perfc_arrays
From: Ben Thomas <bthomas@xxxxxxxxxxxxxxx>
Date: Thu, 16 Feb 2006 14:52:44 -0500
Delivery-date: Thu, 16 Feb 2006 20:05:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)
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
<Prev in Thread] Current Thread [Next in Thread>