-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpoke.xd
executable file
·105 lines (89 loc) · 1.18 KB
/
poke.xd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/sbin/dtrace -qs
BEGIN
{
poketime = 0;
}
poke_cpu:entry
{
if (args[0] == 1) {
/*
printf(" %s cpuid=%u\n",
probefunc,
args[0]);
*/
if (poketime == 0) {
poketime = timestamp;
}
}
}
apic_intr_enter:return
{
if (cpu == 1 && poketime) {
@asdf[arg1] = count();
@[probefunc] = quantize(timestamp - poketime);
}
}
interrupt-start
{
if (cpu == 1 && poketime) {
@intrfunc[(void *)arg1] = count();
}
}
disp:entry
{
if (cpu == 1 && poketime) {
@[probefunc] = quantize(timestamp - poketime);
poketime = 0;
}
}
av_dispatch_autovect:entry
{
if (cpu == 1 && poketime) {
@av[arg0] = count();
}
}
hilevel_intr_prolog:entry
{
if (args[0]->cpu_id == 1) {
@prol[args[1], args[2], args[0]->cpu_intr_actv] = count();
}
}
hilevel_intr_epilog:entry
{
if (args[0]->cpu_id == 1) {
@intrs[args[0]->cpu_intr_actv] = count();
}
}
/*
disp:return
{
if (cpu == 1) {
printf("%s -> %p\n",
probefunc,
arg1);
}
}
profile-997
{
if (poketime && cpu == 1) {
@waitfor[stack()] = count();
@waitforthr[curthread] = count();
}
}
*/
/*
xc_serv:return
{
@xc[cpu] = sum(entry->elapsed_ns);
}
tick-1s
{
printa(@xc);
clear(@xc);
}
*/
/*
END
{
}
*/