Skip to content

Commit

Permalink
Remove kretprobe__ prefix from program names
Browse files Browse the repository at this point in the history
Such prefixes are currently removed for kprobes, tracepoints, and raw
tracepoints, but not for kretprobes.  This commit removes it for
kretprobe as well, for consistency.

Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
  • Loading branch information
pchaigno authored and yonghong-song committed Dec 20, 2019
1 parent c71394a commit 0aca2c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cc/libbpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ int bcc_prog_load_xattr(struct bpf_load_program_attr *attr, int prog_len,
if (name_len) {
if (strncmp(attr->name, "kprobe__", 8) == 0)
name_offset = 8;
else if (strncmp(attr->name, "kretprobe__", 11) == 0)
name_offset = 11;
else if (strncmp(attr->name, "tracepoint__", 12) == 0)
name_offset = 12;
else if (strncmp(attr->name, "raw_tracepoint__", 16) == 0)
Expand Down

0 comments on commit 0aca2c7

Please sign in to comment.