Last active
May 21, 2017 15:48
-
-
Save bisco/3506708c2dbd7ae9fed3025449e9fd2e to your computer and use it in GitHub Desktop.
systemtap test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/stap -gv | |
probe begin { | |
printf("force stop warning short TX\n") | |
} | |
probe end { | |
printf("stop probe\n") | |
} | |
global changed = 0 | |
probe kernel.statement("handle_tx_event@drivers/usb/host/xhci-ring.c:2380") { | |
$xhci->quirks = $xhci->quirks | (1 << 10) # XHCI_TRUST_TX_LENGTH = (1<<10) | |
changed = 1 | |
# printf("NO QUIRK OK\n"); | |
} | |
global g_trb_comp_code = 0 | |
probe kernel.statement("handle_tx_event@drivers/usb/host/xhci-ring.c:2477") { | |
if(changed) { | |
changed = 0 | |
$trb_comp_code = 1 | |
} | |
next_addr = @cast(&$ep_ring->td_list, "list_head", "kernel")->next | |
list_addr = &$ep_ring->td_list | |
if(next_addr == list_addr) { | |
g_trb_comp_code = $trb_comp_code | |
$trb_comp_code = 26 # COMP_STOP | |
} | |
} | |
probe kernel.statement("handle_tx_event@drivers/usb/host/xhci-ring.c:2493") { | |
if(g_trb_comp_code) { | |
$trb_comp_code = g_trb_comp_code | |
g_trb_comp_code = 0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment