opagent.h

Go to the documentation of this file.
00001 
00028 #ifndef _LIB_OPAGENT_H
00029 #define _LIB_OPAGENT_H
00030 
00031 #include <sys/types.h>
00032 
00033 #if defined(__cplusplus)
00034 extern "C" {
00035 #endif
00036   
00037 struct debug_line_info {
00038     unsigned long vma;
00039     unsigned int lineno;
00040     /* The filename format is unspecified, absolute path, relative etc. */
00041     char const * filename;
00042 };
00043 
00044 typedef void * op_agent_t;
00045 
00054 op_agent_t op_open_agent(void);
00055 
00064 int op_close_agent(op_agent_t hdl);
00065 
00089 int op_write_native_code(op_agent_t hdl, char const * symbol_name,
00090              uint64_t vma, void const * code,
00091              const unsigned int code_size);
00092 
00109 int op_write_debug_line_info(op_agent_t hdl, void const * code,
00110                  size_t nr_entry,
00111                  struct debug_line_info const * compile_map);
00112 
00124 int op_unload_native_code(op_agent_t hdl, uint64_t vma);
00125 
00129 int op_major_version(void);
00130 
00134 int op_minor_version(void);
00135 
00136 /* idea how to post additional information for a piece of code.
00137    we use the code address as reference
00138 int op_write_loader_name(const void* code_addr, char const * loader_name);
00139 */
00140 
00141 #if defined(__cplusplus)
00142 }
00143 #endif
00144 
00145 #endif

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1