Lines Matching +full:sub +full:- +full:frame

21  * Portions Copyright 2006-2008 John Birrell jb@freebsd.org
42 fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval) in fbt_invop() argument
50 for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { in fbt_invop()
51 if ((uintptr_t)fbt->fbtp_patchpoint != addr) in fbt_invop()
54 cpu->cpu_dtrace_caller = addr; in fbt_invop()
56 if (fbt->fbtp_roffset == 0) { in fbt_invop()
57 dtrace_probe(fbt->fbtp_id, frame->tf_x[0], in fbt_invop()
58 frame->tf_x[1], frame->tf_x[2], in fbt_invop()
59 frame->tf_x[3], frame->tf_x[4]); in fbt_invop()
61 dtrace_probe(fbt->fbtp_id, fbt->fbtp_roffset, rval, in fbt_invop()
64 cpu->cpu_dtrace_caller = 0; in fbt_invop()
65 return (fbt->fbtp_savedval); in fbt_invop()
76 if (!arm64_get_writable_addr(fbt->fbtp_patchpoint, &addr)) in fbt_patch_tracepoint()
80 cpu_icache_sync_range(fbt->fbtp_patchpoint, 4); in fbt_patch_tracepoint()
95 name = symval->name; in fbt_provide_module_function()
109 instr = (uint32_t *)(symval->value); in fbt_provide_module_function()
110 limit = (uint32_t *)(symval->value + symval->size); in fbt_provide_module_function()
128 /* Look for stp (pre-indexed) or sub operation */ in fbt_provide_module_function()
132 * "sub sp, sp, <const>". in fbt_provide_module_function()
134 * Sometimes the compiler will have a sub instruction that is in fbt_provide_module_function()
154 fbt->fbtp_name = name; in fbt_provide_module_function()
155 fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, in fbt_provide_module_function()
157 fbt->fbtp_patchpoint = instr; in fbt_provide_module_function()
158 fbt->fbtp_ctl = lf; in fbt_provide_module_function()
159 fbt->fbtp_loadcnt = lf->loadcnt; in fbt_provide_module_function()
160 fbt->fbtp_savedval = *instr; in fbt_provide_module_function()
161 fbt->fbtp_patchval = FBT_PATCHVAL; in fbt_provide_module_function()
163 fbt->fbtp_rval = DTRACE_INVOP_SUB; in fbt_provide_module_function()
165 fbt->fbtp_rval = DTRACE_INVOP_STP; in fbt_provide_module_function()
166 fbt->fbtp_symindx = symindx; in fbt_provide_module_function()
168 fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; in fbt_provide_module_function()
171 lf->fbt_nentries++; in fbt_provide_module_function()
182 start = (uint32_t *)symval->value; in fbt_provide_module_function()
195 fbt->fbtp_name = name; in fbt_provide_module_function()
197 fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, in fbt_provide_module_function()
200 retfbt->fbtp_probenext = fbt; in fbt_provide_module_function()
201 fbt->fbtp_id = retfbt->fbtp_id; in fbt_provide_module_function()
205 fbt->fbtp_patchpoint = instr; in fbt_provide_module_function()
206 fbt->fbtp_ctl = lf; in fbt_provide_module_function()
207 fbt->fbtp_loadcnt = lf->loadcnt; in fbt_provide_module_function()
208 fbt->fbtp_symindx = symindx; in fbt_provide_module_function()
210 fbt->fbtp_rval = DTRACE_INVOP_B; in fbt_provide_module_function()
212 fbt->fbtp_rval = DTRACE_INVOP_RET; in fbt_provide_module_function()
213 fbt->fbtp_roffset = (uintptr_t)instr - (uintptr_t)symval->value; in fbt_provide_module_function()
214 fbt->fbtp_savedval = *instr; in fbt_provide_module_function()
215 fbt->fbtp_patchval = FBT_PATCHVAL; in fbt_provide_module_function()
216 fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; in fbt_provide_module_function()
219 lf->fbt_nentries++; in fbt_provide_module_function()