Function report |
Source Code:kernel\trace\trace_probe_tmpl.h |
Create Date:2022-07-28 12:38:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:From the 2nd stage, routine is same
Proto:static inline __attribute__((__always_inline__)) int process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val, void *dest, void *base)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct fetch_insn * | code | |
unsigned long | val | |
void * | dest | |
void * | base |
75 | struct fetch_insn * s3 = NULL |
77 | loc = 0 |
80 | stage2 : |
82 | Do |
83 | If op == Dereference: .offset Then |
87 | Else if op == User-space Dereference: .offset Then |
91 | Else Break |
95 | code++ |
96 | When 1 cycle |
99 | stage3 : |
102 | If op == String: .offset, .size Then |
106 | Else if op == User String: .offset, .size Then |
110 | Else Return -EILSEQ |
115 | Case op == Raw: .size |
117 | Break |
118 | Case op == Mem: .offset, .size |
119 | probe_mem_read(dest, (void * )val + offset, size) |
120 | Break |
121 | Case op == Mem: .offset, .size |
122 | probe_mem_read_user(dest, (void * )val + offset, size) |
123 | Break |
124 | Case op == String: .offset, .size |
126 | ret = Fetch a null-terminated string. Caller MUST set *(u32 *)dest with max* length and relative data location. |
127 | Break |
128 | Case op == User String: .offset, .size |
130 | ret = Fetch a null-terminated string from user. Caller MUST set *(u32 *)buf* with max length and relative data location. |
131 | Break |
132 | Default |
133 | Return -EILSEQ |
135 | code++ |
138 | If op == Bitfield: .basesize, .lshift, .rshift Then |
139 | fetch_apply_bitfield(code, dest) |
140 | code++ |
143 | array : |
145 | If op == Array: .param = loop count Then |
149 | If op != String: .offset, .size && op != User String: .offset, .size Then |
155 | code-- |
157 | If dest Then |
161 | Go to stage2 |
163 | code++ |
167 | Return If op == FETCH_OP_END Then ret Else -EILSEQ |
Name | Describe |
---|---|
process_fetch_insn | Note that we don't verify it, since the code does not come from user space |
process_fetch_insn | Note that we don't verify it, since the code does not come from user space |
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 |