X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_profiler.c;h=46a9e5e9ba372aba72eaaaf8367d17c0ed7db514;hb=990ef457de6998f79947c81a16c8e7f843e784c0;hp=02bac1515cd251ae076727a4019356a028fd7347;hpb=2bfd0e9c8aa5d520e4207fd6cf50a5f50993e3ca;p=palacios.git diff --git a/palacios/src/palacios/vmm_profiler.c b/palacios/src/palacios/vmm_profiler.c index 02bac15..46a9e5e 100644 --- a/palacios/src/palacios/vmm_profiler.c +++ b/palacios/src/palacios/vmm_profiler.c @@ -37,6 +37,7 @@ void v3_init_profiler(struct guest_info * info) { info->profiler.start_time = 0; info->profiler.end_time = 0; + info->profiler.guest_pf_cnt = 0; info->profiler.root.rb_node = NULL; } @@ -119,7 +120,11 @@ void v3_profile_exit(struct guest_info * info, uint_t exit_code) { insert_event(info, evt); } - evt->handler_time += time; + + + evt->handler_time = (evt->handler_time * .99) + (time * .01); + + evt->exit_count++; info->profiler.total_exits++; @@ -130,6 +135,8 @@ void v3_print_profile(struct guest_info * info) { struct exit_event * evt = NULL; struct rb_node * node = v3_rb_first(&(info->profiler.root)); + PrintDebug("GUEST_PF: %u\n", info->profiler.guest_pf_cnt); + do { evt = rb_entry(node, struct exit_event, tree_node); const char * code_str = vmexit_code_to_str(evt->exit_code);