1libtraceevent(3)
2================
3
4NAME
5----
6tep_find_function,tep_find_function_address - Find function name / start address.
7
8SYNOPSIS
9--------
10[verse]
11--
12*#include <event-parse.h>*
13
14const char pass:[*]*tep_find_function*(struct tep_handle pass:[*]_tep_, unsigned long long _addr_);
15unsigned long long *tep_find_function_address*(struct tep_handle pass:[*]_tep_, unsigned long long _addr_);
16--
17
18DESCRIPTION
19-----------
20These functions can be used to find function name and start address, by given
21address. The given address does not have to be exact, it will select the function
22that would contain it.
23
24The _tep_find_function()_ function returns the function name, which contains the
25given address _addr_. The _tep_ argument is the trace event parser context.
26
27The _tep_find_function_address()_ function returns the function start address,
28by given address _addr_. The _addr_ does not have to be exact, it will select the
29function that would contain it. The _tep_ argument is the trace event parser context.
30
31RETURN VALUE
32------------
33The _tep_find_function()_ function returns the function name, or NULL in case
34it cannot be found.
35
36The _tep_find_function_address()_ function returns the function start address,
37or 0 in case it cannot be found.
38
39EXAMPLE
40-------
41[source,c]
42--
43#include <event-parse.h>
44...
45struct tep_handle *tep = tep_alloc();
46...
47void show_function( unsigned long long addr)
48{
49	const char *fname = tep_find_function(tep, addr);
50	unsigned long long fstart = tep_find_function_address(tep, addr);
51
52	/* addr is in function named fname, starting at fstart address, at offset (addr - fstart) */
53}
54...
55--
56
57FILES
58-----
59[verse]
60--
61*event-parse.h*
62	Header file to include in order to have access to the library APIs.
63*-ltraceevent*
64	Linker switch to add when building a program that uses the library.
65--
66
67SEE ALSO
68--------
69_libtraceevent(3)_, _trace-cmd(1)_
70
71AUTHOR
72------
73[verse]
74--
75*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
76*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
77--
78REPORTING BUGS
79--------------
80Report bugs to  <linux-trace-devel@vger.kernel.org>
81
82LICENSE
83-------
84libtraceevent is Free Software licensed under the GNU LGPL 2.1
85
86RESOURCES
87---------
88https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
89