VirtualBox

source: vbox/trunk/src/VBox/VMM/dtrace/int-1.d@ 40925

Last change on this file since 40925 was 40925, checked in by vboxsync, 13 years ago

duh + device ids

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/* $Id: int-1.d 40925 2012-04-14 17:04:18Z vboxsync $ */
2/** @file
3 * DTracing VBox - Interrupt Experiment #1.
4 */
5
6/*
7 * Copyright (C) 2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#pragma D option quiet
19
20uint64_t g_aStarts[uint32_t];
21unsigned int g_cHits;
22
23vboxvmm*:::pdm-irq-high,vboxvmm*:::pdm-irq-hilo
24/args[1] != 0/
25{
26 /*printf("high: tag=%#x src=%d %llx -> %llx\n", args[1], args[2], g_aStarts[args[1]], timestamp);*/
27 g_aStarts[args[1]] = timestamp;
28}
29
30vboxvmm*:::pdm-irq-get
31/g_aStarts[args[1]] > 0 && args[1] != 0/
32{
33 @interrupts[args[3], args[2]] = count();
34 /*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]]);
38 g_aStarts[args[1]] = 0;
39 g_cHits++;
40}
41
42vboxvmm*:::pdm-irq-get
43/g_cHits >= 512/
44{
45 exit(0);
46}
47
48
49END
50{
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);
59}
Note: See TracBrowser for help on using the repository browser.

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