pfunct(1)
π pfunct(1) π
okay bestie, welcome to the manual page for pfunct, part of the dwarves crew, living in section 1 of your manual. she's that girl who reads your debug info and spills everything about your functions. no gatekeeping. π
β¨ NAME β¨
pfunct β Shows function information in debug information.
π¦ SYNOPSIS π¦
pfunct [options] files
πΈ DESCRIPTION πΈ
so pfunct shows functions, their parameters and associated statistics encoded in debugging information formats β and the supported formats are DWARF and BTF. that's it, that's the vibe. π
the files you hand her must have associated debugging information. and like, that info can live inside the file itself in ELF sections, or it can chill in another file entirely. she'll find it.
one way to get that info in there is to pass the -g option to the compiler when you're building. when you do that, the info gets stored in an ELF section. for the DWARF debugging information format, this adds β among others β the .debug_info ELF section. for CTF it's found in just one ELF section, .SUNW_ctf. BTF comes in at least the .BTF ELF section, and may come also with the .BTF.ext ELF section. πβ¨
the debuginfo packages available in most Linux distributions are also supported by pfunct, where the debugging information is available in a separate file. so if your distro ships them, you're already set, periodt. π«Ά
if no files are specified, then it will look if the /sys/kernel/btf/vmlinux is present, using the BTF information present in it about the running kernel β i.e. this works:
$ pfunct ip_send_skb
int ip_send_skb(struct net * net, struct sk_buff * skb);
alternatively a file can be specified:
$ pfunct --format_path=dwarf ip_send_skb /path/2/vmlinux
int ip_send_skb(struct net * net, struct sk_buff * skb);
Split BTF β like the BTF for a kernel module β references types in a base BTF, normally the BTF for vmlinux. use--btf_baseto supply that base BTF when loading a detached split-BTF file. and for files under/sys/kernel/btf/other than vmlinux itself, pfunct automatically uses/sys/kernel/btf/vmlinuxas the base BTF. she's got you, fr fr. π
π OPTIONS π
pfunct supports the following options. buckle up bestie, there's a lot of them and honestly? iconic. β¨
-C,--class_name=CLASS_NAMESβ Show just these classes. This can be a comma separated list of class names or file URLs (e.g.:file://class_list.txt)-a,--addr=ADDRβ Show just the function where ADDR is.-a,--allβ Show all the functions that match the filter, or show all function prototypes if no filter is specified.-b,--expand_typesβ Expand types needed by the prototype.-c,--class=CLASSβ Filter for functions that have CLASS pointer parameters.-E,--externalsβ Show just external functions (DWARF only).-f,--function=FUNCTIONβ Show just FUNCTION.-F,--format_pathβ Allows specifying a list of debugging formats to try, in order. Right now this includes"btf","ctf"and"dwarf". The default format path used is equivalent to"-F dwarf,btf,ctf".--btf_base=PATHβ Use PATH as the base BTF when loading split BTF. If no format path is given, this selects BTF loading. This option is not needed for kernel module BTF read from/sys/kernel/btf/MODULE, where the vmlinux BTF is selected automatically.-g,--goto_labelsβ Show number of goto labels (DWARF only).-G--cc_unlinlinedβ Declared inline, uninlined by the compiler (DWARF only).-H,--cc_inlinedβ Not declared inline, inlined by compiler (DWARF only).-i,--inline_expansionsβ Show inline expansion stats (DWARF only).-l,--decl_infoβ Show source code info.-t,--total_inline_statsβ Show multi-CU total inline expansion stats (DWARF only).-s,--sizesβ Show sizes of functions.-N,--function_name_lenβ Show size of function names.-p,--nr_parmsβ Show number of parameters.-P,--show_function_prototypesβ Show function prototypes.-S,--nr_variablesβ Show number of variables.-T,--variablesβ Show variables.-V,--verboseβ Be verbose.--symtab=NAMEβ Show symbol table NAME (default.symtab).--compileβ Generate compilable source code with types expanded (Default all functions).--no_parm_namesβ Do not show parameter names.
π§ NOTES π§
to enable the generation of debugging information in the Linux kernel build process, select CONFIG_DEBUG_INFO. you can do this using make menuconfig by this path: "Kernel Hacking" -> "Compile-time checks and compiler options" -> "Compile the kernel with debug info". consider as well enabling CONFIG_DEBUG_INFO_BTF by going thru the aforementioned menuconfig path and then selecting "Generate BTF typeinfo". most modern distributions with eBPF support should come with that in all its kernels, greatly facilitating the use of pahole. slay. π₯
many distributions also come with debuginfo packages, so just enable it in your package manager repository configuration and install the kernel-debuginfo, or any other userspace program written in a language that the compiler generates debuginfo (C, C++, for instance). π
π EXAMPLES π
show a function (using /sys/kernel/btf/vmlinux):
$ pfunct ip_send_skb
int ip_send_skb(struct net * net, struct sk_buff * skb);
$
show a function in DWARF in file vmlinux:
$ pfunct --format_path=DWARF ip_send_skb vmlinux
int ip_send_skb(struct net * net, struct sk_buff * skb);
show all functions in detached split BTF using its vmlinux base:
$ pfunct --btf_base=vmlinux.btf --all module.btf
...
show functions that were not declared with "inline" but were inlined:
$ pfunct --cc_inlined ~/src/bpf-next/vmlinux
clean_cache_range
copy_from_user_nmi
__insn_get_emulate_prefix
π SEE ALSO π
pahole(1), readelf(1), objdump(1).
please send bug reports to <dwarves@vger.kernel.org>.
no subscription is required. π«Ά
dwarves Β· September 2, 2026 β and that's the whole page bestie, you ate it up, go read your debug info now π β¨π¦
π¦ where this page comes from
- fedora 43: dwarves 1.32-1.fc43 Β· GPL-2.0-only
- fedora 44: dwarves 1.32-1.fc44 Β· GPL-2.0-only
- nixpkgs unstable: pahole 1.32
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms