Function report |
Source Code:kernel\livepatch\patch.c |
Create Date:2022-07-28 10:31:15 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:klp_patch_func
Proto:static int klp_patch_func(struct klp_func *func)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct klp_func * | func |
180 | ops = klp_find_ops(rnal ) |
181 | If Not ops Then |
186 | If Not ftrace_loc Then |
192 | ops = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
196 | func = klp_ftrace_handler |
197 | flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_DYNAMIC | FTRACE_OPS_FL_IPMODIFY | FTRACE_OPS_FL_PERMANENT |
207 | ret = ftrace_set_filter_ip( & fops, ftrace_loc, 0, 0) |
208 | If ret Then |
214 | ret = gister_ftrace_function - register a function for profiling*@ops - ops structure that holds the function for profiling |
215 | If ret Then |
218 | ftrace_set_filter_ip( & fops, ftrace_loc, 1, 0) |
219 | Go to err |
223 | Else |
227 | patched = true |
229 | Return 0 |
231 | err : |
235 | Return ret |
Name | Describe |
---|---|
klp_patch_object |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |