]> xenbits.xensource.com Git - xenalyze.git/commitdiff
[global] vmexit-eip scatterplot for trace divergence unstable origin/unstable
authorGeorge Dunlap <dunlapg@silas.(none)>
Mon, 3 Nov 2008 12:30:39 +0000 (12:30 +0000)
committerGeorge Dunlap <dunlapg@silas.(none)>
Mon, 3 Nov 2008 15:12:37 +0000 (15:12 +0000)
(cherry picked from commit b00e68b994874d67716e658a9c1449766ad861e4)

analyze.c

index 18641aae01328282437f76eb8cce52dc62676a60..47ed3ccbf677327dcf04188fec0376e86d1b1a03 100644 (file)
--- a/analyze.c
+++ b/analyze.c
@@ -59,6 +59,7 @@ struct {
         scatterplot_cr3_switch:1,
         scatterplot_wake_to_halt:1,
         scatterplot_io:1,
         scatterplot_cr3_switch:1,
         scatterplot_wake_to_halt:1,
         scatterplot_io:1,
+        scatterplot_vmexit_eip:1,
         histogram_interrupt_eip:1,
         interval_mode:1,
         dump_cooked:1,
         histogram_interrupt_eip:1,
         interval_mode:1,
         dump_cooked:1,
@@ -119,6 +120,7 @@ struct {
     .scatterplot_unpin_promote=0, 
     .scatterplot_cr3_switch=0,
     .scatterplot_wake_to_halt=0,
     .scatterplot_unpin_promote=0, 
     .scatterplot_cr3_switch=0,
     .scatterplot_wake_to_halt=0,
+    .scatterplot_vmexit_eip=0,
     .histogram_interrupt_eip=0,
     .dump_cooked = 0,
     .dump_all = 0,
     .histogram_interrupt_eip=0,
     .dump_cooked = 0,
     .dump_all = 0,
@@ -4608,6 +4610,9 @@ void hvm_vmexit_process(struct record_info *ri, struct hvm_data *h,
         exit(1);
     }
 
         exit(1);
     }
 
+    if(opt.scatterplot_vmexit_eip)
+        scatterplot_vs_time(ri->tsc, h->rip);
+
     if(h->exit_reason > h->exit_reason_max)
     {
         fprintf(warn, "h->exit_reason %lx > exit_reason_max %lx!\n",
     if(h->exit_reason > h->exit_reason_max)
     {
         fprintf(warn, "h->exit_reason %lx > exit_reason_max %lx!\n",
@@ -7502,6 +7507,7 @@ enum {
     OPT_SCATTERPLOT_CR3_SWITCH,
     OPT_SCATTERPLOT_WAKE_TO_HALT,
     OPT_SCATTERPLOT_IO,
     OPT_SCATTERPLOT_CR3_SWITCH,
     OPT_SCATTERPLOT_WAKE_TO_HALT,
     OPT_SCATTERPLOT_IO,
+    OPT_SCATTERPLOT_VMEXIT_EIP,
     OPT_HISTOGRAM_INTERRUPT_EIP,
     /* Interval options */
     OPT_INTERVAL_CR3_SCHEDULE_TIME,
     OPT_HISTOGRAM_INTERRUPT_EIP,
     /* Interval options */
     OPT_INTERVAL_CR3_SCHEDULE_TIME,
@@ -7717,6 +7723,10 @@ error_t cmd_parser(int key, char *arg, struct argp_state *state)
         G.output_defined = 1;
         opt.scatterplot_wake_to_halt=1;
         break;
         G.output_defined = 1;
         opt.scatterplot_wake_to_halt=1;
         break;
+    case OPT_SCATTERPLOT_VMEXIT_EIP:
+        G.output_defined = 1;
+        opt.scatterplot_vmexit_eip=1;
+        break;
     case OPT_SCATTERPLOT_IO:
     {
         char * inval;
     case OPT_SCATTERPLOT_IO:
     {
         char * inval;
@@ -8024,6 +8034,11 @@ const struct argp_option cmd_opts[] =  {
       .group = OPT_GROUP_EXTRA,
       .doc = "Output scatterplot of wake-to-halt.", },
 
       .group = OPT_GROUP_EXTRA,
       .doc = "Output scatterplot of wake-to-halt.", },
 
+    { .name = "scatterplot-vmexit-eip",
+      .key = OPT_SCATTERPLOT_VMEXIT_EIP,
+      .group = OPT_GROUP_EXTRA,
+      .doc = "Output scatterplot of vmexit eips.", },
+
     { .name = "scatterplot-io",
       .key = OPT_SCATTERPLOT_IO,
       .arg = "port",
     { .name = "scatterplot-io",
       .key = OPT_SCATTERPLOT_IO,
       .arg = "port",