From: Lei Xia Date: Mon, 15 Feb 2010 05:39:32 +0000 (-0600) Subject: Clear the profiling code X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=9e15dfbbd7e52361a577101d56adcde35f6bfdcd;hp=68521eca0f94f8c22aa60e762c83e24beec7233c Clear the profiling code --- diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index 75d2149..cab4dc6 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -46,16 +46,6 @@ #include #endif -#define VNET_PROFILE -/* for vnet profiling*/ -#ifdef VNET_PROFILE -static uint64_t vmm_time = 0; -static uint64_t vnet_time = 0; -static uint64_t guest_time = 0; -static uint64_t last_exit_time = 0; -static uint64_t num_exit = 0; -#endif - int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_info1, addr_t exit_info2) { #ifdef CONFIG_TELEMETRY @@ -64,15 +54,6 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i } #endif -#ifdef VNET_PROFILE - uint64_t exit_start_time, vnet_start_time; - uint64_t exit_end_time, vnet_end_time; - rdtscll(exit_start_time); - num_exit ++; - if (last_exit_time > 0) - guest_time += exit_start_time - last_exit_time; -#endif - //PrintDebug("SVM Returned: Exit Code: %x\n",exit_code); switch (exit_code) { @@ -307,35 +288,13 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i #ifdef CONFIG_VNET - -#ifdef VNET_PROFILE - rdtscll(vnet_start_time); -#endif v3_vnet_pkt_process(info); -#ifdef VNET_PROFILE - rdtscll(vnet_end_time); - vnet_time += vnet_end_time - vnet_start_time; -#endif #endif #ifdef CONFIG_LINUX_VIRTIO_NET v3_virtionic_pktprocess(info); #endif -#ifdef VNET_PROFILE - rdtscll(exit_end_time); - vmm_time += exit_end_time - exit_start_time; - last_exit_time = exit_end_time; - if ((num_exit % 100000) == 0) { - PrintError("exit: %ld, vmm_time: %ld, guest_time: %ld, vnet_time: %ld\n", (long)num_exit, (long)vmm_time, (long)guest_time, (long)vnet_time); - vmm_time = 0; - vnet_time = 0; - guest_time = 0; - last_exit_time = 0; - } -#endif - - #ifdef CONFIG_TELEMETRY if (info->enable_telemetry) { v3_telemetry_end_exit(info, exit_code); diff --git a/palacios/src/palacios/vmx_handler.c b/palacios/src/palacios/vmx_handler.c index c758abf..7b738ca 100644 --- a/palacios/src/palacios/vmx_handler.c +++ b/palacios/src/palacios/vmx_handler.c @@ -44,17 +44,6 @@ #include #endif -//#define VNET_PROFILE -/* for vnet profiling*/ -#ifdef VNET_PROFILE -static uint64_t vmm_time = 0; -static uint64_t vnet_time = 0; -static uint64_t guest_time = 0; -static uint64_t last_exit_time = 0; -static uint64_t num_exit = 0; -#endif - - /* At this point the GPRs are already copied into the guest_info state */ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_info) { struct vmx_data * vmx_info = (struct vmx_data *)(info->vmm_data); @@ -86,8 +75,7 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf case VMEXIT_INFO_EXCEPTION_OR_NMI: { pf_error_t error_code = *(pf_error_t *)&(exit_info->int_err); - - // JRL: Change "0x0e" to a macro value + // JRL: Change "0x0e" to a macro value if ((uint8_t)exit_info->int_info == 0x0e) { #ifdef CONFIG_DEBUG_SHADOW_PAGING PrintDebug("Page Fault at %p error_code=%x\n", (void *)exit_info->exit_qual, *(uint32_t *)&error_code); @@ -249,35 +237,13 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf #ifdef CONFIG_VNET -#ifdef VNET_PROFILE - rdtscll(vnet_start_time); -#endif v3_vnet_pkt_process(info); -#ifdef VNET_PROFILE - rdtscll(vnet_end_time); - vnet_time += vnet_end_time - vnet_start_time; -#endif #endif #ifdef CONFIG_LINUX_VIRTIO_NET v3_virtionic_pktprocess(info); #endif -#ifdef VNET_PROFILE - rdtscll(exit_end_time); - vmm_time += exit_end_time - exit_start_time; - last_exit_time = exit_end_time; - if ((num_exit % 100000) == 0) { - PrintError("exit: %ld, vmm_time: %ld, guest_time: %ld, vnet_time: %ld\n", (long)num_exit, (long)vmm_time, (long)guest_time, (long)vnet_time); - vmm_time = 0; - vnet_time = 0; - guest_time = 0; - last_exit_time = 0; - } -#endif - - - #ifdef CONFIG_TELEMETRY if (info->enable_telemetry) { v3_telemetry_end_exit(info, exit_info->exit_reason);