From ca2b172a03784fecfd65ae63dd54f8d4c36497e4 Mon Sep 17 00:00:00 2001 From: smcdef Date: Sun, 3 May 2020 13:42:21 +0800 Subject: [PATCH] Add kretprobe missed event message Signed-off-by: smcdef --- init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.c b/init.c index 0f28701..76750ce 100644 --- a/init.c +++ b/init.c @@ -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);