Skip to content

Commit

Permalink
Add kretprobe missed event message
Browse files Browse the repository at this point in the history
Signed-off-by: smcdef <smcdef@outlook.com>
  • Loading branch information
smcdef committed May 3, 2020
1 parent 072e643 commit ca2b172
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions init.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ static void __exit kprobes_exit(void)
/* Unregister kretprobes */
while (--kretprobe_ptr >= __start_kretprobe_template) {
struct kretprobe *kretprobe = *kretprobe_ptr;
int nmissed = kretprobe->nmissed;

if (nmissed)
pr_info("kretprobe missed probing %d instances"
" of %pS\n", nmissed, kretprobe->kp.addr);

pr_info("kretprobe unregister at %pS\n", kretprobe->kp.addr);
unregister_kretprobe(kretprobe);
Expand Down

0 comments on commit ca2b172

Please sign in to comment.