[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2 of 7] xenalyze: Process NPFs as generic for summary purposes



# HG changeset patch
# User George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1349261558 -3600
# Node ID 4ea8fb7197ff3fad82b224a65cdfbe86db66d6ab
# Parent  3230041f50a54889784121579604412fdc260228
xenalyze: Process NPFs as generic for summary purposes

Moves the "generic" post-processing initialization into a function,
and calls that function for NPF processes, so that we can get
summary information about NPF.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff --git a/xenalyze.c b/xenalyze.c
--- a/xenalyze.c
+++ b/xenalyze.c
@@ -4640,6 +4640,8 @@ void hvm_pf_inject_process(struct record
     }
 }
 
+void hvm_generic_postprocess_init(struct record_info *ri, struct hvm_data *h);
+
 void hvm_npf_process(struct record_info *ri, struct hvm_data *h)
 {
     struct {
@@ -4654,6 +4656,9 @@ void hvm_npf_process(struct record_info 
                ri->dump_header,
                (unsigned long long)r->gpa, r->qualification,
                (unsigned long long)r->mfn, r->p2mt);
+
+    if ( opt.summary_info )
+        hvm_generic_postprocess_init(ri, h);
 }
 
 void hvm_rdtsc_process(struct record_info *ri, struct hvm_data *h)
@@ -4695,6 +4700,15 @@ void hvm_generic_summary(struct hvm_data
 
 }
 
+void hvm_generic_postprocess_init(struct record_info *ri, struct hvm_data *h)
+{
+    if ( h->post_process != hvm_generic_postprocess )
+        fprintf(warn, "%s: Strange, h->postprocess set!\n",
+                __func__);
+    h->inflight.generic.event = ri->event;
+    bcopy(h->d, h->inflight.generic.d, sizeof(unsigned int) * 4); 
+}
+
 void hvm_generic_postprocess(struct hvm_data *h)
 {
     long evt = 0;
@@ -4930,15 +4944,10 @@ needs_vmexit:
     case TRC_HVM_CR_READ:
     case TRC_HVM_CR_READ64:
     default:
-        if ( h->post_process != hvm_generic_postprocess )
-            fprintf(warn, "%s: Strange, h->postprocess set!\n",
-                __func__);
-        h->inflight.generic.event = ri->event;
-        bcopy(h->d, h->inflight.generic.d, sizeof(unsigned int) * 4); 
         if(opt.dump_all)
-        {
             hvm_generic_dump(ri, "]");
-        }
+        if(opt.summary_info)
+            hvm_generic_postprocess_init(ri, h);
         break;
     }
 }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.