int-1.d revision 5c953e1a8cc975df9c34f55569519fbfb3388537
/* $Id$ */
/** @file
* DTracing VBox - Interrupt Experiment #1.
*/
/*
* Copyright (C) 2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*
* Timestamp the when the device raises the IRQ.
*/
/args[1] != 0/
{
/*printf("high: tag=%#x src=%d %llx -> %llx\n", args[1], args[2], g_aStarts[args[1]], timestamp);*/
}
/args[1] == 0/
{
}
/*
* Catch the CPU getting the IRQ from the (A)PIC and preparing for injection.
*/
{
printf("get: tag=%#x src=%d %llx - %llx = %llx\n", args[1], args[2], timestamp, g_aStarts[args[1]], timestamp - g_aStarts[args[1]]);
}
{
/*printf("get: tag=%#x src=%d %llx - %llx = %llx\n", args[1], args[2], timestamp, g_aStarts[args[1]], timestamp - g_aStarts[args[1]]);*/
g_cHits++;
}
/args[1] == 0/
{
}
{
}
/* For the time being, quit after 256 interrupts. */
/g_cHits >= 256/
{
exit(0);
}
/*
* Catch the device clearing the IRQ.
*/
/*
* Report.
*/
{
printf("\nInterrupt distribution:\n");
printf("Interrupt sharing (devices detect pushing a line high at the same time):\n");
printf("Minimum dispatch latency:\n");
printf("Average dispatch latency:\n");
printf("Maximum dispatch latency:\n");
}
/g_cUntaggedHighs > 0/
{
}
/g_cUntaggedGets > 0/
{
}
/g_cMissedHighs > 0/
{
}