1LIBTRACEEVENT(3)             libtraceevent Manual             LIBTRACEEVENT(3)
2
3
4

NAME

6       tep_find_function, tep_find_function_address - Find function name /
7       start address.
8

SYNOPSIS

10       #include <event-parse.h>
11
12       const char *tep_find_function(struct tep_handle *tep, unsigned long long addr);
13       unsigned long long tep_find_function_address(struct tep_handle *tep, unsigned long long addr);
14

DESCRIPTION

16       These functions can be used to find function name and start address, by
17       given address. The given address does not have to be exact, it will
18       select the function that would contain it.
19
20       The tep_find_function() function returns the function name, which
21       contains the given address addr. The tep argument is the trace event
22       parser context.
23
24       The tep_find_function_address() function returns the function start
25       address, by given address addr. The addr does not have to be exact, it
26       will select the function that would contain it. The tep argument is the
27       trace event parser context.
28

RETURN VALUE

30       The tep_find_function() function returns the function name, or NULL in
31       case it cannot be found.
32
33       The tep_find_function_address() function returns the function start
34       address, or 0 in case it cannot be found.
35

EXAMPLE

37           #include <event-parse.h>
38           ...
39           struct tep_handle *tep = tep_alloc();
40           ...
41           void show_function( unsigned long long addr)
42           {
43                   const char *fname = tep_find_function(tep, addr);
44                   unsigned long long fstart = tep_find_function_address(tep, addr);
45
46                   /* addr is in function named fname, starting at fstart address, at offset (addr - fstart) */
47           }
48           ...
49

FILES

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

SEE ALSO

57       libtraceevent(3), trace-cmd(1)
58

AUTHOR

60           Steven Rostedt <rostedt@goodmis.org[1]>, author of libtraceevent.
61           Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>, author of this man page.
62

REPORTING BUGS

64       Report bugs to <linux-trace-devel@vger.kernel.org[3]>
65

LICENSE

67       libtraceevent is Free Software licensed under the GNU LGPL 2.1
68

RESOURCES

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

NOTES

73        1. rostedt@goodmis.org
74           mailto:rostedt@goodmis.org
75
76        2. tz.stoyanov@gmail.com
77           mailto:tz.stoyanov@gmail.com
78
79        3. linux-trace-devel@vger.kernel.org
80           mailto:linux-trace-devel@vger.kernel.org
81
82
83
84libtraceevent 1.1.1               02/08/2021                  LIBTRACEEVENT(3)
Impressum