00001 /** 00002 * @file daemon/liblegacy/opd_kernel.h 00003 * Dealing with the kernel and kernel module samples 00004 * 00005 * @remark Copyright 2002 OProfile authors 00006 * @remark Read the file COPYING 00007 * 00008 * @author John Levon 00009 * @author Philippe Elie 00010 */ 00011 00012 #ifndef OPD_KERNEL_H 00013 #define OPD_KERNEL_H 00014 00015 #include "op_types.h" 00016 00017 struct opd_proc; 00018 00019 /** 00020 * opd_init_kernel_image - initialise the kernel image 00021 */ 00022 void opd_init_kernel_image(void); 00023 00024 /** 00025 * opd_parse_kernel_range - parse the kernel range values 00026 */ 00027 void opd_parse_kernel_range(char const * arg); 00028 00029 /** 00030 * opd_clear_module_info - clear kernel module information 00031 * 00032 * Clear and free all kernel module information and reset 00033 * values. 00034 */ 00035 void opd_clear_module_info(void); 00036 00037 /** 00038 * opd_handle_kernel_sample - process a kernel sample 00039 * @param eip EIP value of sample 00040 * @param counter counter number 00041 * 00042 * Handle a sample in kernel address space or in a module. The sample is 00043 * output to the relevant image file. 00044 */ 00045 void opd_handle_kernel_sample(unsigned long eip, u32 counter); 00046 00047 /** 00048 * opd_eip_is_kernel - is the sample from kernel/module space 00049 * @param eip EIP value 00050 * 00051 * Returns %1 if eip is in the address space starting at 00052 * kernel_start, %0 otherwise. 00053 */ 00054 int opd_eip_is_kernel(unsigned long eip); 00055 00056 /** 00057 * opd_add_kernel_map - add a module or kernel maps to a proc struct 00058 * 00059 * @param proc owning proc of the new mapping 00060 * @param eip eip inside the new mapping 00061 * 00062 * We assume than eip >= kernel_start 00063 * 00064 */ 00065 void opd_add_kernel_map(struct opd_proc * proc, unsigned long eip); 00066 00067 #endif /* OPD_KERNEL_H */
1.6.1