Changeset 40955 in vbox for trunk/src/VBox/VMM/dtrace/int-1.d
- Timestamp:
- Apr 16, 2012 10:57:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/dtrace/int-1.d
r40925 r40955 18 18 #pragma D option quiet 19 19 20 uint64_t g_aStarts[uint32_t]; 21 unsigned int g_cHits; 20 uint64_t g_aStarts[uint32_t]; 21 uint64_t g_cUntaggedHighs; 22 uint64_t g_cUntaggedGets; 23 uint64_t g_cMissedHighs; 22 24 25 inline uint32_t kfDevIdMask = 0x3ff; 26 27 28 /* 29 * Timestamp the when the device raises the IRQ. 30 */ 23 31 vboxvmm*:::pdm-irq-high,vboxvmm*:::pdm-irq-hilo 24 32 /args[1] != 0/ … … 28 36 } 29 37 38 vboxvmm*:::pdm-irq-high,vboxvmm*:::pdm-irq-hilo 39 /args[1] == 0/ 40 { 41 g_cUntaggedHighs++; 42 } 43 44 /* 45 * Catch the CPU getting the IRQ from the (A)PIC and preparing for injection. 46 */ 47 vboxvmm*:::pdm-irq-get 48 /g_aStarts[args[1]] == 0 && args[1] != 0/ 49 { 50 printf("get: tag=%#x src=%d %llx - %llx = %llx\n", args[1], args[2], timestamp, g_aStarts[args[1]], timestamp - g_aStarts[args[1]]); 51 @g_MissedHighs[args[3], args[2] & kfDevIdMask] = count(); 52 g_cMissedHighs++; 53 } 54 30 55 vboxvmm*:::pdm-irq-get 31 56 /g_aStarts[args[1]] > 0 && args[1] != 0/ 32 57 { 33 @interrupts[args[3], args[2]] = count();34 58 /*printf("get: tag=%#x src=%d %llx - %llx = %llx\n", args[1], args[2], timestamp, g_aStarts[args[1]], timestamp - g_aStarts[args[1]]);*/ 35 @dispavg[args[3], args[2]] = avg(timestamp - g_aStarts[args[1]]); 36 @dispmax[args[3], args[2]] = max(timestamp - g_aStarts[args[1]]); 37 @dispmin[args[3], args[2]] = min(timestamp - g_aStarts[args[1]]); 59 @g_Interrupts[args[3], args[2] & kfDevIdMask] = count(); 60 @g_DispAvg[ args[3], args[2] & kfDevIdMask] = avg(timestamp - g_aStarts[args[1]]); 61 @g_DispMax[ args[3], args[2] & kfDevIdMask] = max(timestamp - g_aStarts[args[1]]); 62 @g_DispMin[ args[3], args[2] & kfDevIdMask] = min(timestamp - g_aStarts[args[1]]); 38 63 g_aStarts[args[1]] = 0; 39 64 g_cHits++; … … 41 66 42 67 vboxvmm*:::pdm-irq-get 43 /g_cHits >= 512/ 68 /args[1] == 0/ 69 { 70 @g_UntaggedGets[args[3]] = count(); 71 g_cUntaggedGets++; 72 } 73 74 vboxvmm*:::pdm-irq-get 75 /args[2] > kfDevIdMask/ 76 { 77 @g_Shared[args[3], args[2] & kfDevIdMask] = count(); 78 } 79 80 /* For the time being, quit after 256 interrupts. */ 81 vboxvmm*:::pdm-irq-get 82 /g_cHits >= 256/ 44 83 { 45 84 exit(0); 46 85 } 47 86 87 /* 88 * Catch the device clearing the IRQ. 89 */ 48 90 91 92 /* 93 * Report. 94 */ 49 95 END 50 96 { 51 printf("\nInterrupt distribution:"); 52 printa(@interrupts); 53 printf("Average dispatch latency:"); 54 printa(@dispavg); 55 printf("Minimax dispatch latency:"); 56 printa(@dispmin); 57 printf("Maximum dispatch latency:"); 58 printa(@dispmax); 97 printf("\nInterrupt distribution:\n"); 98 printa(" irq %3d dev %2d %@12u\n", @g_Interrupts); 99 printf("Interrupt sharing (devices detect pushing a line high at the same time):\n"); 100 printa(" irq %3d dev %2d %@12u\n", @g_Shared); 101 printf("Minimum dispatch latency:\n"); 102 printa(" irq %3d dev %2d %@12u ns\n", @g_DispMin); 103 printf("Average dispatch latency:\n"); 104 printa(" irq %3d dev %2d %@12u ns\n", @g_DispAvg); 105 printf("Maximum dispatch latency:\n"); 106 printa(" irq %3d dev %2d %@12u ns\n", @g_DispMax); 59 107 } 108 END 109 /g_cUntaggedHighs > 0/ 110 { 111 printf("Untagged highs: %u\n", g_cUntaggedHighs); 112 } 113 END 114 /g_cUntaggedGets > 0/ 115 { 116 printf("Untagged gets: %u\n", g_cUntaggedGets); 117 printa(" irq %3d %@12u\n", @g_UntaggedGets); 118 } 119 END 120 /g_cMissedHighs > 0/ 121 { 122 printf("Missed (or shared?) highs: %u\n", g_cMissedHighs); 123 printa(" irq %3d dev %2d %@12u\n", @g_MissedHighs); 124 } 125
Note:
See TracChangeset
for help on using the changeset viewer.