libtraceevent(3)

# libtraceevent(3) Manual Page

## NAME

tep_btf_list_args - Show the arguments of a function from BTF

## SYNOPSIS

    #include <event-parse.h>

    int tep_btf_list_args(struct tep_handle *tep, struct trace_seq *s, const char *func);

## DESCRIPTION

If the Linux kernel has BTF configured, then a binary file will exist in the path of /sys/kernel/btf/vmlinux. If this file is read into memory and passed to tep_load_btf() function, then it can be used to read the arguments of a given function, if that function data is found within the BTF file.

The tep_btf_print_args() takes a tep handle, a trace_seq s pointer (that was initialized by trace_seq_init(3)), and a func string that is the name of the function to find the BTF information to use to print the function’s prototype. If BTF is not loaded or the func name is not found it will return a negative.

## RETURN VALUE

tep_btf_list_args() returns the number of arguments read on success and -1 on failure (for example, if the function is not found).

## EXAMPLE

## FILES

    event-parse.h
            Header file to include in order to have access to the library APIs.
    -ltraceevent
            Linker switch to add when building a program that uses the library.

## SEE ALSO

tep_btf_load(3), tep_btf_print_args(3), libtraceevent(3), trace-cmd(1)

## AUTHOR

    Steven Rostedt <rostedt@goodmis.org>, author of libtraceevent.

## REPORTING BUGS

Report bugs to <linux-trace-devel@vger.kernel.org>

## LICENSE

libtraceevent is Free Software licensed under the GNU LGPL 2.1

## RESOURCES

https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/