0001 libtraceevent(3)
0002 ================
0003
0004 NAME
0005 ----
0006 tep_find_function,tep_find_function_address - Find function name / start address.
0007
0008 SYNOPSIS
0009 --------
0010 [verse]
0011 --
0012 *#include <event-parse.h>*
0013
0014 const char pass:[*]*tep_find_function*(struct tep_handle pass:[*]_tep_, unsigned long long _addr_);
0015 unsigned long long *tep_find_function_address*(struct tep_handle pass:[*]_tep_, unsigned long long _addr_);
0016 --
0017
0018 DESCRIPTION
0019 -----------
0020 These functions can be used to find function name and start address, by given
0021 address. The given address does not have to be exact, it will select the function
0022 that would contain it.
0023
0024 The _tep_find_function()_ function returns the function name, which contains the
0025 given address _addr_. The _tep_ argument is the trace event parser context.
0026
0027 The _tep_find_function_address()_ function returns the function start address,
0028 by given address _addr_. The _addr_ does not have to be exact, it will select the
0029 function that would contain it. The _tep_ argument is the trace event parser context.
0030
0031 RETURN VALUE
0032 ------------
0033 The _tep_find_function()_ function returns the function name, or NULL in case
0034 it cannot be found.
0035
0036 The _tep_find_function_address()_ function returns the function start address,
0037 or 0 in case it cannot be found.
0038
0039 EXAMPLE
0040 -------
0041 [source,c]
0042 --
0043 #include <event-parse.h>
0044 ...
0045 struct tep_handle *tep = tep_alloc();
0046 ...
0047 void show_function( unsigned long long addr)
0048 {
0049 const char *fname = tep_find_function(tep, addr);
0050 unsigned long long fstart = tep_find_function_address(tep, addr);
0051
0052 /* addr is in function named fname, starting at fstart address, at offset (addr - fstart) */
0053 }
0054 ...
0055 --
0056
0057 FILES
0058 -----
0059 [verse]
0060 --
0061 *event-parse.h*
0062 Header file to include in order to have access to the library APIs.
0063 *-ltraceevent*
0064 Linker switch to add when building a program that uses the library.
0065 --
0066
0067 SEE ALSO
0068 --------
0069 _libtraceevent(3)_, _trace-cmd(1)_
0070
0071 AUTHOR
0072 ------
0073 [verse]
0074 --
0075 *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
0076 *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
0077 --
0078 REPORTING BUGS
0079 --------------
0080 Report bugs to <linux-trace-devel@vger.kernel.org>
0081
0082 LICENSE
0083 -------
0084 libtraceevent is Free Software licensed under the GNU LGPL 2.1
0085
0086 RESOURCES
0087 ---------
0088 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git