Thread (7 messages) flat view 7 messages, 3 authors, 2026-02-27

Re: [External] Re: [RFC PATCH bpf-next v2 1/3] libbpf: Optimize kprobe.session attachment for exact function names

From: Andrey Grodzovsky <hidden>
Date: 2026-02-27 20:52:25
Also in: bpf

-       if (pattern) {
+       /*
+        * Exact function name (no wildcards): bypass kallsyms parsing
+        * and pass the symbol directly to the kernel via syms[] array.
+        * The kernel's ftrace_lookup_symbols() resolves it efficiently.
+        */
+       if (pattern && !strpbrk(pattern, "*?")) {
+               syms = &pattern;
+               cnt = 1;
+       } else if (pattern) {
                if (has_available_filter_functions_addrs())
                        err = libbpf_available_kprobes_parse(&res);


wdyt?
Totally agree, updated in V3.

Thanks,
Andrey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help