Debian Codegraph @

testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp

raw
1 #! /usr/bin/env stap
2 /*
3 * Copyright (C) 2009 IBM Corp.
4 * This file is part of systemtap, and is free software. You can
5 * redistribute it and/or modify it under the terms of the GNU General
6 * Public License (GPL); either version 2, or (at your option) any
7 * later version.
8 *
9 * Version 1.0 [email protected] 2009-10-28
10 *
11 * Name:
12 * interrupts-by-dev.stp
13 *
14 * Description:
15 * Script to profile interrupts received by each device per 100 ms.
16 *
17 *
18 */
19
20 global devices
21
22 probe begin {
23 printf("\t DEVICE \t NUMBER OF INTERRUPTS \n");
24 }
25
26 probe irq_handler.entry {
27 devices[dev_name]++;
28 }
29
30 probe timer.ms(100) {
31 foreach ( devname in devices )
32 printf(" %20s : %5d\n",kernel_string(devname),devices[devname]);
33 delete devices
34 }