[a8d9ee]: / daemon / liblegacy / opd_kernel.h  Maximize  Restore  History

Download this file

68 lines (57 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* @file daemon/liblegacy/opd_kernel.h
* Dealing with the kernel and kernel module samples
*
* @remark Copyright 2002 OProfile authors
* @remark Read the file COPYING
*
* @author John Levon
* @author Philippe Elie
*/
#ifndef OPD_KERNEL_H
#define OPD_KERNEL_H
#include "op_types.h"
struct opd_proc;
/**
* opd_init_kernel_image - initialise the kernel image
*/
void opd_init_kernel_image(void);
/**
* opd_parse_kernel_range - parse the kernel range values
*/
void opd_parse_kernel_range(char const * arg);
/**
* opd_clear_module_info - clear kernel module information
*
* Clear and free all kernel module information and reset
* values.
*/
void opd_clear_module_info(void);
/**
* opd_handle_kernel_sample - process a kernel sample
* @param eip EIP value of sample
* @param counter counter number
*
* Handle a sample in kernel address space or in a module. The sample is
* output to the relevant image file.
*/
void opd_handle_kernel_sample(unsigned long eip, u32 counter);
/**
* opd_eip_is_kernel - is the sample from kernel/module space
* @param eip EIP value
*
* Returns %1 if eip is in the address space starting at
* kernel_start, %0 otherwise.
*/
int opd_eip_is_kernel(unsigned long eip);
/**
* opd_add_kernel_map - add a module or kernel maps to a proc struct
*
* @param proc owning proc of the new mapping
* @param eip eip inside the new mapping
*
* We assume than eip >= kernel_start
*
*/
void opd_add_kernel_map(struct opd_proc * proc, unsigned long eip);
#endif /* OPD_KERNEL_H */