Created
February 6, 2017 03:18
-
-
Save fortitudepub/2965b9cf86020290a00049bd0e36317d to your computer and use it in GitHub Desktop.
system tap @cast example
This file contains hidden or 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
function string_ops:string (val) %{ | |
strlcpy (STAP_RETVALUE, (char*)STAP_ARG_val, MAXSTRINGLEN); | |
%} | |
probe kernel.function("udp_gro_receive") { | |
if (cpu() == 0) { | |
printf("udp_gro_receive %d %s(%d/%d) %s %d, %d, %d\n", gettimeofday_us(), execname(), pid(), cpu(), $$vars, $skb->ip_summed, @cast($skb->cb, "struct napi_gro_cb")->csum_cnt, @cast($skb->cb, "struct napi_gro_cb")->csum_valid); | |
print_backtrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment