summaryrefslogtreecommitdiff
path: root/stp/ccid.stp
blob: 1d06061e5b662cd5b345fe371a10787efbe1daae (plain)
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
/*
// This leads to unreadable probles = single_name arg1=a arg2=b
probe process("/home/alon/spice/upstream/bin/qemu-system-x86_64").mark("ccid_*") {
    printf("%d %s\n", pid(), $$parms);
}
*/

/*
probe qemu.system.x86_64.ccid_control {
}

probe qemu.system.x86_64.ccid_bulk_out {
}
*/

probe qemu.system.x86_64.ccid_xfr_block {
    printf("[%d]%s:           %d:%d %d ", pid(), $$name, slot, seq, len);
    for (i = 0 ; i < len ; ++i)
        printf("%M", data + i);
    printf("\n");
}

global ignored_81 = 0;

probe qemu.system.x86_64.ccid_bulk_in_ret {
    // ignore RDR_to_PC_SlotStatus (0x81)
    if (type == 0x81) {
        ignored_81++;
        next;
    }
    if (ignored_81 > 0) {
        printf("[%d]%s: ignored %d RDR_to_PC_SlotStatus\n", pid(), $$name, ignored_81);
        ignored_81 = 0;
    }
    printf("[%d]%s: %d, %d, %d:%d,%d (%d..|%d|..%d/%d) ", pid(), $$name, pid, id, slot, seq, type, pos, ret, len, size);
    for (i = 0 ; i < ret ; ++i) {
        printf("%M", data + i);
    }
    printf("\n");
}

probe qemu.system.x86_64.ccid_int_in {
    printf("[%d]%s: %d\n", pid(), $$name, slot_icc_state);
}

probe qemu.system.x86_64.ccid_icc_power_on {
    printf("[%d]%s: %d\n", pid(), $$name, inserted);
}

probe qemu.system.x86_64.ccid_icc_power_off {
    printf("[%d]%s: %d\n", pid(), $$name, inserted);
}

probe qemu.system.x86_64.ccid_migrate_with_bulk_in {
    printf("[%d]%s: %d, %d\n", pid(), $$name, bulk_in_pending_start, bulk_in_pending_end);
}

probe process("/home/alon/spice/upstream/lib/libspice-server.so.1").function("spice_char_device_write_to_device") {
    printf("[%d]spice_char_device_write_to_device\n", pid());
}

probe process("/home/alon/spice/upstream/lib/libspice-server.so.1").function("spice_char_device_read_from_device") {
    printf("[%d]spice_char_device_read_from_device\n", pid());
}

/*
probe qemu.system.x86_64.ccid* {
    printf("%s %s\n", $$name, $$vars);
}
*/