From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Thomas Subject: [PATCH] Allow building with perfc and perfc_arrays Date: Thu, 16 Feb 2006 14:52:44 -0500 Message-ID: <43F4D80C.4050308@virtualiron.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020804000708070203080806" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------020804000708070203080806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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) --------------020804000708070203080806 Content-Type: text/plain; name="perfc.tip" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="perfc.tip" # 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__ */ --------------020804000708070203080806 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------020804000708070203080806--