---
title: "Fentry & Fexit trampolines"
---

> Documentation Index
> Fetch the complete documentation index at: https://example.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fentry & Fexit trampolines

[fentry](https://example.com/ebpf-field-guide/glossary/#fentry) and `fexit` replace kprobe breakpoint traps with a direct BTF-powered BPF trampoline call—cutting hook invocation cost dramatically while giving typed access to function arguments.

Even better, `fexit` sees *both* the original input arguments and the return value in a single hook, eliminating the extra map lookup `kretprobes` need to correlate entry and exit.

> **Key idea:** Whenever you need to trace a kernel function on Linux 5.5+ with BTF, fentry/fexit is strictly faster and cleaner than kprobe/kretprobe.

Source: https://example.com/ebpf-field-guide/tracing-security-and-overhead/tracing-and-lsm/fentry/index.mdx
