VirtualBox

Ignore:
Timestamp:
Apr 16, 2012 10:57:44 PM (13 years ago)
Author:
vboxsync
Message:

int-1.d: Fixes and extensions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/dtrace/int-1.d

    r40925 r40955  
    1818#pragma D option quiet
    1919
    20 uint64_t        g_aStarts[uint32_t];
    21 unsigned int    g_cHits;
     20uint64_t g_aStarts[uint32_t];
     21uint64_t g_cUntaggedHighs;
     22uint64_t g_cUntaggedGets;
     23uint64_t g_cMissedHighs;
    2224
     25inline uint32_t kfDevIdMask = 0x3ff;
     26
     27
     28/*
     29 * Timestamp the when the device raises the IRQ.
     30 */
    2331vboxvmm*:::pdm-irq-high,vboxvmm*:::pdm-irq-hilo
    2432/args[1] != 0/
     
    2836}
    2937
     38vboxvmm*:::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 */
     47vboxvmm*:::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
    3055vboxvmm*:::pdm-irq-get
    3156/g_aStarts[args[1]] > 0 && args[1] != 0/
    3257{
    33     @interrupts[args[3], args[2]] = count();
    3458    /*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]]);
    3863    g_aStarts[args[1]] = 0;
    3964    g_cHits++;
     
    4166
    4267vboxvmm*:::pdm-irq-get
    43 /g_cHits >= 512/
     68/args[1] == 0/
     69{
     70    @g_UntaggedGets[args[3]] = count();
     71    g_cUntaggedGets++;
     72}
     73
     74vboxvmm*:::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. */
     81vboxvmm*:::pdm-irq-get
     82/g_cHits >= 256/
    4483{
    4584    exit(0);
    4685}
    4786
     87/*
     88 * Catch the device clearing the IRQ.
     89 */
    4890
     91
     92/*
     93 * Report.
     94 */
    4995END
    5096{
    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);
    59107}
     108END
     109/g_cUntaggedHighs > 0/
     110{
     111    printf("Untagged highs: %u\n", g_cUntaggedHighs);
     112}
     113END
     114/g_cUntaggedGets > 0/
     115{
     116    printf("Untagged gets: %u\n", g_cUntaggedGets);
     117    printa("    irq %3d              %@12u\n", @g_UntaggedGets);
     118}
     119END
     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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette