From: George Dunlap Subject: [PATCH 2 of 7] xenalyze: Process NPFs as generic for summary purposes Date: Wed, 10 Oct 2012 12:17:30 +0100 Message-ID: <4ea8fb7197ff3fad82b2.1349867850@elijah> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: george.dunlap@eu.citrix.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User George Dunlap # 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 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; } }