Skip to contentSkip to conversation

xenalyze: Add string for TPR_BELOW_THRESHOLD

PATCH New George Dunlap 1 participant 5 messages Oct 7, 2011 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 xenalyze: Add string for TPR_BELOW_THRESHOLD

In reply to a message not in the archive
xenalyze.c +1 -0
diff -r e11e13e66c62 -r 3556b140d851 xenalyze.c
@@ -574,6 +574,7 @@ char * hvm_vmx_exit_reason_name[HVM_VMX_
 	[EXIT_REASON_MONITOR_INSTRUCTION]="MONITOR_INSTRUCTION",
 	[EXIT_REASON_PAUSE_INSTRUCTION]="PAUSE_INSTRUCTION",
 	[EXIT_REASON_MACHINE_CHECK]="MACHINE_CHECK",
+    [EXIT_REASON_TPR_BELOW_THRESHOLD]="TPR_BELOW_THRESHOLD",
 	[EXIT_REASON_APIC_ACCESS]="APIC_ACCESS",
 	[EXIT_REASON_EPT_VIOLATION]="EPT_VIOLATION",
 	[EXIT_REASON_EPT_MISCONFIG]="EPT_MISCONFIG",
#2 lore raw

PATCH 1/1 xenalyze: Fix minor summary issue

In reply to a message not in the archive

Should be using hvm_cr_write_summary, not hvm_cr3_write_summary.

xenalyze.c +1 -1
diff -r 3556b140d851 -r 9a2c804a8a6f xenalyze.c
@@ -4169,7 +4169,7 @@ void hvm_cr_write_postprocess(struct hvm
         } else {
             /* For vmx, real mode may cause EXNMI exits on cr accesses */
             if ( h->exit_reason !=  EXIT_REASON_EXCEPTION_NMI )
-                hvm_set_summary_handler(h, hvm_cr3_write_summary);
+                hvm_set_summary_handler(h, hvm_cr_write_summary);
         }
     }
 }
#3 lore raw

PATCH 1/1 xenalyze: Print exit reason number if no string is available

In reply to a message not in the archive
xenalyze.c +7 -2
diff -r 9a2c804a8a6f -r a2044b64720b xenalyze.c
@@ -5318,8 +5318,13 @@ void hvm_summary(struct hvm_data *h) {
 
    printf("Exit reasons:\n");
    for(i=0; i<h->exit_reason_max; i++) {
-       PRINT_SUMMARY(h->summary.exit_reason[i],
-                     " %-20s ", h->exit_reason_name[i]);
+       if ( h->exit_reason_name[i] )
+           PRINT_SUMMARY(h->summary.exit_reason[i],
+                         " %-20s ", h->exit_reason_name[i]);
+       else
+           PRINT_SUMMARY(h->summary.exit_reason[i],
+                         " %20d ", i);
+
        if(h->exit_reason_summary_handler[i])
            h->exit_reason_summary_handler[i](h);
    }
#4 lore raw

PATCH 1/1 xenalyze: Decrease verbosity

In reply to a message not in the archive
xenalyze.c +2 -1
diff -r a2044b64720b -r 21e56bad8f2c xenalyze.c
@@ -128,6 +128,7 @@ enum error_level {
     ERR_SYSTEM, /* System error: cannot allocate memory, short read, &c */
 };
 
+int verbosity = 5;
 
 struct {
     unsigned 
@@ -8163,7 +8164,7 @@ void process_cpu_change(struct pcpu_info
     struct record_info *ri = &p->ri;
     struct cpu_change_data *r = (typeof(r))ri->d;
 
-    if(opt.dump_all) {
+    if(opt.dump_all && verbosity >= 6) {
         printf("]%s cpu_change this-cpu %u record-cpu %u window_size %u(0x%08x)\n",
                ri->dump_header, p->pid, r->cpu, r->window_size,
                r->window_size);
#5 lore raw

PATCH 1/1 xenalyze: Handle new IRQ tracing

In reply to a message not in the archive
analyze.h +14 -1
diff -r 21e56bad8f2c -r 4833fe142a4f analyze.h
@@ -7,10 +7,23 @@
 #define TRC_MEM_MAIN     4
 #define TRC_PV_MAIN      5
 #define TRC_SHADOW_MAIN  6
-#define TRC_PM_MAIN      7
+#define TRC_HW_MAIN      7
 
 #define TRC_LOST_RECORDS_END    (TRC_GEN + 50)
 
+#define NR_CPUS 128
+#if __x86_64__
+# define BITS_PER_LONG 64
+#else
+# define BITS_PER_LONG 32
+#endif
+
+#define BITS_TO_LONGS(bits) \
+    (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
+#define DECLARE_BITMAP(name,bits) \
+    unsigned long name[BITS_TO_LONGS(bits)]
+typedef struct cpumask{ DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+
 enum {
     TRCE_SFLAG_SET_AD,
     TRCE_SFLAG_SET_A,
trace.h +22 -9
diff -r 21e56bad8f2c -r 4833fe142a4f trace.h
@@ -38,7 +38,7 @@
 #define TRC_MEM      0x0010f000    /* Xen memory trace         */
 #define TRC_PV       0x0020f000    /* Xen PV traces            */
 #define TRC_SHADOW   0x0040f000    /* Xen shadow tracing       */
-#define TRC_PM       0x0080f000    /* Xen power management trace */
+#define TRC_HW       0x0080f000    /* Xen hardware-related traces */
 #define TRC_GUEST    0x0800f000    /* Guest-generated traces   */
 #define TRC_ALL      0x0ffff000
 #define TRC_HD_TO_EVENT(x) ((x)&0x0fffffff)
@@ -57,11 +57,13 @@
 #define TRC_SCHED_CLASS     0x00022000   /* Scheduler-specific    */
 #define TRC_SCHED_VERBOSE   0x00028000   /* More inclusive scheduling */
 
+#define TRC_HW_PM           0x00801000   /* Power management traces */
+#define TRC_HW_IRQ          0x00802000   /* Traces relating to the handling of IRQs */
+
 /* Trace events per class */
 #define TRC_LOST_RECORDS        (TRC_GEN + 1)
 #define TRC_TRACE_WRAP_BUFFER  (TRC_GEN + 2)
 #define TRC_TRACE_CPU_CHANGE    (TRC_GEN + 3)
-#define TRC_TRACE_IRQ           (TRC_GEN + 4)
 
 #define TRC_SCHED_RUNSTATE_CHANGE   (TRC_SCHED_MIN + 1)
 #define TRC_SCHED_CONTINUE_RUNNING  (TRC_SCHED_MIN + 2)
@@ -164,14 +166,25 @@
 #define TRC_HVM_IOPORT_WRITE    (TRC_HVM_HANDLER + 0x216)
 #define TRC_HVM_IOMEM_WRITE     (TRC_HVM_HANDLER + 0x217)
 
-/* trace subclasses for power management */
-#define TRC_PM_FREQ     0x00801000      /* xen cpu freq events */
-#define TRC_PM_IDLE     0x00802000      /* xen cpu idle events */
+/* trace events for per class */
+#define TRC_PM_FREQ_CHANGE      (TRC_HW_PM + 0x01)
+#define TRC_PM_IDLE_ENTRY       (TRC_HW_PM + 0x02)
+#define TRC_PM_IDLE_EXIT        (TRC_HW_PM  + 0x03)
 
-/* trace events for per class */
-#define TRC_PM_FREQ_CHANGE      (TRC_PM_FREQ + 0x01)
-#define TRC_PM_IDLE_ENTRY       (TRC_PM_IDLE + 0x01)
-#define TRC_PM_IDLE_EXIT        (TRC_PM_IDLE + 0x02)
+#define TRC_HW_IRQ_MOVE_CLEANUP_DELAY (TRC_HW_IRQ + 0x1)
+#define TRC_HW_IRQ_MOVE_CLEANUP       (TRC_HW_IRQ + 0x2)
+#define TRC_HW_IRQ_BIND_VECTOR        (TRC_HW_IRQ + 0x3)
+#define TRC_HW_IRQ_CLEAR_VECTOR       (TRC_HW_IRQ + 0x4)
+#define TRC_HW_IRQ_MOVE_FINISH        (TRC_HW_IRQ + 0x5)
+#define TRC_HW_IRQ_ASSIGN_VECTOR      (TRC_HW_IRQ + 0x6)
+#define TRC_HW_IRQ_UNMAPPED_VECTOR    (TRC_HW_IRQ + 0x7)
+#define TRC_HW_IRQ_HANDLED            (TRC_HW_IRQ + 0x8)
+#define TRC_HW_IRQ_MSI_WRITE          (TRC_HW_IRQ + 0x9)
+#define TRC_HW_IRQ_MAP_PIRQ_MSI       (TRC_HW_IRQ + 0xa)
+#define TRC_HW_IRQ_MAP_PIRQ_GSI       (TRC_HW_IRQ + 0xb)
+#define TRC_HW_IRQ_MSI_SET_AFFINITY   (TRC_HW_IRQ + 0x10)
+#define TRC_HW_IRQ_SET_DESC_AFFINITY  (TRC_HW_IRQ + 0x11)
+#define TRC_HW_IRQ_IOMMU_AMD_IRE      (TRC_HW_IRQ + 0x12)
 
 /* This structure represents a single trace buffer record. */
 struct t_rec {
xenalyze.c +391 -6

445 lines not on this page · raw message