-
yonghong-song authored
bcc uses some func prefixes for auto load purpose. These func prefixes include "kprobe__", "tracepoint__" and "raw_tracepoint__". Currently we also pass this function name as the program name to the kernel. The kernel can only accept 16 bytes so long program name will be truncated. For example, with bps we will see something like 287- <raw_tracepoint> 0 2 Jun10/17:07 raw_tracepoint_ 290- tracepoint 0 4 Jun10/17:08 tracepoint__soc 297- kprobe 0 2 Jun10/17:09 kprobe__tcp_cle Such long prefixes are unnecessarily taking the space for the real function name. This patch removed such prefixes before giving them to the kernel. The result will like below: 311- <raw_tracepoint> 0 2 Jun10/17:44 sched_switch 321- tracepoint 0 4 Jun10/17:45 sock__inet_sock 322- kprobe 0 2 Jun10/17:45 tcp_cleanup_rbu Signed-off-by: Yonghong Song <yhs@fb.com>
d83210da