All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  Allow building with perfc and perfc_arrays
@ 2006-02-16 19:52 Ben Thomas
  2006-02-16 21:26 ` Chris Wright
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Thomas @ 2006-02-16 19:52 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

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@virtualiron.com)




[-- Attachment #2: perfc.tip --]
[-- Type: text/plain, Size: 2158 bytes --]

# 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__ */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-16 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-16 19:52 [PATCH] Allow building with perfc and perfc_arrays Ben Thomas
2006-02-16 21:26 ` Chris Wright
2006-02-16 22:17   ` Ben Thomas
2006-02-16 22:51     ` Chris Wright

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.